Loading packages/SystemUI/res/values-television/dimens.xml 0 → 100644 +20 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2020 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 --> <resources> <!-- Opacity at which the background for the shutdown UI will be drawn. --> <item name="shutdown_scrim_behind_alpha" format="float" type="dimen">1.0</item> </resources> No newline at end of file packages/SystemUI/res/values-television/styles.xml +5 −0 Original line number Diff line number Diff line Loading @@ -17,4 +17,9 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android"> <style name="Theme.SystemUI.Dialog" parent="@android:style/Theme.DeviceDefault.Dialog" /> <style name="Theme.SystemUI.Dialog.Alert" parent="@*android:style/Theme.DeviceDefault.Dialog.Alert" /> <style name="Animation.ShutdownUi"> <item name="android:windowEnterAnimation">@null</item> <item name="android:windowExitAnimation">@null</item> </style> </resources> packages/SystemUI/res/values/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -1266,4 +1266,7 @@ <dimen name="screenrecord_status_icon_radius">5dp</dimen> <dimen name="kg_user_switcher_text_size">16sp</dimen> <!-- Opacity at which the background for the shutdown UI will be drawn. --> <item name="shutdown_scrim_behind_alpha" format="float" type="dimen">0.95</item> </resources> packages/SystemUI/res/values/styles.xml +3 −0 Original line number Diff line number Diff line Loading @@ -305,6 +305,9 @@ <item name="android:windowExitAnimation">@null</item> </style> <style name="Animation.ShutdownUi" parent="@android:style/Animation.Toast"> </style> <!-- Standard animations for hiding and showing the status bar. --> <style name="Animation.StatusBar"> </style> Loading packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsImpl.java +4 −4 Original line number Diff line number Diff line Loading @@ -49,8 +49,6 @@ import dagger.Lazy; public class GlobalActionsImpl implements GlobalActions, CommandQueue.Callbacks { private static final float SHUTDOWN_SCRIM_ALPHA = 0.95f; private final Context mContext; private final Lazy<GlobalActionsDialog> mGlobalActionsDialogLazy; private final KeyguardStateController mKeyguardStateController; Loading Loading @@ -124,7 +122,7 @@ public class GlobalActionsImpl implements GlobalActions, CommandQueue.Callbacks | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH | WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED); window.setBackgroundDrawable(background); window.setWindowAnimations(R.style.Animation_Toast); window.setWindowAnimations(com.android.systemui.R.style.Animation_ShutdownUi); d.setContentView(R.layout.shutdown_dialog); d.setCancelable(false); Loading Loading @@ -153,7 +151,9 @@ public class GlobalActionsImpl implements GlobalActions, CommandQueue.Callbacks mBlurUtils.applyBlur(d.getWindow().getDecorView().getViewRootImpl(), mBlurUtils.blurRadiusOfRatio(1)); } else { background.setAlpha((int) (SHUTDOWN_SCRIM_ALPHA * 255)); float backgroundAlpha = mContext.getResources().getFloat( com.android.systemui.R.dimen.shutdown_scrim_behind_alpha); background.setAlpha((int) (backgroundAlpha * 255)); } d.show(); Loading Loading
packages/SystemUI/res/values-television/dimens.xml 0 → 100644 +20 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2020 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 --> <resources> <!-- Opacity at which the background for the shutdown UI will be drawn. --> <item name="shutdown_scrim_behind_alpha" format="float" type="dimen">1.0</item> </resources> No newline at end of file
packages/SystemUI/res/values-television/styles.xml +5 −0 Original line number Diff line number Diff line Loading @@ -17,4 +17,9 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android"> <style name="Theme.SystemUI.Dialog" parent="@android:style/Theme.DeviceDefault.Dialog" /> <style name="Theme.SystemUI.Dialog.Alert" parent="@*android:style/Theme.DeviceDefault.Dialog.Alert" /> <style name="Animation.ShutdownUi"> <item name="android:windowEnterAnimation">@null</item> <item name="android:windowExitAnimation">@null</item> </style> </resources>
packages/SystemUI/res/values/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -1266,4 +1266,7 @@ <dimen name="screenrecord_status_icon_radius">5dp</dimen> <dimen name="kg_user_switcher_text_size">16sp</dimen> <!-- Opacity at which the background for the shutdown UI will be drawn. --> <item name="shutdown_scrim_behind_alpha" format="float" type="dimen">0.95</item> </resources>
packages/SystemUI/res/values/styles.xml +3 −0 Original line number Diff line number Diff line Loading @@ -305,6 +305,9 @@ <item name="android:windowExitAnimation">@null</item> </style> <style name="Animation.ShutdownUi" parent="@android:style/Animation.Toast"> </style> <!-- Standard animations for hiding and showing the status bar. --> <style name="Animation.StatusBar"> </style> Loading
packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsImpl.java +4 −4 Original line number Diff line number Diff line Loading @@ -49,8 +49,6 @@ import dagger.Lazy; public class GlobalActionsImpl implements GlobalActions, CommandQueue.Callbacks { private static final float SHUTDOWN_SCRIM_ALPHA = 0.95f; private final Context mContext; private final Lazy<GlobalActionsDialog> mGlobalActionsDialogLazy; private final KeyguardStateController mKeyguardStateController; Loading Loading @@ -124,7 +122,7 @@ public class GlobalActionsImpl implements GlobalActions, CommandQueue.Callbacks | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH | WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED); window.setBackgroundDrawable(background); window.setWindowAnimations(R.style.Animation_Toast); window.setWindowAnimations(com.android.systemui.R.style.Animation_ShutdownUi); d.setContentView(R.layout.shutdown_dialog); d.setCancelable(false); Loading Loading @@ -153,7 +151,9 @@ public class GlobalActionsImpl implements GlobalActions, CommandQueue.Callbacks mBlurUtils.applyBlur(d.getWindow().getDecorView().getViewRootImpl(), mBlurUtils.blurRadiusOfRatio(1)); } else { background.setAlpha((int) (SHUTDOWN_SCRIM_ALPHA * 255)); float backgroundAlpha = mContext.getResources().getFloat( com.android.systemui.R.dimen.shutdown_scrim_behind_alpha); background.setAlpha((int) (backgroundAlpha * 255)); } d.show(); Loading