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

Commit cd2bad41 authored by Jim Miller's avatar Jim Miller
Browse files

Fix 5149726: Add slight delay to initial lock screen 'ping' animation.

This adds a slight delay before the first ping animation runs.  The
idea is to ensure enough time for the display to come on and the user
to notice the animation.

Change-Id: I3d981f5d50efa14683bb08cf6a1430244ce67e55
parent a8993e10
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ import com.android.internal.widget.WaveView;
import com.android.internal.widget.multiwaveview.MultiWaveView;

import android.app.ActivityManager;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
@@ -46,6 +45,7 @@ import java.io.File;
 */
class LockScreen extends LinearLayout implements KeyguardScreen {

    private static final int ON_RESUME_PING_DELAY = 500; // delay first ping until the screen is on
    private static final boolean DBG = false;
    private static final String TAG = "LockScreen";
    private static final String ENABLE_MENU_KEY_FILE = "/data/local/enable_menu_key";
@@ -441,10 +441,16 @@ class LockScreen extends LinearLayout implements KeyguardScreen {
        mUnlockWidgetMethods.reset(false);
    }

    private final Runnable mOnResumePing = new Runnable() {
        public void run() {
            mUnlockWidgetMethods.ping();
        }
    };

    /** {@inheritDoc} */
    public void onResume() {
        mStatusViewManager.onResume();
        mUnlockWidgetMethods.ping();
        postDelayed(mOnResumePing, ON_RESUME_PING_DELAY);
    }

    /** {@inheritDoc} */