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

Commit 1924328e authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Revert "SystemUI: Update navbar icon color for light mode"

This reverts commit b8db9249.
parent b8db9249
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -57,7 +57,6 @@ import android.app.Fragment;
import android.app.StatusBarManager;
import android.content.ContentResolver;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.database.ContentObserver;
import android.graphics.Color;
@@ -123,7 +122,6 @@ import com.android.keyguard.dagger.KeyguardStatusBarViewComponent;
import com.android.keyguard.dagger.KeyguardStatusViewComponent;
import com.android.keyguard.dagger.KeyguardUserSwitcherComponent;
import com.android.systemui.DejankUtils;
import com.android.systemui.Dependency;
import com.android.systemui.Dumpable;
import com.android.systemui.R;
import com.android.systemui.animation.ActivityLaunchAnimator;
@@ -209,7 +207,6 @@ import com.android.systemui.statusbar.phone.KeyguardBypassController;
import com.android.systemui.statusbar.phone.KeyguardClockPositionAlgorithm;
import com.android.systemui.statusbar.phone.KeyguardStatusBarView;
import com.android.systemui.statusbar.phone.KeyguardStatusBarViewController;
import com.android.systemui.statusbar.phone.LightBarController;
import com.android.systemui.statusbar.phone.LockscreenGestureLogger;
import com.android.systemui.statusbar.phone.LockscreenGestureLogger.LockscreenUiEvent;
import com.android.systemui.statusbar.phone.ScreenOffAnimationController;
@@ -403,7 +400,6 @@ public final class NotificationPanelViewController implements Dumpable {
    private FrameLayout mQsFrame;
    private final QsFrameTranslateController mQsFrameTranslateController;
    private KeyguardStatusViewController mKeyguardStatusViewController;
    private final LightBarController mLightBarController;
    private final LockIconViewController mLockIconViewController;
    private NotificationsQuickSettingsContainer mNotificationContainerParent;
    private final NotificationsQSContainerController mNotificationsQSContainerController;
@@ -958,7 +954,6 @@ public final class NotificationPanelViewController implements Dumpable {
        });
        mConversationNotificationManager = conversationNotificationManager;
        mAuthController = authController;
        mLightBarController = Dependency.get(LightBarController.class);
        mLockIconViewController = lockIconViewController;
        mScreenOffAnimationController = screenOffAnimationController;
        mUnlockedScreenOffAnimationController = unlockedScreenOffAnimationController;
@@ -3595,15 +3590,6 @@ public final class NotificationPanelViewController implements Dumpable {
        return mPanelExpanded;
    }

    private void updateNavColors(boolean expanded) {
        mLightBarController.setQsExpanded(expanded && !isNightMode());
    }

    private boolean isNightMode() {
        return (mView.getContext().getResources().getConfiguration().uiMode
                & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES;
    }

    private int calculatePanelHeightShade() {
        int emptyBottomMargin = mNotificationStackScrollLayoutController.getEmptyBottomMargin();
        int maxHeight = mNotificationStackScrollLayoutController.getHeight() - emptyBottomMargin;
@@ -5946,15 +5932,11 @@ public final class NotificationPanelViewController implements Dumpable {
            }
            mOpenCloseListener.onOpenStarted();
        }
        if ((state == STATE_OPEN && mCurrentPanelState != state)|| state == STATE_OPENING) {
            updateNavColors(true);
        }
        if (state == STATE_CLOSED) {
            setQsExpandImmediate(false);
            // Close the status bar in the next frame so we can show the end of the
            // animation.
            mView.post(mMaybeHideExpandedRunnable);
            updateNavColors(false);
        }
        mCurrentPanelState = state;
    }
+4 −17
Original line number Diff line number Diff line
@@ -83,8 +83,7 @@ public class LightBarController implements BatteryController.BatteryStateChangeC
     */
    private boolean mForceDarkForScrim;

    private boolean mQsCustomizing = false;
    private boolean mQsExpanded = false;
    private boolean mQsCustomizing;

    private boolean mDirectReplying;
    private boolean mNavbarColorManagedByIme;
@@ -157,9 +156,9 @@ public class LightBarController implements BatteryController.BatteryStateChangeC
            mHasLightNavigationBar = isLight(appearance, navigationBarMode,
                    APPEARANCE_LIGHT_NAVIGATION_BARS);
            mNavigationLight = mHasLightNavigationBar
                    && (mDirectReplying && mNavbarColorManagedByIme || !mForceDarkForScrim);
                    && (mDirectReplying && mNavbarColorManagedByIme || !mForceDarkForScrim)
                    && !mQsCustomizing;
            if (mNavigationLight != last) {
                mQsExpanded = false;
                updateNavigation();
            }
        }
@@ -182,19 +181,7 @@ public class LightBarController implements BatteryController.BatteryStateChangeC
    public void setQsCustomizing(boolean customizing) {
        if (mQsCustomizing == customizing) return;
        mQsCustomizing = customizing;
        if (mQsCustomizing) {
            setQsExpanded(true);
        }
    }

    public void setQsExpanded(boolean expanded) {
        if (mQsExpanded == expanded) return;
        mQsExpanded = expanded;

        if (mNavigationBarController != null
                && mNavigationBarController.supportsIconTintForNavMode(mNavigationMode)) {
            mNavigationBarController.setIconsDark(mQsExpanded, animateChange());
        }
        reevaluate();
    }

    /**