Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 712bbbae authored by Hani Kazmi's avatar Hani Kazmi Committed by Automerger Merge Worker
Browse files

Merge "Allow BAL for SuspendedAppActivity" into udc-dev am: 453c9a15 am: 9637c93d

parents 9c27d516 9637c93d
Loading
Loading
Loading
Loading
+9 −1
Original line number Original line Diff line number Diff line
@@ -24,6 +24,7 @@ import static android.content.res.Resources.ID_NULL;


import android.Manifest;
import android.Manifest;
import android.annotation.Nullable;
import android.annotation.Nullable;
import android.app.ActivityOptions;
import android.app.AlertDialog;
import android.app.AlertDialog;
import android.app.AppGlobals;
import android.app.AppGlobals;
import android.app.KeyguardManager;
import android.app.KeyguardManager;
@@ -314,8 +315,15 @@ public class SuspendedAppActivity extends AlertActivity
                        sendBroadcastAsUser(reportUnsuspend, UserHandle.of(mUserId));
                        sendBroadcastAsUser(reportUnsuspend, UserHandle.of(mUserId));


                        if (mOnUnsuspend != null) {
                        if (mOnUnsuspend != null) {
                            Bundle activityOptions =
                                    ActivityOptions.makeBasic()
                                            .setPendingIntentBackgroundActivityStartMode(
                                                    ActivityOptions
                                                            .MODE_BACKGROUND_ACTIVITY_START_ALLOWED)
                                            .toBundle();
                            try {
                            try {
                                mOnUnsuspend.sendIntent(this, 0, null, null, null);
                                mOnUnsuspend.sendIntent(this, 0, null, null, null, null,
                                        activityOptions);
                            } catch (IntentSender.SendIntentException e) {
                            } catch (IntentSender.SendIntentException e) {
                                Slog.e(TAG, "Error while starting intent " + mOnUnsuspend, e);
                                Slog.e(TAG, "Error while starting intent " + mOnUnsuspend, e);
                            }
                            }