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

Commit 4a7db959 authored by Evan Laird's avatar Evan Laird
Browse files

Show No SIM icon in QS when there is no SIM

Before we were just showing the greyed out full signal triangle and
that's confusing.

Change-Id: Id6bac421f9192cbfe3a6d4389120832fb91e9966
Fixes: 64755132
Test: Remove/add SIM card; visual
parent 70f7bc45
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
<!--
Copyright (C) 2014 The Android Open Source Project
Copyright (C) 2017 The Android Open Source Project

   Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -16,10 +16,14 @@ Copyright (C) 2014 The Android Open Source Project
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="32dp"
        android:height="32dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0">
        android:viewportWidth="18.4"
        android:viewportHeight="18.4">

    <group
        android:translateX="0.7"
        android:translateY="1.0">
        <path
            android:fillColor="#FFFFFFFF"
        android:pathData="M19.0,5.0c0.0,-1.1 -0.9,-2.0 -2.0,-2.0l-7.0,0.0L7.7,5.3L19.0,16.7L19.0,5.0zM3.7,3.9L2.4,5.2L5.0,7.8L5.0,19.0c0.0,1.1 0.9,2.0 2.0,2.0l10.0,0.0c0.4,0.0 0.7,-0.1 1.0,-0.3l1.9,1.9l1.3,-1.3L3.7,3.9z"/>
            android:pathData="M13.91,11.84L5.14,3.08l1.81,-1.81h5.41c0.85,0 1.54,0.69 1.54,1.54l0.01,9.03zM15.06,14.95L2.54,2.44c-0.28,-0.28 -0.71,-0.28 -0.99,0s-0.28,0.71 0,0.98l1.53,1.53v8.67c0,0.85 0.69,1.54 1.54,1.54h7.74c0.27,0 0.52,-0.07 0.74,-0.2l0.96,0.96c0.28,0.28 0.71,0.28 0.99,0 0.28,-0.26 0.28,-0.69 0.01,-0.97z"/>
    </group>
</vector>
+4 −1
Original line number Diff line number Diff line
@@ -44,7 +44,10 @@ public class CellTileView extends SignalTileView {
    }

    protected void updateIcon(ImageView iv, State state) {
        if (!Objects.equals(state.icon, iv.getTag(R.id.qs_icon_tag))) {
        if (!(state.icon instanceof SignalIcon)) {
            super.updateIcon(iv, state);
            return;
        } else if (!Objects.equals(state.icon, iv.getTag(R.id.qs_icon_tag))) {
            mSignalDrawable.setLevel(((SignalIcon) state.icon).getState());
            iv.setImageDrawable(mSignalDrawable);
            iv.setTag(R.id.qs_icon_tag, state.icon);
+7 −2
Original line number Diff line number Diff line
@@ -183,8 +183,13 @@ public class CellularTile extends QSTileImpl<SignalState> {
        state.value = mDataController.isMobileDataSupported()
                && mDataController.isMobileDataEnabled();

        if (cb.noSim) {
            state.icon = ResourceIcon.get(R.drawable.ic_qs_no_sim);
        } else {
            state.icon = new SignalIcon(cb.mobileSignalIconId);
        if (cb.airplaneModeEnabled) {
        }

        if (cb.airplaneModeEnabled | cb.noSim) {
            state.state = Tile.STATE_INACTIVE;
        } else {
            state.state = Tile.STATE_ACTIVE;