summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@android.com>2012-08-21 15:41:17 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-08-21 15:41:17 -0700
commit8707cfaa0c8c111e7fe2ad81d0b8052d4550d4d4 (patch)
tree044f113b772a9278408e357fa434b51a8c0e895d
parent916ad007619e025218665298ef9793c152ced070 (diff)
parent47fe118e0178e9d72c98073ff588ee5cf353258e (diff)
downloadandroid_packages_apps_PackageInstaller-8707cfaa0c8c111e7fe2ad81d0b8052d4550d4d4.zip
android_packages_apps_PackageInstaller-8707cfaa0c8c111e7fe2ad81d0b8052d4550d4d4.tar.gz
android_packages_apps_PackageInstaller-8707cfaa0c8c111e7fe2ad81d0b8052d4550d4d4.tar.bz2
am 47fe118e: Merge "Show a Toast on a successful application uninstall"
* commit '47fe118e0178e9d72c98073ff588ee5cf353258e': Show a Toast on a successful application uninstall
-rwxr-xr-xsrc/com/android/packageinstaller/UninstallAppProgress.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/packageinstaller/UninstallAppProgress.java b/src/com/android/packageinstaller/UninstallAppProgress.java
index 3dfa80f..92822b8 100755
--- a/src/com/android/packageinstaller/UninstallAppProgress.java
+++ b/src/com/android/packageinstaller/UninstallAppProgress.java
@@ -17,6 +17,7 @@
package com.android.packageinstaller;
import android.app.Activity;
+import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.IPackageDeleteObserver;
@@ -31,6 +32,7 @@ import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ProgressBar;
import android.widget.TextView;
+import android.widget.Toast;
/**
* This activity corresponds to a download progress screen that is displayed
@@ -74,7 +76,11 @@ public class UninstallAppProgress extends Activity implements OnClickListener {
switch (msg.arg1) {
case PackageManager.DELETE_SUCCEEDED:
statusText = R.string.uninstall_done;
- break;
+ // Show a Toast and finish the activity
+ Context ctx = getBaseContext();
+ Toast.makeText(ctx, statusText, Toast.LENGTH_LONG).show();
+ setResultAndFinish(mResultCode);
+ return;
case PackageManager.DELETE_FAILED_DEVICE_POLICY_MANAGER:
Log.d(TAG, "Uninstall failed because " + packageName
+ " is a device admin");