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

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

Reduce camera launch time by about 250ms.

This reduces the amount of time available to the user to cancel
launching the camera in order to improve average launch time.

It also increases the threshhold for flings and motions to prevent
unintentional launches which are costly in terms of falsing.

Fixes bug b/11657355

Change-Id: I852abbe3ce8ddddcb65f3a48a2f8111d20126189
parent c641de01
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ package com.android.keyguard;
import android.content.Context;
import android.content.pm.PackageManager.NameNotFoundException;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.Rect;
import android.os.Handler;
@@ -41,7 +40,7 @@ public class CameraWidgetFrame extends KeyguardWidgetFrame implements View.OnCli
    private static final String TAG = CameraWidgetFrame.class.getSimpleName();
    private static final boolean DEBUG = KeyguardHostView.DEBUG;
    private static final int WIDGET_ANIMATION_DURATION = 250; // ms
    private static final int WIDGET_WAIT_DURATION = 650; // ms
    private static final int WIDGET_WAIT_DURATION = 400; // ms
    private static final int RECOVERY_DELAY = 1000; // ms

    interface Callbacks {
+3 −3
Original line number Diff line number Diff line
@@ -82,13 +82,13 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc

    private static final float RETURN_TO_ORIGINAL_PAGE_THRESHOLD = 0.33f;
    // The page is moved more than halfway, automatically move to the next page on touch up.
    private static final float SIGNIFICANT_MOVE_THRESHOLD = 0.4f;
    private static final float SIGNIFICANT_MOVE_THRESHOLD = 0.5f;

    // The following constants need to be scaled based on density. The scaled versions will be
    // assigned to the corresponding member variables below.
    private static final int FLING_THRESHOLD_VELOCITY = 500;
    private static final int FLING_THRESHOLD_VELOCITY = 1500;
    private static final int MIN_SNAP_VELOCITY = 1500;
    private static final int MIN_FLING_VELOCITY = 250;
    private static final int MIN_FLING_VELOCITY = 500;

    // We are disabling touch interaction of the widget region for factory ROM.
    private static final boolean DISABLE_TOUCH_INTERACTION = false;