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

Commit 6dedbe6a authored by Evan Laird's avatar Evan Laird
Browse files

Don't hide the mobile type id if it doesn't change

_Someone_ thought it would be a good idea to hide the mobile type
indicator if it hadn't changed from the last state. Better to not do
that.

Also removed an unused method in StatusBarIconControllerImpl.

Test: Reboot device with wifi off; data type indicator should show up
eventually; i.e., visual
Fixes: 77581445

Change-Id: I47a0c868b0e332c11e206b8c043a532bcbf10130
parent 2edaf624
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -142,13 +142,15 @@ public class StatusBarMobileView extends AlphaOptimizedLinearLayout implements D
        if (mState.strengthId != state.strengthId) {
            mMobileDrawable.setLevel(state.strengthId);
        }
        if (mState.typeId != state.typeId && state.typeId != 0) {
        if (mState.typeId != state.typeId) {
            if (state.typeId != 0) {
                mMobileType.setContentDescription(state.typeContentDescription);
                mMobileType.setImageResource(state.typeId);
                mMobileType.setVisibility(View.VISIBLE);
            } else {
                mMobileType.setVisibility(View.GONE);
            }
        }

        mMobileRoaming.setVisibility(state.roaming ? View.VISIBLE : View.GONE);
        mMobileRoamingSpace.setVisibility(state.roaming ? View.VISIBLE : View.GONE);
+0 −11
Original line number Diff line number Diff line
@@ -306,17 +306,6 @@ public class StatusBarIconControllerImpl extends StatusBarIconList implements Tu
        mIconGroups.forEach(l -> l.onSetIconHolder(viewIndex, holder));
    }

    /**
     * For mobile essentially (an array of holders in one slot)
     */
    private void handleSet(int slotIndex, List<StatusBarIconHolder> holders) {
        for (StatusBarIconHolder holder : holders) {
            int viewIndex = getViewIndex(slotIndex, holder.getTag());
            mIconLogger.onIconVisibility(getSlotName(slotIndex), holder.isVisible());
            mIconGroups.forEach(l -> l.onSetIconHolder(viewIndex, holder));
        }
    }

    @Override
    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        pw.println(TAG + " state:");
+1 −1
Original line number Diff line number Diff line
@@ -414,7 +414,7 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba

        @Override public String toString() {
            return "MobileIconState(subId=" + subId + ", strengthId=" + strengthId + ", roaming="
                    + roaming + ", visible=" + visible + ")";
                    + roaming + ", typeId=" + typeId + ", visible=" + visible + ")";
        }
    }
}