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

Commit 4fec80e5 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 10083660 from 030901a1 to udc-qpr1-release

Change-Id: I5cf2f23f3c6758b6689807349c1db3a7967ec112
parents 662fc038 030901a1
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -300,6 +300,14 @@ public final class ViewRootImpl implements ViewParent,
    public static final boolean CAPTION_ON_SHELL =
            SystemProperties.getBoolean("persist.wm.debug.caption_on_shell", true);

    /**
     * Whether the client (system UI) is handling the transient gesture and the corresponding
     * animation.
     * @hide
     */
    public static final boolean CLIENT_TRANSIENT =
            SystemProperties.getBoolean("persist.wm.debug.client_transient", false);

    /**
     * Whether the client should compute the window frame on its own.
     * @hide
+0 −1
Original line number Diff line number Diff line
@@ -18,6 +18,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.android.settingslib.spaprivileged">
    <uses-permission android:name="android.permission.MANAGE_USERS" />
    <uses-permission android:name="android.permission.GRANT_RUNTIME_PERMISSIONS" />
</manifest>
+1 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ class AppOpsControllerTest {
    @Before
    fun setUp() {
        whenever(context.appOpsManager).thenReturn(appOpsManager)
        whenever(context.packageManager).thenReturn(packageManager)
        doNothing().`when`(packageManager)
                .updatePermissionFlags(anyString(), anyString(), anyInt(), anyInt(), any())
    }
+10 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.settingslib.spaprivileged.template.app
import android.app.AppOpsManager
import android.content.Context
import android.content.pm.ApplicationInfo
import android.content.pm.PackageManager
import androidx.compose.runtime.State
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.lifecycle.MutableLiveData
@@ -38,6 +39,10 @@ import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mock
import org.mockito.Mockito.any
import org.mockito.Mockito.anyInt
import org.mockito.Mockito.anyString
import org.mockito.Mockito.doNothing
import org.mockito.Mockito.verify
import org.mockito.Mockito.`when` as whenever
import org.mockito.Spy
@@ -57,11 +62,16 @@ class AppOpPermissionAppListTest {

    @Mock private lateinit var appOpsManager: AppOpsManager

    @Mock private lateinit var packageManager: PackageManager

    private lateinit var listModel: TestAppOpPermissionAppListModel

    @Before
    fun setUp() {
        whenever(context.appOpsManager).thenReturn(appOpsManager)
        whenever(context.packageManager).thenReturn(packageManager)
        doNothing().`when`(packageManager)
                .updatePermissionFlags(anyString(), anyString(), anyInt(), anyInt(), any())
        listModel = TestAppOpPermissionAppListModel()
    }

+8 −5
Original line number Diff line number Diff line
@@ -3096,18 +3096,21 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                    }
                    int screenDisplayId = displayId < 0 ? DEFAULT_DISPLAY : displayId;

                    float minLinearBrightness = mPowerManager.getBrightnessConstraint(
                            PowerManager.BRIGHTNESS_CONSTRAINT_TYPE_MINIMUM);
                    float maxLinearBrightness = mPowerManager.getBrightnessConstraint(
                            PowerManager.BRIGHTNESS_CONSTRAINT_TYPE_MAXIMUM);
                    float linearBrightness = mDisplayManager.getBrightness(screenDisplayId);

                    float gammaBrightness = BrightnessUtils.convertLinearToGamma(linearBrightness);
                    float adjustedGammaBrightness =
                            gammaBrightness + 1f / BRIGHTNESS_STEPS * direction;

                    adjustedGammaBrightness = MathUtils.constrain(adjustedGammaBrightness, 0f,
                            1f);
                    float adjustedLinearBrightness = BrightnessUtils.convertGammaToLinear(
                            adjustedGammaBrightness);

                    adjustedLinearBrightness = MathUtils.constrain(adjustedLinearBrightness, 0f,
                            1f);

                    adjustedLinearBrightness = MathUtils.constrain(adjustedLinearBrightness,
                            minLinearBrightness, maxLinearBrightness);
                    mDisplayManager.setBrightness(screenDisplayId, adjustedLinearBrightness);

                    startActivityAsUser(new Intent(Intent.ACTION_SHOW_BRIGHTNESS_DIALOG),
Loading