Loading services/core/java/com/android/server/am/PendingIntentRecord.java +1 −2 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ import static android.os.Process.SYSTEM_UID; import static com.android.server.am.ActivityManagerDebugConfig.TAG_AM; import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NAME; import static com.android.window.flags.Flags.balClearAllowlistDuration; import android.annotation.IntDef; import android.annotation.Nullable; Loading Loading @@ -330,7 +329,7 @@ public final class PendingIntentRecord extends IIntentSender.Stub { mAllowBgActivityStartsForActivitySender.remove(token); mAllowBgActivityStartsForBroadcastSender.remove(token); mAllowBgActivityStartsForServiceSender.remove(token); if (mAllowlistDuration != null && balClearAllowlistDuration()) { if (mAllowlistDuration != null) { TempAllowListDuration duration = mAllowlistDuration.get(token); if (duration != null && duration.type == TEMPORARY_ALLOWLIST_TYPE_FOREGROUND_SERVICE_ALLOWED) { Loading services/tests/mockingservicestests/src/com/android/server/am/PendingIntentControllerTest.java +1 −4 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ import static com.android.server.am.PendingIntentRecord.CANCEL_REASON_SUPERSEDED import static com.android.server.am.PendingIntentRecord.CANCEL_REASON_USER_STOPPED; import static com.android.server.am.PendingIntentRecord.FLAG_ACTIVITY_SENDER; import static com.android.server.am.PendingIntentRecord.cancelReasonToString; import static com.android.window.flags.Flags.balClearAllowlistDuration; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; Loading Loading @@ -216,9 +215,7 @@ public class PendingIntentControllerTest { pir.getAllowlistDurationLocked(token); assertNotNull(allowlistDurationLockedAfterClear); assertEquals(1000, allowlistDurationLockedAfterClear.duration); assertEquals(balClearAllowlistDuration() ? TEMPORARY_ALLOWLIST_TYPE_FOREGROUND_SERVICE_NOT_ALLOWED : TEMPORARY_ALLOWLIST_TYPE_FOREGROUND_SERVICE_ALLOWED, assertEquals(TEMPORARY_ALLOWLIST_TYPE_FOREGROUND_SERVICE_NOT_ALLOWED, allowlistDurationLocked.type); } Loading Loading
services/core/java/com/android/server/am/PendingIntentRecord.java +1 −2 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ import static android.os.Process.SYSTEM_UID; import static com.android.server.am.ActivityManagerDebugConfig.TAG_AM; import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NAME; import static com.android.window.flags.Flags.balClearAllowlistDuration; import android.annotation.IntDef; import android.annotation.Nullable; Loading Loading @@ -330,7 +329,7 @@ public final class PendingIntentRecord extends IIntentSender.Stub { mAllowBgActivityStartsForActivitySender.remove(token); mAllowBgActivityStartsForBroadcastSender.remove(token); mAllowBgActivityStartsForServiceSender.remove(token); if (mAllowlistDuration != null && balClearAllowlistDuration()) { if (mAllowlistDuration != null) { TempAllowListDuration duration = mAllowlistDuration.get(token); if (duration != null && duration.type == TEMPORARY_ALLOWLIST_TYPE_FOREGROUND_SERVICE_ALLOWED) { Loading
services/tests/mockingservicestests/src/com/android/server/am/PendingIntentControllerTest.java +1 −4 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ import static com.android.server.am.PendingIntentRecord.CANCEL_REASON_SUPERSEDED import static com.android.server.am.PendingIntentRecord.CANCEL_REASON_USER_STOPPED; import static com.android.server.am.PendingIntentRecord.FLAG_ACTIVITY_SENDER; import static com.android.server.am.PendingIntentRecord.cancelReasonToString; import static com.android.window.flags.Flags.balClearAllowlistDuration; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; Loading Loading @@ -216,9 +215,7 @@ public class PendingIntentControllerTest { pir.getAllowlistDurationLocked(token); assertNotNull(allowlistDurationLockedAfterClear); assertEquals(1000, allowlistDurationLockedAfterClear.duration); assertEquals(balClearAllowlistDuration() ? TEMPORARY_ALLOWLIST_TYPE_FOREGROUND_SERVICE_NOT_ALLOWED : TEMPORARY_ALLOWLIST_TYPE_FOREGROUND_SERVICE_ALLOWED, assertEquals(TEMPORARY_ALLOWLIST_TYPE_FOREGROUND_SERVICE_NOT_ALLOWED, allowlistDurationLocked.type); } Loading