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

Commit 2c64636a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes I8604c9d0,I436a3770,If89fd6d2,I6bad3e75 into nyc-mr1-dev

* changes:
  Escalate HeadsUp when dreaming starts
  Overflow number supports RTL layout
  Update contentDescription of the DismissView when locale changes
  Fixes a crash with a renderthread camera animation
parents e3a97853 99415394
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -141,6 +141,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
    private static final int MSG_SERVICE_STATE_CHANGE = 330;
    private static final int MSG_SCREEN_TURNED_ON = 331;
    private static final int MSG_SCREEN_TURNED_OFF = 332;
    private static final int MSG_DREAMING_STATE_CHANGED = 333;

    /** Fingerprint state: Not listening to fingerprint. */
    private static final int FINGERPRINT_STATE_STOPPED = 0;
@@ -293,6 +294,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
                    handleScreenTurnedOff();
                    Trace.endSection();
                    break;
                case MSG_DREAMING_STATE_CHANGED:
                    handleDreamingStateChanged(msg.arg1);
                    break;
            }
        }
    };
@@ -990,6 +994,17 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
        }
    }

    private void handleDreamingStateChanged(int dreamStart) {
        final int count = mCallbacks.size();
        boolean showingDream = dreamStart == 1;
        for (int i = 0; i < count; i++) {
            KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
            if (cb != null) {
                cb.onDreamingStateChanged(showingDream);
            }
        }
    }

    /**
     * IMPORTANT: Must be called from UI thread.
     */
@@ -1736,6 +1751,14 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
        mHandler.sendEmptyMessage(MSG_SCREEN_TURNED_OFF);
    }

    public void dispatchDreamingStarted() {
        mHandler.sendMessage(mHandler.obtainMessage(MSG_DREAMING_STATE_CHANGED, 1, 0));
    }

    public void dispatchDreamingStopped() {
        mHandler.sendMessage(mHandler.obtainMessage(MSG_DREAMING_STATE_CHANGED, 0, 0));
    }

    public boolean isDeviceInteractive() {
        return mDeviceInteractive;
    }
+6 −0
Original line number Diff line number Diff line
@@ -245,4 +245,10 @@ public class KeyguardUpdateMonitorCallback {
     * Called when the state whether we have a lockscreen wallpaper has changed.
     */
    public void onHasLockscreenWallpaperChanged(boolean hasLockscreenWallpaper) { }

    /**
     * Called when the dream's window state is changed.
     * @param dreaming true if the dream's window has been created and is visible
     */
    public void onDreamingStateChanged(boolean dreaming) { }
}
+2 −0
Original line number Diff line number Diff line
@@ -964,6 +964,7 @@ public class KeyguardViewMediator extends SystemUI {
     * if there is a secure lock pattern.
     */
    public void onDreamingStarted() {
        KeyguardUpdateMonitor.getInstance(mContext).dispatchDreamingStarted();
        synchronized (this) {
            if (mDeviceInteractive
                    && mLockPatternUtils.isSecure(KeyguardUpdateMonitor.getCurrentUser())) {
@@ -976,6 +977,7 @@ public class KeyguardViewMediator extends SystemUI {
     * A dream stopped.
     */
    public void onDreamingStopped() {
        KeyguardUpdateMonitor.getInstance(mContext).dispatchDreamingStopped();
        synchronized (this) {
            if (mDeviceInteractive) {
                cancelDoKeyguardLaterLocked();
+2 −0
Original line number Diff line number Diff line
@@ -56,6 +56,8 @@ public class DismissView extends StackScrollerDecorView {
    protected void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
        mDismissButton.setText(R.string.clear_all_notifications_text);
        mDismissButton.setContentDescription(
                mContext.getString(R.string.accessibility_clear_all));
    }

    public boolean isButtonVisible() {
+4 −1
Original line number Diff line number Diff line
@@ -174,7 +174,10 @@ public class KeyguardAffordanceView extends ImageView {

    private void drawBackgroundCircle(Canvas canvas) {
        if (mCircleRadius > 0 || mFinishing) {
            if (mFinishing && mSupportHardware) {
            if (mFinishing && mSupportHardware && mHwCenterX != null) {
                // Our hardware drawing proparties can be null if the finishing started but we have
                // never drawn before. In that case we are not doing a render thread animation
                // anyway, so we need to use the normal drawing.
                DisplayListCanvas displayListCanvas = (DisplayListCanvas) canvas;
                displayListCanvas.drawCircle(mHwCenterX, mHwCenterY, mHwCircleRadius,
                        mHwCirclePaint);
Loading