Loading packages/PackageInstaller/src/com/android/packageinstaller/DeleteStagedFileOnResult.java +5 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.packageinstaller; import static android.content.Intent.CATEGORY_LAUNCHER; import static com.android.packageinstaller.PackageInstallerActivity.EXTRA_STAGED_SESSION_ID; import android.app.Activity; Loading Loading @@ -45,6 +47,9 @@ public class DeleteStagedFileOnResult extends Activity { protected void onActivityResult(int requestCode, int resultCode, Intent data) { setResult(resultCode, data); finish(); if (data != null && data.hasCategory(CATEGORY_LAUNCHER)) { startActivity(data); } } @Override Loading packages/PackageInstaller/src/com/android/packageinstaller/InstallSuccess.java +1 −6 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.packageinstaller; import android.app.Activity; import android.content.ActivityNotFoundException; import android.content.DialogInterface; import android.content.Intent; import android.content.pm.ApplicationInfo; Loading Loading @@ -123,11 +122,7 @@ public class InstallSuccess extends AlertActivity { Button launchButton = mAlert.getButton(DialogInterface.BUTTON_POSITIVE); if (enabled) { launchButton.setOnClickListener(view -> { try { startActivity(mLaunchIntent); } catch (ActivityNotFoundException | SecurityException e) { Log.e(LOG_TAG, "Could not start activity", e); } setResult(Activity.RESULT_OK, mLaunchIntent); finish(); }); } else { Loading packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java +4 −2 Original line number Diff line number Diff line Loading @@ -16,8 +16,9 @@ */ package com.android.packageinstaller; import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP; import static android.content.Intent.FLAG_ACTIVITY_NO_HISTORY; import static android.content.Intent.FLAG_ACTIVITY_REORDER_TO_FRONT; import static android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP; import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; import android.Manifest; Loading Loading @@ -789,7 +790,8 @@ public class PackageInstallerActivity extends AlertActivity { } new Handler(Looper.getMainLooper()).postDelayed(() -> { if (!isDestroyed()) { startActivity(getIntent().addFlags(FLAG_ACTIVITY_REORDER_TO_FRONT)); startActivity(getIntent().addFlags( FLAG_ACTIVITY_CLEAR_TOP | FLAG_ACTIVITY_SINGLE_TOP)); } }, 500); Loading Loading
packages/PackageInstaller/src/com/android/packageinstaller/DeleteStagedFileOnResult.java +5 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.packageinstaller; import static android.content.Intent.CATEGORY_LAUNCHER; import static com.android.packageinstaller.PackageInstallerActivity.EXTRA_STAGED_SESSION_ID; import android.app.Activity; Loading Loading @@ -45,6 +47,9 @@ public class DeleteStagedFileOnResult extends Activity { protected void onActivityResult(int requestCode, int resultCode, Intent data) { setResult(resultCode, data); finish(); if (data != null && data.hasCategory(CATEGORY_LAUNCHER)) { startActivity(data); } } @Override Loading
packages/PackageInstaller/src/com/android/packageinstaller/InstallSuccess.java +1 −6 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.packageinstaller; import android.app.Activity; import android.content.ActivityNotFoundException; import android.content.DialogInterface; import android.content.Intent; import android.content.pm.ApplicationInfo; Loading Loading @@ -123,11 +122,7 @@ public class InstallSuccess extends AlertActivity { Button launchButton = mAlert.getButton(DialogInterface.BUTTON_POSITIVE); if (enabled) { launchButton.setOnClickListener(view -> { try { startActivity(mLaunchIntent); } catch (ActivityNotFoundException | SecurityException e) { Log.e(LOG_TAG, "Could not start activity", e); } setResult(Activity.RESULT_OK, mLaunchIntent); finish(); }); } else { Loading
packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java +4 −2 Original line number Diff line number Diff line Loading @@ -16,8 +16,9 @@ */ package com.android.packageinstaller; import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP; import static android.content.Intent.FLAG_ACTIVITY_NO_HISTORY; import static android.content.Intent.FLAG_ACTIVITY_REORDER_TO_FRONT; import static android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP; import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; import android.Manifest; Loading Loading @@ -789,7 +790,8 @@ public class PackageInstallerActivity extends AlertActivity { } new Handler(Looper.getMainLooper()).postDelayed(() -> { if (!isDestroyed()) { startActivity(getIntent().addFlags(FLAG_ACTIVITY_REORDER_TO_FRONT)); startActivity(getIntent().addFlags( FLAG_ACTIVITY_CLEAR_TOP | FLAG_ACTIVITY_SINGLE_TOP)); } }, 500); Loading