diff options
author | Scott Warner <tortel1210@gmail.com> | 2012-08-19 15:09:15 -0400 |
---|---|---|
committer | Scott Warner <tortel1210@gmail.com> | 2012-08-21 14:13:38 -0400 |
commit | ca2484bb0553a93507eccec96cc73ecee1d77a53 (patch) | |
tree | 417ffa88ed32ff01a9aeb45959889d5b196df073 | |
parent | dafc633255c7a18f0a585d49234d7371edf868f0 (diff) | |
download | packages_apps_packageinstaller-ca2484bb0553a93507eccec96cc73ecee1d77a53.zip packages_apps_packageinstaller-ca2484bb0553a93507eccec96cc73ecee1d77a53.tar.gz packages_apps_packageinstaller-ca2484bb0553a93507eccec96cc73ecee1d77a53.tar.bz2 |
Show a Toast on a successful application uninstall
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: I32c2097405b4c4f514224b7561b83175a1c882fb
-rwxr-xr-x | src/com/android/packageinstaller/UninstallAppProgress.java | 8 |
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"); |