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

Commit 34a53a0e authored by Roman Birg's avatar Roman Birg
Browse files

SystemUI: fix screentimeout tile icon disappearing



While going away from the detail view, sometimes it wasn't able to
refresh it's state, resulting in the icon not showing and then appearing
suddenly.

Ref: CYNGNOS-2056

Change-Id: I9a634cc4c774c78dc7316619db446f4ea6c2c79f
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
(cherry picked from commit f42b8b25)
parent ecff48fc
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -61,9 +61,6 @@ public class ScreenTimeoutTile extends QSTile<ScreenTimeoutTile.TimeoutState> {
            new AnimationIcon(R.drawable.ic_qs_screen_timeout_long_reverse_avd);

    private String[] mEntries, mValues;
    private boolean mShowingDetail;
    ArrayList<Integer> mAnimationList
            = new ArrayList<Integer>();

    public ScreenTimeoutTile(Host host) {
        super(host);
@@ -127,8 +124,6 @@ public class ScreenTimeoutTile extends QSTile<ScreenTimeoutTile.TimeoutState> {
    @Override
    protected void handleClick() {
        if (mEntries.length > 0) {
            mShowingDetail = true;
            mAnimationList.clear();
            showDetail(true);
        }
    }
@@ -190,10 +185,6 @@ public class ScreenTimeoutTile extends QSTile<ScreenTimeoutTile.TimeoutState> {
    }
    @Override
    protected void handleUpdateState(final TimeoutState state, Object arg) {
        if (mAnimationList.isEmpty() && mShowingDetail && arg == null) {
            return;
        }

        int newTimeout = getScreenTimeout();

        AnimationIcon d = null;
@@ -334,7 +325,6 @@ public class ScreenTimeoutTile extends QSTile<ScreenTimeoutTile.TimeoutState> {
                    mUiHandler.postDelayed(new Runnable() {
                        @Override
                        public void run() {
                            mShowingDetail = false;
                            refreshState(true);
                        }
                    }, 100);