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

Commit e0754ed4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Replace get/setPendingIntentBackgroundActivityLaunchAllowedByPermission" into main

parents 1d3f49a3 33394eda
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -231,7 +231,6 @@ class LegacyActivityStarterInternalImplTest : SysuiTestCase() {
        // extra activity options to set on pending intent
        val activityOptions = mock(ActivityOptions::class.java)
        activityOptions.splashScreenStyle = SPLASH_SCREEN_STYLE_SOLID_COLOR
        activityOptions.isPendingIntentBackgroundActivityLaunchAllowedByPermission = false
        val bundleCaptor = argumentCaptor<Bundle>()

        startPendingIntentMaybeDismissingKeyguard(
@@ -255,7 +254,8 @@ class LegacyActivityStarterInternalImplTest : SysuiTestCase() {
                bundleCaptor.capture()
            )
        val options = ActivityOptions.fromBundle(bundleCaptor.firstValue)
        assertThat(options.isPendingIntentBackgroundActivityLaunchAllowedByPermission).isFalse()
        assertThat(options.getPendingIntentBackgroundActivityStartMode())
            .isEqualTo(ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS)
        assertThat(options.splashScreenStyle).isEqualTo(SPLASH_SCREEN_STYLE_SOLID_COLOR)
    }

+3 −3
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ package com.android.systemui.controls.ui

import android.app.Activity
import android.app.ActivityOptions
import android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED
import android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS
import android.app.Dialog
import android.app.PendingIntent
import android.content.ComponentName
@@ -93,8 +93,8 @@ class DetailDialog(
                0 /* enterResId */,
                0 /* exitResId */
            ).apply {
                pendingIntentBackgroundActivityStartMode = MODE_BACKGROUND_ACTIVITY_START_ALLOWED
                isPendingIntentBackgroundActivityLaunchAllowedByPermission = true
                pendingIntentBackgroundActivityStartMode =
                    MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS
                taskAlwaysOnTop = true
            }