Merge "Allow BAL for HarmfulAppWarningActivity" into udc-dev

This commit is contained in:
Hani Kazmi
2023-05-17 21:59:01 +00:00
committed by Android (Google) Code Review

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);
}