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

Commit 6fac5460 authored by Muhammed Siju's avatar Muhammed Siju Committed by Gerrit - the friendly Code Review server
Browse files

Telephony: Add RECEIVER_FOREGROUND flag for idle screen broadcast intent.

Normal priority broadcast intents get queued up in application broadcast
queue, if BOOT_COMPLETE is not yet received by the application.
Adding FLAG_RECEIVER_FOREGROUND to the intent allows it to be delivered
to the application without waiting for BOOT_COMPLETE.
This is necessary to prevent some GCF tests from timing out due to
delayed delivery of CAT_IDLE_SCREEN_ACTION to Stk application.

Change-Id: I9776000243944c4ca77aac277f6697495136f8cf
CRs-Fixed: 635236
parent 02888612
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -9474,6 +9474,7 @@ public final class ActivityManagerService extends ActivityManagerNative
            if (intent.getAction().equals(AppInterface.CHECK_SCREEN_IDLE_ACTION)) {
                Slog.i(TAG, "ICC has requested idle screen status");
                Intent idleScreenIntent = new Intent(AppInterface.CAT_IDLE_SCREEN_ACTION);
                idleScreenIntent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
                boolean isIdle = getFocusedStack().isHomeStack();
                idleScreenIntent.putExtra("SCREEN_IDLE", isIdle);
                Slog.i(TAG, "Broadcasting Home idle screen Intent"