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

Commit e62d6874 authored by Kshitij's avatar Kshitij
Browse files

chore: PhoneStatusBarView: Address CR

- Drop useless comments
- Move BLISS_LAUNCHER_DOCK_WIDTH to appropriate section
- Rename LAUNCHER_DOCK_WIDTH to BLISS_LAUNCHER_DOCK_WIDTH
parent fb3fac02
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@ import java.util.Objects;

public class PhoneStatusBarView extends FrameLayout implements Callbacks {
    private static final String TAG = "PhoneStatusBarView";
    private static final String BLISS_LAUNCHER_DOCK_WIDTH = "bliss_launcher_dock_width";
    private final CommandQueue mCommandQueue;
    private final StatusBarContentInsetsProvider mContentInsetsProvider;
    private final StatusBarWindowController mStatusBarWindowController;
@@ -103,7 +104,6 @@ public class PhoneStatusBarView extends FrameLayout implements Callbacks {
     */
    private int mCutoutSideNudge = 0;

    private static final String LAUNCHER_DOCK_WIDTH = "launcher_dock_width";
    private String mPreviousApp;
    private IActivityTaskManager mActivityTaskManager;
    private Handler mHandler = new Handler(Looper.getMainLooper());
@@ -161,17 +161,16 @@ public class PhoneStatusBarView extends FrameLayout implements Callbacks {
                    () -> getDisplay().getRotation());
            mRotationButtonController.setRotationButton(floatingRotationButton, null);
        }
        // Make a listener
        ContentObserver observer = new ContentObserver(new Handler()) {
            @Override
            public void onChange(boolean selfChange, Uri uri) {
                if (uri.equals(Settings.Secure.getUriFor(LAUNCHER_DOCK_WIDTH))) {
                if (uri.equals(Settings.Secure.getUriFor(BLISS_LAUNCHER_DOCK_WIDTH))) {
                    updateStatusBarHeight();
                }
            }
        };
        context.getContentResolver().registerContentObserver(
                        Settings.Secure.getUriFor(LAUNCHER_DOCK_WIDTH), false, observer, UserHandle.USER_ALL);
                        Settings.Secure.getUriFor(BLISS_LAUNCHER_DOCK_WIDTH), false, observer, UserHandle.USER_ALL);

        try {
            mActivityTaskManager = ActivityTaskManager.getService();
@@ -402,7 +401,7 @@ public class PhoneStatusBarView extends FrameLayout implements Callbacks {
            homePackageName = resolveInfo.activityInfo.packageName;
            isHomePackage = getForegroundApp().equals(homePackageName);
        }
        int dockWidth = !isHomePackage ? 0 : Settings.Secure.getInt(getContext().getContentResolver(), LAUNCHER_DOCK_WIDTH, 0);
        int dockWidth = !isHomePackage ? 0 : Settings.Secure.getInt(getContext().getContentResolver(), BLISS_LAUNCHER_DOCK_WIDTH, 0);

        findViewById(R.id.status_bar_contents).setPaddingRelative(
                statusBarPaddingStart + (mRotationOrientation == RotationUtils.ROTATION_SEASCAPE ? dockWidth : 0),