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

Commit 0c2acffe authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Clean up lock screen hide animation.

We now have an animation to apply to the thing behind the lock
screen animation when it isn't on the wallpaper, which looks
similar to the animation we use when both are on the wallpaper.

In implementing this, cleaned up the code to figure out up-front
which animation to run, getting rid of that kludgy thing that
cleared the window animation if the wallpaper was not being used
for the lower windows.

Change-Id: Ifc4c8a8894ad384124dcf4bbdaab134f1157b0f3
parent ed4995d6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -667,7 +667,7 @@ public interface WindowManagerPolicy {
    /**
     * Create and return an animation to re-display a force hidden window.
     */
    public Animation createForceHideEnterAnimation();
    public Animation createForceHideEnterAnimation(boolean onWallpaper);
    
    /**
     * Called from the input reader thread before a key is enqueued.
+2 −2
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2007, The Android Open Source Project
** Copyright 2012, 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.
@@ -18,7 +18,7 @@
-->

<set xmlns:android="http://schemas.android.com/apk/res/android"
    android:detachWallpaper="true" android:shareInterpolator="false">
    android:background="#ff000000" android:shareInterpolator="false">
    <scale
        android:fromXScale="0.95" android:toXScale="1.0"
        android:fromYScale="0.95" android:toYScale="1.0"
+36 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2007, 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.
*/
-->

<set xmlns:android="http://schemas.android.com/apk/res/android"
    android:detachWallpaper="true" android:shareInterpolator="false">
    <scale
        android:fromXScale="0.95" android:toXScale="1.0"
        android:fromYScale="0.95" android:toYScale="1.0"
        android:pivotX="50%p" android:pivotY="50%p"
        android:fillEnabled="true" android:fillBefore="true"
        android:interpolator="@interpolator/decelerate_cubic"
        android:startOffset="@android:integer/config_shortAnimTime"
        android:duration="@android:integer/config_shortAnimTime" />
    <alpha
        android:fromAlpha="0.0" android:toAlpha="1.0"
        android:fillEnabled="true" android:fillBefore="true"
        android:interpolator="@interpolator/decelerate_quad"
        android:startOffset="@android:integer/config_shortAnimTime"
        android:duration="@android:integer/config_shortAnimTime"/>
</set>
+1 −0
Original line number Diff line number Diff line
@@ -1133,6 +1133,7 @@
  <!-- From android.policy -->
  <java-symbol type="anim" name="app_starting_exit" />
  <java-symbol type="anim" name="lock_screen_behind_enter" />
  <java-symbol type="anim" name="lock_screen_wallpaper_behind_enter" />
  <java-symbol type="anim" name="dock_top_enter" />
  <java-symbol type="anim" name="dock_top_exit" />
  <java-symbol type="anim" name="dock_bottom_enter" />
+4 −3
Original line number Diff line number Diff line
@@ -1628,9 +1628,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        return 0;
    }

    public Animation createForceHideEnterAnimation() {
        return AnimationUtils.loadAnimation(mContext,
                com.android.internal.R.anim.lock_screen_behind_enter);
    public Animation createForceHideEnterAnimation(boolean onWallpaper) {
        return AnimationUtils.loadAnimation(mContext, onWallpaper
                ? com.android.internal.R.anim.lock_screen_wallpaper_behind_enter
                : com.android.internal.R.anim.lock_screen_behind_enter);
    }
    
    static ITelephony getTelephonyService() {
Loading