Loading core/java/android/hardware/display/BrightnessInfo.java +9 −1 Original line number Original line Diff line number Diff line Loading @@ -59,7 +59,8 @@ public final class BrightnessInfo implements Parcelable { @IntDef(prefix = {"BRIGHTNESS_MAX_REASON_"}, value = { @IntDef(prefix = {"BRIGHTNESS_MAX_REASON_"}, value = { BRIGHTNESS_MAX_REASON_NONE, BRIGHTNESS_MAX_REASON_NONE, BRIGHTNESS_MAX_REASON_THERMAL BRIGHTNESS_MAX_REASON_THERMAL, BRIGHTNESS_MAX_REASON_POWER_IC }) }) @Retention(RetentionPolicy.SOURCE) @Retention(RetentionPolicy.SOURCE) public @interface BrightnessMaxReason {} public @interface BrightnessMaxReason {} Loading @@ -74,6 +75,11 @@ public final class BrightnessInfo implements Parcelable { */ */ public static final int BRIGHTNESS_MAX_REASON_THERMAL = 1; public static final int BRIGHTNESS_MAX_REASON_THERMAL = 1; /** * Maximum brightness is restricted due to power throttling. */ public static final int BRIGHTNESS_MAX_REASON_POWER_IC = 2; /** Brightness */ /** Brightness */ public final float brightness; public final float brightness; Loading Loading @@ -144,6 +150,8 @@ public final class BrightnessInfo implements Parcelable { return "none"; return "none"; case BRIGHTNESS_MAX_REASON_THERMAL: case BRIGHTNESS_MAX_REASON_THERMAL: return "thermal"; return "thermal"; case BRIGHTNESS_MAX_REASON_POWER_IC: return "power IC"; } } return "invalid"; return "invalid"; } } Loading core/java/android/hardware/display/DisplayManager.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -1818,6 +1818,12 @@ public final class DisplayManager { */ */ String KEY_BRIGHTNESS_THROTTLING_DATA = "brightness_throttling_data"; String KEY_BRIGHTNESS_THROTTLING_DATA = "brightness_throttling_data"; /** * Key for the power throttling data as a String formatted, from the display * device config. */ String KEY_POWER_THROTTLING_DATA = "power_throttling_data"; /** /** * Key for new power controller feature flag. If enabled new DisplayPowerController will * Key for new power controller feature flag. If enabled new DisplayPowerController will * be used. * be used. Loading packages/SystemUI/res-keyguard/drawable/progress_bar.xml 0 → 100644 +45 −0 Original line number Original line Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2023 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" android:paddingMode="stack"> <item android:id="@android:id/background" android:gravity="center_vertical|fill_horizontal"> <shape android:layout_width="match_parent" android:layout_height="match_parent" android:shape="rectangle"> <corners android:radius="30dp" /> <solid android:color="?androidprv:attr/materialColorSurfaceContainerHighest" /> </shape> </item> <item android:id="@android:id/progress" android:gravity="center_vertical|fill_horizontal"> <clip> <shape android:layout_width="match_parent" android:layout_height="match_parent" android:shape="rectangle"> <corners android:radius="30dp" /> <solid android:color="?androidprv:attr/textColorPrimary" /> </shape> </clip> </item> </layer-list> No newline at end of file packages/SystemUI/res-keyguard/layout/sidefps_progress_bar.xml 0 → 100644 +32 −0 Original line number Original line Diff line number Diff line <?xml version="1.0" encoding="utf-8"?><!-- ~ Copyright (C) 2023 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. ~ --> <LinearLayout android:layout_height="match_parent" android:layout_width="match_parent" android:orientation="vertical" android:layoutDirection="ltr" android:gravity="center" xmlns:android="http://schemas.android.com/apk/res/android"> <ProgressBar android:id="@+id/side_fps_progress_bar" android:layout_width="55dp" android:layout_height="10dp" android:indeterminateOnly="false" android:min="0" android:max="100" android:progressDrawable="@drawable/progress_bar" /> </LinearLayout> packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -153,7 +153,6 @@ import com.android.settingslib.Utils; import com.android.settingslib.WirelessUtils; import com.android.settingslib.WirelessUtils; import com.android.settingslib.fuelgauge.BatteryStatus; import com.android.settingslib.fuelgauge.BatteryStatus; import com.android.systemui.Dumpable; import com.android.systemui.Dumpable; import com.android.systemui.res.R; import com.android.systemui.biometrics.AuthController; import com.android.systemui.biometrics.AuthController; import com.android.systemui.biometrics.FingerprintInteractiveToAuthProvider; import com.android.systemui.biometrics.FingerprintInteractiveToAuthProvider; import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.broadcast.BroadcastDispatcher; Loading @@ -177,6 +176,7 @@ import com.android.systemui.keyguard.shared.model.SysUiFaceAuthenticateOptions; import com.android.systemui.log.SessionTracker; import com.android.systemui.log.SessionTracker; import com.android.systemui.plugins.WeatherData; import com.android.systemui.plugins.WeatherData; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.res.R; import com.android.systemui.settings.DisplayTracker; import com.android.systemui.settings.DisplayTracker; import com.android.systemui.settings.UserTracker; import com.android.systemui.settings.UserTracker; import com.android.systemui.shared.system.TaskStackChangeListener; import com.android.systemui.shared.system.TaskStackChangeListener; Loading Loading @@ -1984,6 +1984,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab @Override @Override public void onAuthenticationAcquired(int acquireInfo) { public void onAuthenticationAcquired(int acquireInfo) { Trace.beginSection("KeyguardUpdateMonitor#onAuthenticationAcquired"); Trace.beginSection("KeyguardUpdateMonitor#onAuthenticationAcquired"); mLogger.logFingerprintAcquired(acquireInfo); handleFingerprintAcquired(acquireInfo); handleFingerprintAcquired(acquireInfo); Trace.endSection(); Trace.endSection(); } } Loading Loading
core/java/android/hardware/display/BrightnessInfo.java +9 −1 Original line number Original line Diff line number Diff line Loading @@ -59,7 +59,8 @@ public final class BrightnessInfo implements Parcelable { @IntDef(prefix = {"BRIGHTNESS_MAX_REASON_"}, value = { @IntDef(prefix = {"BRIGHTNESS_MAX_REASON_"}, value = { BRIGHTNESS_MAX_REASON_NONE, BRIGHTNESS_MAX_REASON_NONE, BRIGHTNESS_MAX_REASON_THERMAL BRIGHTNESS_MAX_REASON_THERMAL, BRIGHTNESS_MAX_REASON_POWER_IC }) }) @Retention(RetentionPolicy.SOURCE) @Retention(RetentionPolicy.SOURCE) public @interface BrightnessMaxReason {} public @interface BrightnessMaxReason {} Loading @@ -74,6 +75,11 @@ public final class BrightnessInfo implements Parcelable { */ */ public static final int BRIGHTNESS_MAX_REASON_THERMAL = 1; public static final int BRIGHTNESS_MAX_REASON_THERMAL = 1; /** * Maximum brightness is restricted due to power throttling. */ public static final int BRIGHTNESS_MAX_REASON_POWER_IC = 2; /** Brightness */ /** Brightness */ public final float brightness; public final float brightness; Loading Loading @@ -144,6 +150,8 @@ public final class BrightnessInfo implements Parcelable { return "none"; return "none"; case BRIGHTNESS_MAX_REASON_THERMAL: case BRIGHTNESS_MAX_REASON_THERMAL: return "thermal"; return "thermal"; case BRIGHTNESS_MAX_REASON_POWER_IC: return "power IC"; } } return "invalid"; return "invalid"; } } Loading
core/java/android/hardware/display/DisplayManager.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -1818,6 +1818,12 @@ public final class DisplayManager { */ */ String KEY_BRIGHTNESS_THROTTLING_DATA = "brightness_throttling_data"; String KEY_BRIGHTNESS_THROTTLING_DATA = "brightness_throttling_data"; /** * Key for the power throttling data as a String formatted, from the display * device config. */ String KEY_POWER_THROTTLING_DATA = "power_throttling_data"; /** /** * Key for new power controller feature flag. If enabled new DisplayPowerController will * Key for new power controller feature flag. If enabled new DisplayPowerController will * be used. * be used. Loading
packages/SystemUI/res-keyguard/drawable/progress_bar.xml 0 → 100644 +45 −0 Original line number Original line Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2023 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" android:paddingMode="stack"> <item android:id="@android:id/background" android:gravity="center_vertical|fill_horizontal"> <shape android:layout_width="match_parent" android:layout_height="match_parent" android:shape="rectangle"> <corners android:radius="30dp" /> <solid android:color="?androidprv:attr/materialColorSurfaceContainerHighest" /> </shape> </item> <item android:id="@android:id/progress" android:gravity="center_vertical|fill_horizontal"> <clip> <shape android:layout_width="match_parent" android:layout_height="match_parent" android:shape="rectangle"> <corners android:radius="30dp" /> <solid android:color="?androidprv:attr/textColorPrimary" /> </shape> </clip> </item> </layer-list> No newline at end of file
packages/SystemUI/res-keyguard/layout/sidefps_progress_bar.xml 0 → 100644 +32 −0 Original line number Original line Diff line number Diff line <?xml version="1.0" encoding="utf-8"?><!-- ~ Copyright (C) 2023 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. ~ --> <LinearLayout android:layout_height="match_parent" android:layout_width="match_parent" android:orientation="vertical" android:layoutDirection="ltr" android:gravity="center" xmlns:android="http://schemas.android.com/apk/res/android"> <ProgressBar android:id="@+id/side_fps_progress_bar" android:layout_width="55dp" android:layout_height="10dp" android:indeterminateOnly="false" android:min="0" android:max="100" android:progressDrawable="@drawable/progress_bar" /> </LinearLayout>
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -153,7 +153,6 @@ import com.android.settingslib.Utils; import com.android.settingslib.WirelessUtils; import com.android.settingslib.WirelessUtils; import com.android.settingslib.fuelgauge.BatteryStatus; import com.android.settingslib.fuelgauge.BatteryStatus; import com.android.systemui.Dumpable; import com.android.systemui.Dumpable; import com.android.systemui.res.R; import com.android.systemui.biometrics.AuthController; import com.android.systemui.biometrics.AuthController; import com.android.systemui.biometrics.FingerprintInteractiveToAuthProvider; import com.android.systemui.biometrics.FingerprintInteractiveToAuthProvider; import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.broadcast.BroadcastDispatcher; Loading @@ -177,6 +176,7 @@ import com.android.systemui.keyguard.shared.model.SysUiFaceAuthenticateOptions; import com.android.systemui.log.SessionTracker; import com.android.systemui.log.SessionTracker; import com.android.systemui.plugins.WeatherData; import com.android.systemui.plugins.WeatherData; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.res.R; import com.android.systemui.settings.DisplayTracker; import com.android.systemui.settings.DisplayTracker; import com.android.systemui.settings.UserTracker; import com.android.systemui.settings.UserTracker; import com.android.systemui.shared.system.TaskStackChangeListener; import com.android.systemui.shared.system.TaskStackChangeListener; Loading Loading @@ -1984,6 +1984,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab @Override @Override public void onAuthenticationAcquired(int acquireInfo) { public void onAuthenticationAcquired(int acquireInfo) { Trace.beginSection("KeyguardUpdateMonitor#onAuthenticationAcquired"); Trace.beginSection("KeyguardUpdateMonitor#onAuthenticationAcquired"); mLogger.logFingerprintAcquired(acquireInfo); handleFingerprintAcquired(acquireInfo); handleFingerprintAcquired(acquireInfo); Trace.endSection(); Trace.endSection(); } } Loading