diff options
Diffstat (limited to 'src/com/android/packageinstaller/PackageInstallerActivity.java')
-rw-r--r-- | src/com/android/packageinstaller/PackageInstallerActivity.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/com/android/packageinstaller/PackageInstallerActivity.java b/src/com/android/packageinstaller/PackageInstallerActivity.java index 848c7688..a059931d 100644 --- a/src/com/android/packageinstaller/PackageInstallerActivity.java +++ b/src/com/android/packageinstaller/PackageInstallerActivity.java @@ -72,7 +72,6 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen private static final String TAG = "PackageInstaller"; private static final int REQUEST_ENABLE_UNKNOWN_SOURCES = 1; - private static final int REQUEST_INSTALL_PACKAGE = 2; private static final String SCHEME_FILE = "file"; private static final String SCHEME_CONTENT = "content"; @@ -185,11 +184,13 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen msg = (mAppInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0 ? R.string.install_confirm_question_update_system_no_perms : R.string.install_confirm_question_update_no_perms; + + findViewById(R.id.spacer).setVisibility(View.VISIBLE); } else { // This is a new application with no permissions. msg = R.string.install_confirm_question_no_perms; } - tabHost.setVisibility(View.GONE); + tabHost.setVisibility(View.INVISIBLE); mScrollView = null; } if (msg != 0) { @@ -228,7 +229,7 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { Log.i(TAG, "Finishing off activity so that user can navigate to settings manually"); - finish(); + finishAffinity(); }}) .setPositiveButton(R.string.settings, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { @@ -324,7 +325,6 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen if (request == REQUEST_ENABLE_UNKNOWN_SOURCES && result == RESULT_OK) { initiateInstall(); } - clearCachedApkIfNeededAndFinish(); } private boolean isInstallRequestFromUnknownSource(Intent intent) { @@ -684,7 +684,8 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen newIntent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT); } if(localLOGV) Log.i(TAG, "downloaded app uri="+mPackageURI); - startActivityForResult(newIntent, REQUEST_INSTALL_PACKAGE); + startActivity(newIntent); + finish(); } private void clearCachedApkIfNeededAndFinish() { |