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

Commit 4909ce0f authored by Roman Birg's avatar Roman Birg
Browse files

SystemUI: update quick tile animations and icons



Use new AnimationIcons and ResourceIcon classes added with 5.1

Change-Id: Ib904ac0cda2a2787f960893a3434cf21f392af3b
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent b9d1fd10
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -71,11 +71,11 @@ public class AdbOverNetworkTile extends QSTile<QSTile.BooleanState> {
                // if wifiInfo is null, set the label without host address
                state.label = mContext.getString(R.string.quick_settings_network_adb_label);
            }
            state.iconId = R.drawable.ic_qs_network_adb_on;
            state.icon = ResourceIcon.get(R.drawable.ic_qs_network_adb_on);
        } else {
            // Otherwise set the label and disabled icon
            state.label = mContext.getString(R.string.quick_settings_network_adb_label);
            state.iconId = R.drawable.ic_qs_network_adb_off;
            state.icon = ResourceIcon.get(R.drawable.ic_qs_network_adb_off);
        }
    }

+2 −2
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ public class CompassTile extends QSTile<QSTile.BooleanState> implements SensorEv
        state.value = mActive;

        if (state.value) {
            state.iconId = R.drawable.ic_qs_compass_on;
            state.icon = ResourceIcon.get(R.drawable.ic_qs_compass_on);
            if (arg != null) {
                state.label = formatValueWithCardinalDirection(degrees);

@@ -112,7 +112,7 @@ public class CompassTile extends QSTile<QSTile.BooleanState> implements SensorEv
                mImage.setRotation(0);
            }
        } else {
            state.iconId = R.drawable.ic_qs_compass_off;
            state.icon = ResourceIcon.get(R.drawable.ic_qs_compass_off);
            state.label = mContext.getString(R.string.quick_settings_compass_label);
            mImage.setRotation(0);
        }
+3 −3
Original line number Diff line number Diff line
@@ -108,9 +108,9 @@ public class LockscreenToggleTile extends QSTile<QSTile.BooleanState>
        state.label = mContext.getString(lockscreenEnforced
                ? R.string.quick_settings_lockscreen_label_enforced
                : R.string.quick_settings_lockscreen_label);
        state.iconId = lockscreenEnabled
                ? R.drawable.ic_qs_lock_screen_on
                : R.drawable.ic_qs_lock_screen_off;
        state.icon = lockscreenEnabled
                ? ResourceIcon.get(R.drawable.ic_qs_lock_screen_on)
                : ResourceIcon.get(R.drawable.ic_qs_lock_screen_off);
    }

    @Override
+2 −2
Original line number Diff line number Diff line
@@ -76,11 +76,11 @@ public class LteTile extends QSTile<QSTile.BooleanState> {
            case Phone.NT_MODE_TD_SCDMA_GSM_WCDMA_LTE:
            case Phone.NT_MODE_TD_SCDMA_WCDMA_LTE:
                state.visible = true;
                state.iconId = R.drawable.ic_qs_lte_on;
                state.icon = ResourceIcon.get(R.drawable.ic_qs_lte_on);
                break;
            default:
                state.visible = true;
                state.iconId = R.drawable.ic_qs_lte_off;
                state.icon = ResourceIcon.get(R.drawable.ic_qs_lte_off);
                break;
        }
    }
+2 −1
Original line number Diff line number Diff line
@@ -94,7 +94,8 @@ public class NfcTile extends QSTile<QSTile.BooleanState> {
        }
        state.visible = mNfcAdapter != null;
        state.value = mNfcAdapter != null && isEnabled();
        state.iconId = state.value ? R.drawable.ic_qs_nfc_on : R.drawable.ic_qs_nfc_off;
        state.icon = state.value ? ResourceIcon.get(R.drawable.ic_qs_nfc_on)
                : ResourceIcon.get(R.drawable.ic_qs_nfc_off);
        state.label = mContext.getString(R.string.quick_settings_nfc_label);
    }

Loading