Merge "Don't hide the mobile type id if it doesn't change" into pi-dev

This commit is contained in:
TreeHugger Robot
2018-04-05 22:22:41 +00:00
committed by Android (Google) Code Review
3 changed files with 9 additions and 18 deletions

View File

@@ -142,13 +142,15 @@ public class StatusBarMobileView extends AlphaOptimizedLinearLayout implements D
if (mState.strengthId != state.strengthId) { if (mState.strengthId != state.strengthId) {
mMobileDrawable.setLevel(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.setContentDescription(state.typeContentDescription);
mMobileType.setImageResource(state.typeId); mMobileType.setImageResource(state.typeId);
mMobileType.setVisibility(View.VISIBLE); mMobileType.setVisibility(View.VISIBLE);
} else { } else {
mMobileType.setVisibility(View.GONE); mMobileType.setVisibility(View.GONE);
} }
}
mMobileRoaming.setVisibility(state.roaming ? View.VISIBLE : View.GONE); mMobileRoaming.setVisibility(state.roaming ? View.VISIBLE : View.GONE);
mMobileRoamingSpace.setVisibility(state.roaming ? View.VISIBLE : View.GONE); mMobileRoamingSpace.setVisibility(state.roaming ? View.VISIBLE : View.GONE);

View File

@@ -306,17 +306,6 @@ public class StatusBarIconControllerImpl extends StatusBarIconList implements Tu
mIconGroups.forEach(l -> l.onSetIconHolder(viewIndex, holder)); 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 @Override
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
pw.println(TAG + " state:"); pw.println(TAG + " state:");

View File

@@ -414,7 +414,7 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba
@Override public String toString() { @Override public String toString() {
return "MobileIconState(subId=" + subId + ", strengthId=" + strengthId + ", roaming=" return "MobileIconState(subId=" + subId + ", strengthId=" + strengthId + ", roaming="
+ roaming + ", visible=" + visible + ")"; + roaming + ", typeId=" + typeId + ", visible=" + visible + ")";
} }
} }
} }