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

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

Merge changes I07dae5fb,Ibe0100bc

* changes:
  Tidy up PhoneStatusBar deeply nested Runnables
  [statusbar] Use the right settings observer
parents dd53dbfc a6f04afb
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -309,6 +309,7 @@ public abstract class BaseStatusBar extends SystemUI implements
            mUsersAllowingPrivateNotifications.clear();
            mUsersAllowingNotifications.clear();
            // ... and refresh all the notifications
            updateLockscreenNotificationSetting();
            updateNotifications();
        }
    };
@@ -714,7 +715,7 @@ public abstract class BaseStatusBar extends SystemUI implements
                mSettingsObserver);
        mContext.getContentResolver().registerContentObserver(
                Settings.Secure.getUriFor(Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS), false,
                mSettingsObserver,
                mLockscreenSettingsObserver,
                UserHandle.USER_ALL);
        if (ENABLE_LOCK_SCREEN_ALLOW_REMOTE_INPUT) {
            mContext.getContentResolver().registerContentObserver(
+39 −36
Original line number Diff line number Diff line
@@ -4664,11 +4664,20 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
            final Runnable clickPendingViewRunnable = new Runnable() {
                @Override
                public void run() {
                    if (mPendingWorkRemoteInputView != null) {
                    final View pendingWorkRemoteInputView = mPendingWorkRemoteInputView;
                    if (pendingWorkRemoteInputView == null) {
                        return;
                    }

                    // Climb up the hierarchy until we get to the container for this row.
                    ViewParent p = pendingWorkRemoteInputView.getParent();
                        while (p != null) {
                            if (p instanceof ExpandableNotificationRow) {
                    while (!(p instanceof ExpandableNotificationRow)) {
                        if (p == null) {
                            return;
                        }
                        p = p.getParent();
                    }

                    final ExpandableNotificationRow row = (ExpandableNotificationRow) p;
                    ViewParent viewParent = row.getParent();
                    if (viewParent instanceof NotificationStackScrollLayout) {
@@ -4678,8 +4687,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
                        row.post(new Runnable() {
                            @Override
                            public void run() {
                                            final Runnable finishScrollingCallback = new Runnable()
                                            {
                                final Runnable finishScrollingCallback = new Runnable() {
                                    @Override
                                    public void run() {
                                        mPendingWorkRemoteInputView.callOnClick();
@@ -4698,11 +4706,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
                            }
                        });
                    }
                                break;
                            }
                            p = p.getParent();
                        }
                    }
                }
            };
            mNotificationPanel.getViewTreeObserver().addOnGlobalLayoutListener(