summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Warner <Tortel1210@gmail.com>2012-08-17 18:08:45 (GMT)
committerScott Warner <Tortel1210@gmail.com>2012-08-17 19:07:08 (GMT)
commit771c0f58c04ff478e0666dd04b07d8abe4c5d2e3 (patch)
tree51fa30b4a9fc3534df33760db8bb773f78a70bf4
parent2e135b570be7ff972afb2062f44f718ad9bf2ea1 (diff)
downloadandroid_packages_apps_PackageInstaller-jellybean.zip
android_packages_apps_PackageInstaller-jellybean.tar.gz
android_packages_apps_PackageInstaller-jellybean.tar.bz2
Show a Toast on a successful application uninstalljellybean-stablejellybean
Instead of waiting for the user to tap OK, just show a Toast and get out of the way. Does not change anything for unsuccessful uninstall attempts Change-Id: Ia83f826bbc16f47bce5980254adaa6141f75573a
-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..a81d23d 100755
--- a/src/com/android/packageinstaller/UninstallAppProgress.java
+++ b/src/com/android/packageinstaller/UninstallAppProgress.java
@@ -31,6 +31,8 @@ import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ProgressBar;
import android.widget.TextView;
+import android.widget.Toast;
+import android.content.Context;
/**
* 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");