Merge "Allow BAL for HarmfulAppWarningActivity" into udc-dev am: 4df321352b

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23214617

Change-Id: Ib61eddd4d70690f2e215c3d78aeea250b7e092c5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Hani Kazmi
2023-05-17 22:11:32 +00:00
committed by Automerger Merge Worker

View File

@@ -18,6 +18,7 @@ package com.android.internal.app;
import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
import android.app.ActivityOptions;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
@@ -108,9 +109,14 @@ public class HarmfulAppWarningActivity extends AlertActivity implements
getPackageManager().setHarmfulAppWarning(mPackageName, null /*warning*/);
final IntentSender target = getIntent().getParcelableExtra(Intent.EXTRA_INTENT, android.content.IntentSender.class);
Bundle activityOptions =
ActivityOptions.makeBasic()
.setPendingIntentBackgroundActivityStartMode(
ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED)
.toBundle();
try {
startIntentSenderForResult(target, -1 /*requestCode*/, null /*fillInIntent*/,
0 /*flagsMask*/, 0 /*flagsValue*/, 0 /*extraFlags*/);
0 /*flagsMask*/, 0 /*flagsValue*/, 0 /*extraFlags*/, activityOptions);
} catch (IntentSender.SendIntentException e) {
Log.e(TAG, "Error while starting intent sender", e);
}