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

Commit 66ac1339 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Split status bar icon management into separate class

Change-Id: Iaacfcb70ff16d894287603d5fc6351598c7450d6
parent d26b16cb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -507,7 +507,6 @@ public abstract class BaseStatusBar extends SystemUI implements
                ServiceManager.checkService(DreamService.DREAM_SERVICE));
        mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);

        mSettingsObserver.onChange(false); // set up
        mContext.getContentResolver().registerContentObserver(
                Settings.Global.getUriFor(Settings.Global.DEVICE_PROVISIONED), true,
                mSettingsObserver);
@@ -557,6 +556,7 @@ public abstract class BaseStatusBar extends SystemUI implements

        createAndAddWindows();

        mSettingsObserver.onChange(false); // set up
        disable(switches[0], false /* animate */);
        setSystemUiVisibility(switches[1], 0xffffffff);
        topAppWindowChanged(switches[2] != 0);
+9 −0
Original line number Diff line number Diff line
@@ -147,6 +147,9 @@ public class StatusBarIconView extends AnimatedImageView {
    }

    private boolean updateDrawable(boolean withClear) {
        if (mIcon == null) {
            return false;
        }
        Drawable drawable = getIcon(mIcon);
        if (drawable == null) {
            Log.w(TAG, "No icon for slot " + mSlot);
@@ -225,6 +228,12 @@ public class StatusBarIconView extends AnimatedImageView {
        }
    }

    @Override
    public void onRtlPropertiesChanged(int layoutDirection) {
        super.onRtlPropertiesChanged(layoutDirection);
        updateDrawable();
    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
+20 −245

File changed.

Preview size limit exceeded, changes collapsed.

+250 −0

File added.

Preview size limit exceeded, changes collapsed.