summaryrefslogtreecommitdiffstats
path: root/src/com/android/packageinstaller/UninstallerActivity.java
diff options
context:
space:
mode:
authorSuchi Amalapurapu <asuchitra@google.com>2009-09-01 14:35:25 -0700
committerSuchi Amalapurapu <asuchitra@google.com>2009-09-08 14:53:10 -0700
commitd9b773b7041894e37c1b6f62d6b221dd3c8e4c43 (patch)
treec82c8491f9f1435c0125a1958b474608acabeef2 /src/com/android/packageinstaller/UninstallerActivity.java
parent0d2388f6983b79a8e46e1d2aee2f1ccefbe900ab (diff)
downloadandroid_packages_apps_PackageInstaller-d9b773b7041894e37c1b6f62d6b221dd3c8e4c43.tar.gz
android_packages_apps_PackageInstaller-d9b773b7041894e37c1b6f62d6b221dd3c8e4c43.tar.bz2
android_packages_apps_PackageInstaller-d9b773b7041894e37c1b6f62d6b221dd3c8e4c43.zip
Fix screen flow issues in pacakge installer/uninstaller.
The main activity was managing the state transitions during installation/uninstallation which was actually not needed. Just make the activities independent and start sub activities without waiting for activity result codes in the main activity. If the user enables development setting to immediately destroy activities, and sideloads an app, the ActivityManager tries to destroy the main activity while it starts sub activities to finish installation and this results in UI bizarreness based on the current state of the installer. Also move InstallConfirmation to the main activity. Converge InstallDone and InstallProgress into one screen. Just enable or disable launch/close buttons. This is how it should have been in the first place.. Same set of issues with uninstall code path as well.
Diffstat (limited to 'src/com/android/packageinstaller/UninstallerActivity.java')
-rwxr-xr-xsrc/com/android/packageinstaller/UninstallerActivity.java25
1 files changed, 2 insertions, 23 deletions
diff --git a/src/com/android/packageinstaller/UninstallerActivity.java b/src/com/android/packageinstaller/UninstallerActivity.java
index c6b6eb8f..065da8b5 100755
--- a/src/com/android/packageinstaller/UninstallerActivity.java
+++ b/src/com/android/packageinstaller/UninstallerActivity.java
@@ -43,8 +43,6 @@ public class UninstallerActivity extends Activity implements OnClickListener,
DialogInterface.OnCancelListener {
private static final String TAG = "UninstallerActivity";
private boolean localLOGV = false;
- // Request code
- private static final int UNINSTALL_PROGRESS = 1;
PackageManager mPm;
private ApplicationInfo mAppInfo;
private Button mOk;
@@ -54,11 +52,7 @@ public class UninstallerActivity extends Activity implements OnClickListener,
private static final int DLG_BASE = 0;
private static final int DLG_APP_NOT_FOUND = DLG_BASE + 1;
private static final int DLG_UNINSTALL_FAILED = DLG_BASE + 2;
-
- private void showDialogInner(int id) {
- showDialog(id);
- }
-
+
@Override
public Dialog onCreateDialog(int id) {
switch (id) {
@@ -98,7 +92,7 @@ public class UninstallerActivity extends Activity implements OnClickListener,
newIntent.putExtra(PackageUtil.INTENT_ATTR_APPLICATION_INFO,
mAppInfo);
newIntent.setClass(this, UninstallAppProgress.class);
- startActivityForResult(newIntent, UNINSTALL_PROGRESS);
+ startActivity(newIntent);
}
@Override
@@ -146,21 +140,6 @@ public class UninstallerActivity extends Activity implements OnClickListener,
}
}
- @Override
- protected void onActivityResult(int requestCode, int resultCode, Intent data) {
- if (requestCode != UNINSTALL_PROGRESS) {
- return;
- }
- // Start the next screen to show final status of installation
- if (resultCode != UninstallAppProgress.SUCCEEDED) {
- showDialogInner(DLG_UNINSTALL_FAILED);
- } else {
- // Finish off this activity
- if (localLOGV) Log.i(TAG, "Finishing off activity");
- finish();
- }
- }
-
public void onClick(View v) {
if(v == mOk) {
//initiate next screen