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

Commit 4e42ebe6 authored by Joshua Mokut's avatar Joshua Mokut Committed by Android (Google) Code Review
Browse files

Merge "Disabled Animations for Brightness Dialog" into main

parents 45f279fb 7e2f0fec
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2015 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.
-->

<alpha xmlns:android="http://schemas.android.com/apk/res/android"
    android:fromAlpha="1.0"
    android:toAlpha="0.0"
    android:interpolator="@android:interpolator/linear_out_slow_in"
    android:duration="0"/>
+5 −0
Original line number Diff line number Diff line
@@ -420,6 +420,11 @@
    <!-- Cannot double inherit. Use Theme.SystemUI.QuickSettings in code to match -->
    <style name="BrightnessDialog" parent="@android:style/Theme.DeviceDefault.Dialog">
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:windowAnimationStyle">@style/Animation.BrightnessDialog</item>
    </style>

    <style name="Animation.BrightnessDialog">
        <item name="android:windowExitAnimation">@anim/instant_fade_out</item>
    </style>

    <style name="Theme.SystemUI.ContrastDialog" parent="@android:style/Theme.DeviceDefault.Dialog">
+2 −1
Original line number Diff line number Diff line
@@ -3537,7 +3537,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                    mDisplayManager.setBrightness(screenDisplayId, adjustedLinearBrightness);

                    Intent intent = new Intent(Intent.ACTION_SHOW_BRIGHTNESS_DIALOG);
                    intent.addFlags(Intent.FLAG_ACTIVITY_NO_USER_ACTION);
                    intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION
                            | Intent.FLAG_ACTIVITY_NO_USER_ACTION);
                    intent.putExtra(EXTRA_FROM_BRIGHTNESS_KEY, true);
                    startActivityAsUser(intent, UserHandle.CURRENT_OR_SELF);
                    logKeyboardSystemsEvent(event, KeyboardLogEvent.getBrightnessEvent(keyCode));