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

Commit 4772df9b authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge changes from topic 'am-df9335a6e9af47daa7d783215f2af7d1'

* changes:
  Merge changes I8604c9d0,I436a3770,If89fd6d2,I6bad3e75 into nyc-mr1-dev am: 2c64636a am: 7c644e66 am: fc050be8
  Escalate HeadsUp when dreaming starts am: 99415394 am: 0234c7f1 am: 205e1053
  Overflow number supports RTL layout am: 09b7dea5 am: 327663f4 am: a435e282
  Update contentDescription of the DismissView when locale changes am: 68422fd1 am: 3e89d004 am: 93f3bc5f
  Fixes a crash with a renderthread camera animation am: 2c984f16 am: 0dc759ea am: 9223e86c
parents e2504bf4 0fb48970
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.
     */
@@ -1739,6 +1754,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
@@ -976,6 +976,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())) {
@@ -988,6 +989,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