[Sb refactor] Remove mobile flags
Removes NEW_STATUS_BAR_MOBILE_ICONS and NEW_STATUS_BAR_MOBILE_ICONS_BACKEND, which are now permanently on. Test: manual Test: atest SystemUITests SystemUIGoogleTests Fixes: 256614753 Fixes: 256614751 Change-Id: I0e71eea9a6ec3967565f9b03b697e87024b16404
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
**
|
||||
** Copyright 2018, 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.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
-->
|
||||
<com.android.systemui.statusbar.StatusBarMobileView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/mobile_combo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical" >
|
||||
|
||||
<include layout="@layout/status_bar_mobile_signal_group_inner" />
|
||||
|
||||
</com.android.systemui.statusbar.StatusBarMobileView>
|
||||
|
||||
@@ -362,13 +362,6 @@ object Flags {
|
||||
|
||||
// 600- status bar
|
||||
|
||||
// TODO(b/256614753): Tracking Bug
|
||||
val NEW_STATUS_BAR_MOBILE_ICONS = releasedFlag(606, "new_status_bar_mobile_icons")
|
||||
|
||||
// TODO(b/256614751): Tracking Bug
|
||||
val NEW_STATUS_BAR_MOBILE_ICONS_BACKEND =
|
||||
unreleasedFlag(608, "new_status_bar_mobile_icons_backend", teamfood = true)
|
||||
|
||||
|
||||
// TODO(b/265892345): Tracking Bug
|
||||
val PLUG_IN_STATUS_BAR_CHIP = releasedFlag(265892345, "plug_in_status_bar_chip")
|
||||
|
||||
@@ -21,11 +21,12 @@ import android.widget.FrameLayout
|
||||
|
||||
/**
|
||||
* A temporary base class that's shared between our old status bar connectivity view implementations
|
||||
* ([StatusBarMobileView]) and our new status bar implementations ([ModernStatusBarWifiView],
|
||||
* [ModernStatusBarMobileView]).
|
||||
* and our new status bar implementations ([ModernStatusBarWifiView], [ModernStatusBarMobileView]).
|
||||
*
|
||||
* Once our refactor is over, we should be able to delete this go-between class and the old view
|
||||
* class.
|
||||
*
|
||||
* NOTE: the old classes are now deleted, and this class can be removed.
|
||||
*/
|
||||
abstract class BaseStatusBarFrameLayout
|
||||
@JvmOverloads
|
||||
|
||||
@@ -1,327 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2018 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.systemui.statusbar;
|
||||
|
||||
import static com.android.systemui.plugins.DarkIconDispatcher.getTint;
|
||||
import static com.android.systemui.plugins.DarkIconDispatcher.isInAreas;
|
||||
import static com.android.systemui.statusbar.StatusBarIconView.STATE_DOT;
|
||||
import static com.android.systemui.statusbar.StatusBarIconView.STATE_HIDDEN;
|
||||
import static com.android.systemui.statusbar.StatusBarIconView.STATE_ICON;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.Rect;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.settingslib.graph.SignalDrawable;
|
||||
import com.android.systemui.DualToneHandler;
|
||||
import com.android.systemui.R;
|
||||
import com.android.systemui.plugins.DarkIconDispatcher.DarkReceiver;
|
||||
import com.android.systemui.statusbar.phone.StatusBarIconController;
|
||||
import com.android.systemui.statusbar.phone.StatusBarSignalPolicy.MobileIconState;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* View group for the mobile icon in the status bar
|
||||
*/
|
||||
public class StatusBarMobileView extends BaseStatusBarFrameLayout implements DarkReceiver,
|
||||
StatusIconDisplayable {
|
||||
private static final String TAG = "StatusBarMobileView";
|
||||
|
||||
/// Used to show etc dots
|
||||
private StatusBarIconView mDotView;
|
||||
/// The main icon view
|
||||
private LinearLayout mMobileGroup;
|
||||
private String mSlot;
|
||||
private MobileIconState mState;
|
||||
private SignalDrawable mMobileDrawable;
|
||||
private View mInoutContainer;
|
||||
private ImageView mIn;
|
||||
private ImageView mOut;
|
||||
private ImageView mMobile, mMobileType, mMobileRoaming;
|
||||
private View mMobileRoamingSpace;
|
||||
@StatusBarIconView.VisibleState
|
||||
private int mVisibleState = STATE_HIDDEN;
|
||||
private DualToneHandler mDualToneHandler;
|
||||
private boolean mForceHidden;
|
||||
|
||||
/**
|
||||
* Designated constructor
|
||||
*
|
||||
* This view is special, in that it is the only view in SystemUI that allows for a configuration
|
||||
* override on a MCC/MNC-basis. This means that for every mobile view inflated, we have to
|
||||
* construct a context with that override, since the resource system doesn't have a way to
|
||||
* handle this for us.
|
||||
*
|
||||
* @param context A context with resources configured by MCC/MNC
|
||||
* @param slot The string key defining which slot this icon refers to. Always "mobile" for the
|
||||
* mobile icon
|
||||
*/
|
||||
public static StatusBarMobileView fromContext(
|
||||
Context context,
|
||||
String slot
|
||||
) {
|
||||
LayoutInflater inflater = LayoutInflater.from(context);
|
||||
StatusBarMobileView v = (StatusBarMobileView)
|
||||
inflater.inflate(R.layout.status_bar_mobile_signal_group, null);
|
||||
v.setSlot(slot);
|
||||
v.init();
|
||||
v.setVisibleState(STATE_ICON);
|
||||
return v;
|
||||
}
|
||||
|
||||
public StatusBarMobileView(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public StatusBarMobileView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public StatusBarMobileView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getDrawingRect(Rect outRect) {
|
||||
super.getDrawingRect(outRect);
|
||||
float translationX = getTranslationX();
|
||||
float translationY = getTranslationY();
|
||||
outRect.left += translationX;
|
||||
outRect.right += translationX;
|
||||
outRect.top += translationY;
|
||||
outRect.bottom += translationY;
|
||||
}
|
||||
|
||||
private void init() {
|
||||
mDualToneHandler = new DualToneHandler(getContext());
|
||||
mMobileGroup = findViewById(R.id.mobile_group);
|
||||
mMobile = findViewById(R.id.mobile_signal);
|
||||
mMobileType = findViewById(R.id.mobile_type);
|
||||
mMobileRoaming = findViewById(R.id.mobile_roaming);
|
||||
mMobileRoamingSpace = findViewById(R.id.mobile_roaming_space);
|
||||
mIn = findViewById(R.id.mobile_in);
|
||||
mOut = findViewById(R.id.mobile_out);
|
||||
mInoutContainer = findViewById(R.id.inout_container);
|
||||
|
||||
mMobileDrawable = new SignalDrawable(getContext());
|
||||
mMobile.setImageDrawable(mMobileDrawable);
|
||||
|
||||
initDotView();
|
||||
}
|
||||
|
||||
private void initDotView() {
|
||||
mDotView = new StatusBarIconView(mContext, mSlot, null);
|
||||
mDotView.setVisibleState(STATE_DOT);
|
||||
|
||||
int width = mContext.getResources().getDimensionPixelSize(R.dimen.status_bar_icon_size_sp);
|
||||
LayoutParams lp = new LayoutParams(width, width);
|
||||
lp.gravity = Gravity.CENTER_VERTICAL | Gravity.START;
|
||||
addView(mDotView, lp);
|
||||
}
|
||||
|
||||
public void applyMobileState(MobileIconState state) {
|
||||
boolean requestLayout = false;
|
||||
if (state == null) {
|
||||
requestLayout = getVisibility() != View.GONE;
|
||||
setVisibility(View.GONE);
|
||||
mState = null;
|
||||
} else if (mState == null) {
|
||||
requestLayout = true;
|
||||
mState = state.copy();
|
||||
initViewState();
|
||||
} else if (!mState.equals(state)) {
|
||||
requestLayout = updateState(state.copy());
|
||||
}
|
||||
|
||||
if (requestLayout) {
|
||||
requestLayout();
|
||||
}
|
||||
}
|
||||
|
||||
private void initViewState() {
|
||||
setContentDescription(mState.contentDescription);
|
||||
if (!mState.visible || mForceHidden) {
|
||||
mMobileGroup.setVisibility(View.GONE);
|
||||
} else {
|
||||
mMobileGroup.setVisibility(View.VISIBLE);
|
||||
}
|
||||
mMobileDrawable.setLevel(mState.strengthId);
|
||||
if (mState.typeId > 0) {
|
||||
mMobileType.setContentDescription(mState.typeContentDescription);
|
||||
mMobileType.setImageResource(mState.typeId);
|
||||
mMobileType.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mMobileType.setVisibility(View.GONE);
|
||||
}
|
||||
mMobile.setVisibility(mState.showTriangle ? View.VISIBLE : View.GONE);
|
||||
mMobileRoaming.setVisibility(mState.roaming ? View.VISIBLE : View.GONE);
|
||||
mMobileRoamingSpace.setVisibility(mState.roaming ? View.VISIBLE : View.GONE);
|
||||
mIn.setVisibility(mState.activityIn ? View.VISIBLE : View.GONE);
|
||||
mOut.setVisibility(mState.activityOut ? View.VISIBLE : View.GONE);
|
||||
mInoutContainer.setVisibility((mState.activityIn || mState.activityOut)
|
||||
? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
private boolean updateState(MobileIconState state) {
|
||||
boolean needsLayout = false;
|
||||
|
||||
setContentDescription(state.contentDescription);
|
||||
int newVisibility = state.visible && !mForceHidden ? View.VISIBLE : View.GONE;
|
||||
if (newVisibility != mMobileGroup.getVisibility() && STATE_ICON == mVisibleState) {
|
||||
mMobileGroup.setVisibility(newVisibility);
|
||||
needsLayout = true;
|
||||
}
|
||||
if (mState.strengthId != state.strengthId) {
|
||||
mMobileDrawable.setLevel(state.strengthId);
|
||||
}
|
||||
if (mState.typeId != state.typeId) {
|
||||
needsLayout |= state.typeId == 0 || mState.typeId == 0;
|
||||
if (state.typeId != 0) {
|
||||
mMobileType.setContentDescription(state.typeContentDescription);
|
||||
mMobileType.setImageResource(state.typeId);
|
||||
mMobileType.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mMobileType.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
mMobile.setVisibility(state.showTriangle ? View.VISIBLE : View.GONE);
|
||||
mMobileRoaming.setVisibility(state.roaming ? View.VISIBLE : View.GONE);
|
||||
mMobileRoamingSpace.setVisibility(state.roaming ? View.VISIBLE : View.GONE);
|
||||
mIn.setVisibility(state.activityIn ? View.VISIBLE : View.GONE);
|
||||
mOut.setVisibility(state.activityOut ? View.VISIBLE : View.GONE);
|
||||
mInoutContainer.setVisibility((state.activityIn || state.activityOut)
|
||||
? View.VISIBLE : View.GONE);
|
||||
|
||||
needsLayout |= state.roaming != mState.roaming
|
||||
|| state.activityIn != mState.activityIn
|
||||
|| state.activityOut != mState.activityOut
|
||||
|| state.showTriangle != mState.showTriangle;
|
||||
|
||||
mState = state;
|
||||
return needsLayout;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDarkChanged(ArrayList<Rect> areas, float darkIntensity, int tint) {
|
||||
float intensity = isInAreas(areas, this) ? darkIntensity : 0;
|
||||
mMobileDrawable.setTintList(
|
||||
ColorStateList.valueOf(mDualToneHandler.getSingleColor(intensity)));
|
||||
ColorStateList color = ColorStateList.valueOf(getTint(areas, this, tint));
|
||||
mIn.setImageTintList(color);
|
||||
mOut.setImageTintList(color);
|
||||
mMobileType.setImageTintList(color);
|
||||
mMobileRoaming.setImageTintList(color);
|
||||
mDotView.setDecorColor(tint);
|
||||
mDotView.setIconColor(tint, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSlot() {
|
||||
return mSlot;
|
||||
}
|
||||
|
||||
public void setSlot(String slot) {
|
||||
mSlot = slot;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStaticDrawableColor(int color) {
|
||||
ColorStateList list = ColorStateList.valueOf(color);
|
||||
mMobileDrawable.setTintList(list);
|
||||
mIn.setImageTintList(list);
|
||||
mOut.setImageTintList(list);
|
||||
mMobileType.setImageTintList(list);
|
||||
mMobileRoaming.setImageTintList(list);
|
||||
mDotView.setDecorColor(color);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDecorColor(int color) {
|
||||
mDotView.setDecorColor(color);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isIconVisible() {
|
||||
return mState.visible && !mForceHidden;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVisibleState(@StatusBarIconView.VisibleState int state, boolean animate) {
|
||||
if (state == mVisibleState) {
|
||||
return;
|
||||
}
|
||||
|
||||
mVisibleState = state;
|
||||
switch (state) {
|
||||
case STATE_ICON:
|
||||
mMobileGroup.setVisibility(View.VISIBLE);
|
||||
mDotView.setVisibility(View.GONE);
|
||||
break;
|
||||
case STATE_DOT:
|
||||
mMobileGroup.setVisibility(View.INVISIBLE);
|
||||
mDotView.setVisibility(View.VISIBLE);
|
||||
break;
|
||||
case STATE_HIDDEN:
|
||||
default:
|
||||
mMobileGroup.setVisibility(View.INVISIBLE);
|
||||
mDotView.setVisibility(View.INVISIBLE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Forces the state to be hidden (views will be GONE) and if necessary updates the layout.
|
||||
*
|
||||
* Makes sure that the {@link StatusBarIconController} cannot make it visible while this flag
|
||||
* is enabled.
|
||||
* @param forceHidden {@code true} if the icon should be GONE in its view regardless of its
|
||||
* state.
|
||||
* {@code false} if the icon should show as determined by its controller.
|
||||
*/
|
||||
public void forceHidden(boolean forceHidden) {
|
||||
if (mForceHidden != forceHidden) {
|
||||
mForceHidden = forceHidden;
|
||||
updateState(mState);
|
||||
requestLayout();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@StatusBarIconView.VisibleState
|
||||
public int getVisibleState() {
|
||||
return mVisibleState;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public MobileIconState getState() {
|
||||
return mState;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "StatusBarMobileView(slot=" + mSlot + " state=" + mState + ")";
|
||||
}
|
||||
}
|
||||
@@ -1282,7 +1282,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
||||
}
|
||||
}
|
||||
String sims = args.getString("sims");
|
||||
if (sims != null && !mStatusBarPipelineFlags.useNewMobileIcons()) {
|
||||
if (sims != null) {
|
||||
int num = MathUtils.constrain(Integer.parseInt(sims), 1, 8);
|
||||
List<SubscriptionInfo> subs = new ArrayList<>();
|
||||
if (num != mMobileSignalControllers.size()) {
|
||||
@@ -1305,7 +1305,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
||||
mCallbackHandler.setNoSims(mHasNoSubs, mSimDetected);
|
||||
}
|
||||
String mobile = args.getString("mobile");
|
||||
if (mobile != null && !mStatusBarPipelineFlags.useNewMobileIcons()) {
|
||||
if (mobile != null) {
|
||||
boolean show = mobile.equals("show");
|
||||
String datatype = args.getString("datatype");
|
||||
String slotString = args.getString("slot");
|
||||
@@ -1390,7 +1390,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
||||
controller.notifyListeners();
|
||||
}
|
||||
String carrierNetworkChange = args.getString("carriernetworkchange");
|
||||
if (carrierNetworkChange != null && !mStatusBarPipelineFlags.useNewMobileIcons()) {
|
||||
if (carrierNetworkChange != null) {
|
||||
boolean show = carrierNetworkChange.equals("show");
|
||||
for (int i = 0; i < mMobileSignalControllers.size(); i++) {
|
||||
MobileSignalController controller = mMobileSignalControllers.valueAt(i);
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package com.android.systemui.statusbar.phone;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Icon;
|
||||
import android.os.Bundle;
|
||||
@@ -34,10 +33,7 @@ import com.android.systemui.demomode.DemoMode;
|
||||
import com.android.systemui.plugins.DarkIconDispatcher;
|
||||
import com.android.systemui.plugins.DarkIconDispatcher.DarkReceiver;
|
||||
import com.android.systemui.statusbar.StatusBarIconView;
|
||||
import com.android.systemui.statusbar.StatusBarMobileView;
|
||||
import com.android.systemui.statusbar.StatusIconDisplayable;
|
||||
import com.android.systemui.statusbar.connectivity.ui.MobileContextProvider;
|
||||
import com.android.systemui.statusbar.phone.StatusBarSignalPolicy.MobileIconState;
|
||||
import com.android.systemui.statusbar.pipeline.mobile.ui.MobileViewLogger;
|
||||
import com.android.systemui.statusbar.pipeline.mobile.ui.view.ModernStatusBarMobileView;
|
||||
import com.android.systemui.statusbar.pipeline.mobile.ui.viewmodel.MobileIconsViewModel;
|
||||
@@ -52,7 +48,6 @@ public class DemoStatusIcons extends StatusIconContainer implements DemoMode, Da
|
||||
private static final String TAG = "DemoStatusIcons";
|
||||
|
||||
private final LinearLayout mStatusIcons;
|
||||
private final ArrayList<StatusBarMobileView> mMobileViews = new ArrayList<>();
|
||||
private final ArrayList<ModernStatusBarMobileView> mModernMobileViews = new ArrayList<>();
|
||||
private final int mIconSize;
|
||||
|
||||
@@ -91,7 +86,6 @@ public class DemoStatusIcons extends StatusIconContainer implements DemoMode, Da
|
||||
}
|
||||
|
||||
public void remove() {
|
||||
mMobileViews.clear();
|
||||
((ViewGroup) getParent()).removeView(this);
|
||||
}
|
||||
|
||||
@@ -127,7 +121,6 @@ public class DemoStatusIcons extends StatusIconContainer implements DemoMode, Da
|
||||
mDemoMode = false;
|
||||
mStatusIcons.setVisibility(View.VISIBLE);
|
||||
mModernMobileViews.clear();
|
||||
mMobileViews.clear();
|
||||
setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@@ -235,22 +228,6 @@ public class DemoStatusIcons extends StatusIconContainer implements DemoMode, Da
|
||||
addView(v, 0, createLayoutParams());
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new mobile icon view
|
||||
*/
|
||||
public void addMobileView(MobileIconState state, Context mobileContext) {
|
||||
Log.d(TAG, "addMobileView: ");
|
||||
StatusBarMobileView view = StatusBarMobileView
|
||||
.fromContext(mobileContext, state.slot);
|
||||
|
||||
view.applyMobileState(state);
|
||||
view.setStaticDrawableColor(mColor);
|
||||
|
||||
// mobile always goes at the end
|
||||
mMobileViews.add(view);
|
||||
addView(view, getChildCount(), createLayoutParams());
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a {@link ModernStatusBarMobileView}
|
||||
* @param mobileContext possibly mcc/mnc overridden mobile context
|
||||
@@ -285,8 +262,7 @@ public class DemoStatusIcons extends StatusIconContainer implements DemoMode, Da
|
||||
// If we have mobile views, put wifi before them
|
||||
for (int i = 0; i < getChildCount(); i++) {
|
||||
View child = getChildAt(i);
|
||||
if (child instanceof StatusBarMobileView
|
||||
|| child instanceof ModernStatusBarMobileView) {
|
||||
if (child instanceof ModernStatusBarMobileView) {
|
||||
viewIndex = i;
|
||||
break;
|
||||
}
|
||||
@@ -297,26 +273,6 @@ public class DemoStatusIcons extends StatusIconContainer implements DemoMode, Da
|
||||
addView(view, viewIndex, createLayoutParams());
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply an update to a mobile icon view for the given {@link MobileIconState}. For
|
||||
* compatibility with {@link MobileContextProvider}, we have to recreate the view every time we
|
||||
* update it, since the context (and thus the {@link Configuration}) may have changed
|
||||
*/
|
||||
public void updateMobileState(MobileIconState state, Context mobileContext) {
|
||||
Log.d(TAG, "updateMobileState: " + state);
|
||||
|
||||
// The mobile config provided by MobileContextProvider could have changed; always recreate
|
||||
for (int i = 0; i < mMobileViews.size(); i++) {
|
||||
StatusBarMobileView view = mMobileViews.get(i);
|
||||
if (view.getState().subId == state.subId) {
|
||||
removeView(view);
|
||||
}
|
||||
}
|
||||
|
||||
// Add the replacement or new icon
|
||||
addMobileView(state, mobileContext);
|
||||
}
|
||||
|
||||
public void onRemoveIcon(StatusIconDisplayable view) {
|
||||
if (view.getSlot().equals("wifi")) {
|
||||
if (view instanceof ModernStatusBarWifiView) {
|
||||
@@ -324,12 +280,6 @@ public class DemoStatusIcons extends StatusIconContainer implements DemoMode, Da
|
||||
removeView(mModernWifiView);
|
||||
mModernWifiView = null;
|
||||
}
|
||||
} else if (view instanceof StatusBarMobileView) {
|
||||
StatusBarMobileView mobileView = matchingMobileView(view);
|
||||
if (mobileView != null) {
|
||||
removeView(mobileView);
|
||||
mMobileViews.remove(mobileView);
|
||||
}
|
||||
} else if (view instanceof ModernStatusBarMobileView) {
|
||||
ModernStatusBarMobileView mobileView = matchingModernMobileView(
|
||||
(ModernStatusBarMobileView) view);
|
||||
@@ -340,21 +290,6 @@ public class DemoStatusIcons extends StatusIconContainer implements DemoMode, Da
|
||||
}
|
||||
}
|
||||
|
||||
private StatusBarMobileView matchingMobileView(StatusIconDisplayable otherView) {
|
||||
if (!(otherView instanceof StatusBarMobileView)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
StatusBarMobileView v = (StatusBarMobileView) otherView;
|
||||
for (StatusBarMobileView view : mMobileViews) {
|
||||
if (view.getState().subId == v.getState().subId) {
|
||||
return view;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private ModernStatusBarMobileView matchingModernMobileView(ModernStatusBarMobileView other) {
|
||||
for (ModernStatusBarMobileView v : mModernMobileViews) {
|
||||
if (v.getSubId() == other.getSubId()) {
|
||||
@@ -376,9 +311,6 @@ public class DemoStatusIcons extends StatusIconContainer implements DemoMode, Da
|
||||
if (mModernWifiView != null) {
|
||||
mModernWifiView.onDarkChanged(areas, darkIntensity, tint);
|
||||
}
|
||||
for (StatusBarMobileView view : mMobileViews) {
|
||||
view.onDarkChanged(areas, darkIntensity, tint);
|
||||
}
|
||||
for (ModernStatusBarMobileView view : mModernMobileViews) {
|
||||
view.onDarkChanged(areas, darkIntensity, tint);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package com.android.systemui.statusbar.phone;
|
||||
|
||||
import static com.android.systemui.statusbar.phone.StatusBarIconHolder.TYPE_ICON;
|
||||
import static com.android.systemui.statusbar.phone.StatusBarIconHolder.TYPE_MOBILE;
|
||||
import static com.android.systemui.statusbar.phone.StatusBarIconHolder.TYPE_MOBILE_NEW;
|
||||
import static com.android.systemui.statusbar.phone.StatusBarIconHolder.TYPE_WIFI_NEW;
|
||||
|
||||
@@ -24,10 +23,8 @@ import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.ArraySet;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.LinearLayout.LayoutParams;
|
||||
|
||||
@@ -41,12 +38,9 @@ import com.android.systemui.plugins.DarkIconDispatcher;
|
||||
import com.android.systemui.plugins.DarkIconDispatcher.DarkReceiver;
|
||||
import com.android.systemui.statusbar.BaseStatusBarFrameLayout;
|
||||
import com.android.systemui.statusbar.StatusBarIconView;
|
||||
import com.android.systemui.statusbar.StatusBarMobileView;
|
||||
import com.android.systemui.statusbar.StatusIconDisplayable;
|
||||
import com.android.systemui.statusbar.connectivity.ui.MobileContextProvider;
|
||||
import com.android.systemui.statusbar.phone.StatusBarSignalPolicy.CallIndicatorIconState;
|
||||
import com.android.systemui.statusbar.phone.StatusBarSignalPolicy.MobileIconState;
|
||||
import com.android.systemui.statusbar.pipeline.StatusBarPipelineFlags;
|
||||
import com.android.systemui.statusbar.pipeline.mobile.ui.MobileUiAdapter;
|
||||
import com.android.systemui.statusbar.pipeline.mobile.ui.binder.MobileIconsBinder;
|
||||
import com.android.systemui.statusbar.pipeline.mobile.ui.view.ModernStatusBarMobileView;
|
||||
@@ -100,13 +94,10 @@ public interface StatusBarIconController {
|
||||
*/
|
||||
void setNewWifiIcon();
|
||||
|
||||
/** */
|
||||
void setMobileIcons(String slot, List<MobileIconState> states);
|
||||
|
||||
/**
|
||||
* This method completely replaces {@link #setMobileIcons} with the information from the new
|
||||
* mobile data pipeline. Icons will automatically keep their state up to date, so we don't have
|
||||
* to worry about funneling MobileIconState objects through anymore.
|
||||
* Notify this class that there is a new set of mobile icons to display, keyed off of this list
|
||||
* of subIds. The icons will be added and bound to the mobile data pipeline via
|
||||
* {@link com.android.systemui.statusbar.pipeline.mobile.ui.binder.MobileIconBinder}.
|
||||
*/
|
||||
void setNewMobileIconSubIds(List<Integer> subIds);
|
||||
/**
|
||||
@@ -168,14 +159,12 @@ public interface StatusBarIconController {
|
||||
public DarkIconManager(
|
||||
LinearLayout linearLayout,
|
||||
StatusBarLocation location,
|
||||
StatusBarPipelineFlags statusBarPipelineFlags,
|
||||
WifiUiAdapter wifiUiAdapter,
|
||||
MobileUiAdapter mobileUiAdapter,
|
||||
MobileContextProvider mobileContextProvider,
|
||||
DarkIconDispatcher darkIconDispatcher) {
|
||||
super(linearLayout,
|
||||
location,
|
||||
statusBarPipelineFlags,
|
||||
wifiUiAdapter,
|
||||
mobileUiAdapter,
|
||||
mobileContextProvider);
|
||||
@@ -235,7 +224,6 @@ public interface StatusBarIconController {
|
||||
|
||||
@SysUISingleton
|
||||
public static class Factory {
|
||||
private final StatusBarPipelineFlags mStatusBarPipelineFlags;
|
||||
private final WifiUiAdapter mWifiUiAdapter;
|
||||
private final MobileContextProvider mMobileContextProvider;
|
||||
private final MobileUiAdapter mMobileUiAdapter;
|
||||
@@ -243,12 +231,10 @@ public interface StatusBarIconController {
|
||||
|
||||
@Inject
|
||||
public Factory(
|
||||
StatusBarPipelineFlags statusBarPipelineFlags,
|
||||
WifiUiAdapter wifiUiAdapter,
|
||||
MobileContextProvider mobileContextProvider,
|
||||
MobileUiAdapter mobileUiAdapter,
|
||||
DarkIconDispatcher darkIconDispatcher) {
|
||||
mStatusBarPipelineFlags = statusBarPipelineFlags;
|
||||
mWifiUiAdapter = wifiUiAdapter;
|
||||
mMobileContextProvider = mobileContextProvider;
|
||||
mMobileUiAdapter = mobileUiAdapter;
|
||||
@@ -259,7 +245,6 @@ public interface StatusBarIconController {
|
||||
return new DarkIconManager(
|
||||
group,
|
||||
location,
|
||||
mStatusBarPipelineFlags,
|
||||
mWifiUiAdapter,
|
||||
mMobileUiAdapter,
|
||||
mMobileContextProvider,
|
||||
@@ -277,14 +262,12 @@ public interface StatusBarIconController {
|
||||
public TintedIconManager(
|
||||
ViewGroup group,
|
||||
StatusBarLocation location,
|
||||
StatusBarPipelineFlags statusBarPipelineFlags,
|
||||
WifiUiAdapter wifiUiAdapter,
|
||||
MobileUiAdapter mobileUiAdapter,
|
||||
MobileContextProvider mobileContextProvider
|
||||
) {
|
||||
super(group,
|
||||
location,
|
||||
statusBarPipelineFlags,
|
||||
wifiUiAdapter,
|
||||
mobileUiAdapter,
|
||||
mobileContextProvider);
|
||||
@@ -319,19 +302,16 @@ public interface StatusBarIconController {
|
||||
|
||||
@SysUISingleton
|
||||
public static class Factory {
|
||||
private final StatusBarPipelineFlags mStatusBarPipelineFlags;
|
||||
private final WifiUiAdapter mWifiUiAdapter;
|
||||
private final MobileContextProvider mMobileContextProvider;
|
||||
private final MobileUiAdapter mMobileUiAdapter;
|
||||
|
||||
@Inject
|
||||
public Factory(
|
||||
StatusBarPipelineFlags statusBarPipelineFlags,
|
||||
WifiUiAdapter wifiUiAdapter,
|
||||
MobileUiAdapter mobileUiAdapter,
|
||||
MobileContextProvider mobileContextProvider
|
||||
) {
|
||||
mStatusBarPipelineFlags = statusBarPipelineFlags;
|
||||
mWifiUiAdapter = wifiUiAdapter;
|
||||
mMobileUiAdapter = mobileUiAdapter;
|
||||
mMobileContextProvider = mobileContextProvider;
|
||||
@@ -341,7 +321,6 @@ public interface StatusBarIconController {
|
||||
return new TintedIconManager(
|
||||
group,
|
||||
location,
|
||||
mStatusBarPipelineFlags,
|
||||
mWifiUiAdapter,
|
||||
mMobileUiAdapter,
|
||||
mMobileContextProvider);
|
||||
@@ -354,7 +333,6 @@ public interface StatusBarIconController {
|
||||
*/
|
||||
class IconManager implements DemoModeCommandReceiver {
|
||||
protected final ViewGroup mGroup;
|
||||
private final StatusBarPipelineFlags mStatusBarPipelineFlags;
|
||||
private final MobileContextProvider mMobileContextProvider;
|
||||
private final LocationBasedWifiViewModel mWifiViewModel;
|
||||
private final MobileIconsViewModel mMobileIconsViewModel;
|
||||
@@ -376,27 +354,21 @@ public interface StatusBarIconController {
|
||||
public IconManager(
|
||||
ViewGroup group,
|
||||
StatusBarLocation location,
|
||||
StatusBarPipelineFlags statusBarPipelineFlags,
|
||||
WifiUiAdapter wifiUiAdapter,
|
||||
MobileUiAdapter mobileUiAdapter,
|
||||
MobileContextProvider mobileContextProvider
|
||||
) {
|
||||
mGroup = group;
|
||||
mStatusBarPipelineFlags = statusBarPipelineFlags;
|
||||
mMobileContextProvider = mobileContextProvider;
|
||||
mContext = group.getContext();
|
||||
mLocation = location;
|
||||
|
||||
reloadDimens();
|
||||
|
||||
if (statusBarPipelineFlags.runNewMobileIconsBackend()) {
|
||||
// This starts the flow for the new pipeline, and will notify us of changes if
|
||||
// {@link StatusBarPipelineFlags#useNewMobileIcons} is also true.
|
||||
mMobileIconsViewModel = mobileUiAdapter.getMobileIconsViewModel();
|
||||
MobileIconsBinder.bind(mGroup, mMobileIconsViewModel);
|
||||
} else {
|
||||
mMobileIconsViewModel = null;
|
||||
}
|
||||
// This starts the flow for the new pipeline, and will notify us of changes via
|
||||
// {@link #setNewMobileIconIds}
|
||||
mMobileIconsViewModel = mobileUiAdapter.getMobileIconsViewModel();
|
||||
MobileIconsBinder.bind(mGroup, mMobileIconsViewModel);
|
||||
|
||||
mWifiViewModel = wifiUiAdapter.bindGroup(mGroup, mLocation);
|
||||
}
|
||||
@@ -449,9 +421,6 @@ public interface StatusBarIconController {
|
||||
case TYPE_WIFI_NEW:
|
||||
return addNewWifiIcon(index, slot);
|
||||
|
||||
case TYPE_MOBILE:
|
||||
return addMobileIcon(index, slot, holder.getMobileState());
|
||||
|
||||
case TYPE_MOBILE_NEW:
|
||||
return addNewMobileIcon(index, slot, holder.getTag());
|
||||
}
|
||||
@@ -479,40 +448,12 @@ public interface StatusBarIconController {
|
||||
return view;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
protected StatusIconDisplayable addMobileIcon(
|
||||
int index,
|
||||
String slot,
|
||||
MobileIconState state
|
||||
) {
|
||||
if (mStatusBarPipelineFlags.useNewMobileIcons()) {
|
||||
throw new IllegalStateException("Attempting to add a mobile icon while the new "
|
||||
+ "icons are enabled is not supported");
|
||||
}
|
||||
|
||||
// Use the `subId` field as a key to query for the correct context
|
||||
StatusBarMobileView mobileView = onCreateStatusBarMobileView(state.subId, slot);
|
||||
mobileView.applyMobileState(state);
|
||||
mGroup.addView(mobileView, index, onCreateLayoutParams());
|
||||
|
||||
if (mIsInDemoMode) {
|
||||
Context mobileContext = mMobileContextProvider
|
||||
.getMobileContextForSub(state.subId, mContext);
|
||||
mDemoStatusIcons.addMobileView(state, mobileContext);
|
||||
}
|
||||
return mobileView;
|
||||
}
|
||||
|
||||
protected StatusIconDisplayable addNewMobileIcon(
|
||||
int index,
|
||||
String slot,
|
||||
int subId
|
||||
) {
|
||||
if (!mStatusBarPipelineFlags.useNewMobileIcons()) {
|
||||
throw new IllegalStateException("Attempting to add a mobile icon using the new"
|
||||
+ "pipeline, but the enabled flag is false.");
|
||||
}
|
||||
|
||||
BaseStatusBarFrameLayout view = onCreateModernStatusBarMobileView(slot, subId);
|
||||
mGroup.addView(view, index, onCreateLayoutParams());
|
||||
|
||||
@@ -536,13 +477,6 @@ public interface StatusBarIconController {
|
||||
return ModernStatusBarWifiView.constructAndBind(mContext, slot, mWifiViewModel);
|
||||
}
|
||||
|
||||
private StatusBarMobileView onCreateStatusBarMobileView(int subId, String slot) {
|
||||
Context mobileContext = mMobileContextProvider.getMobileContextForSub(subId, mContext);
|
||||
StatusBarMobileView view = StatusBarMobileView
|
||||
.fromContext(mobileContext, slot);
|
||||
return view;
|
||||
}
|
||||
|
||||
private ModernStatusBarMobileView onCreateModernStatusBarMobileView(
|
||||
String slot, int subId) {
|
||||
Context mobileContext = mMobileContextProvider.getMobileContextForSub(subId, mContext);
|
||||
@@ -568,15 +502,6 @@ public interface StatusBarIconController {
|
||||
com.android.internal.R.dimen.status_bar_icon_size_sp);
|
||||
}
|
||||
|
||||
private void setHeightAndCenter(ImageView imageView, int height) {
|
||||
ViewGroup.LayoutParams params = imageView.getLayoutParams();
|
||||
params.height = height;
|
||||
if (params instanceof LinearLayout.LayoutParams) {
|
||||
((LinearLayout.LayoutParams) params).gravity = Gravity.CENTER_VERTICAL;
|
||||
}
|
||||
imageView.setLayoutParams(params);
|
||||
}
|
||||
|
||||
protected void onRemoveIcon(int viewIndex) {
|
||||
if (mIsInDemoMode) {
|
||||
mDemoStatusIcons.onRemoveIcon((StatusIconDisplayable) mGroup.getChildAt(viewIndex));
|
||||
@@ -594,9 +519,6 @@ public interface StatusBarIconController {
|
||||
case TYPE_ICON:
|
||||
onSetIcon(viewIndex, holder.getIcon());
|
||||
return;
|
||||
case TYPE_MOBILE:
|
||||
onSetMobileIcon(viewIndex, holder.getMobileState());
|
||||
return;
|
||||
case TYPE_MOBILE_NEW:
|
||||
case TYPE_WIFI_NEW:
|
||||
// Nothing, the new icons update themselves
|
||||
@@ -606,23 +528,6 @@ public interface StatusBarIconController {
|
||||
}
|
||||
}
|
||||
|
||||
public void onSetMobileIcon(int viewIndex, MobileIconState state) {
|
||||
View view = mGroup.getChildAt(viewIndex);
|
||||
if (view instanceof StatusBarMobileView) {
|
||||
((StatusBarMobileView) view).applyMobileState(state);
|
||||
} else {
|
||||
// ModernStatusBarMobileView automatically updates via the ViewModel
|
||||
throw new IllegalStateException("Cannot update ModernStatusBarMobileView outside of"
|
||||
+ "the new pipeline");
|
||||
}
|
||||
|
||||
if (mIsInDemoMode) {
|
||||
Context mobileContext = mMobileContextProvider
|
||||
.getMobileContextForSub(state.subId, mContext);
|
||||
mDemoStatusIcons.updateMobileState(state, mobileContext);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispatchDemoCommand(String command, Bundle args) {
|
||||
if (!mDemoable) {
|
||||
|
||||
@@ -39,7 +39,6 @@ import com.android.systemui.dump.DumpManager;
|
||||
import com.android.systemui.statusbar.CommandQueue;
|
||||
import com.android.systemui.statusbar.StatusIconDisplayable;
|
||||
import com.android.systemui.statusbar.phone.StatusBarSignalPolicy.CallIndicatorIconState;
|
||||
import com.android.systemui.statusbar.phone.StatusBarSignalPolicy.MobileIconState;
|
||||
import com.android.systemui.statusbar.pipeline.StatusBarPipelineFlags;
|
||||
import com.android.systemui.statusbar.policy.ConfigurationController;
|
||||
import com.android.systemui.statusbar.policy.ConfigurationController.ConfigurationListener;
|
||||
@@ -215,41 +214,10 @@ public class StatusBarIconControllerImpl implements Tunable,
|
||||
/**
|
||||
* Accept a list of MobileIconStates, which all live in the same slot(?!), and then are sorted
|
||||
* by subId. Don't worry this definitely makes sense and works.
|
||||
* @param slot da slot
|
||||
* @param iconStates All of the mobile icon states
|
||||
* @param subIds list of subscription ID integers that provide the key to the icon to display.
|
||||
*/
|
||||
@Override
|
||||
public void setMobileIcons(String slot, List<MobileIconState> iconStates) {
|
||||
if (mStatusBarPipelineFlags.useNewMobileIcons()) {
|
||||
Log.d(TAG, "ignoring old pipeline callbacks, because the new mobile "
|
||||
+ "icons are enabled");
|
||||
return;
|
||||
}
|
||||
Slot mobileSlot = mStatusBarIconList.getSlot(slot);
|
||||
|
||||
// Reverse the sort order to show icons with left to right([Slot1][Slot2]..).
|
||||
// StatusBarIconList has UI design that first items go to the right of second items.
|
||||
Collections.reverse(iconStates);
|
||||
|
||||
for (MobileIconState state : iconStates) {
|
||||
StatusBarIconHolder holder = mobileSlot.getHolderForTag(state.subId);
|
||||
if (holder == null) {
|
||||
holder = StatusBarIconHolder.fromMobileIconState(state);
|
||||
setIcon(slot, holder);
|
||||
} else {
|
||||
holder.setMobileState(state);
|
||||
handleSet(slot, holder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNewMobileIconSubIds(List<Integer> subIds) {
|
||||
if (!mStatusBarPipelineFlags.useNewMobileIcons()) {
|
||||
Log.d(TAG, "ignoring new pipeline callback, "
|
||||
+ "since the new mobile icons are disabled");
|
||||
return;
|
||||
}
|
||||
String slotName = mContext.getString(com.android.internal.R.string.status_bar_mobile);
|
||||
Slot mobileSlot = mStatusBarIconList.getSlot(slotName);
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@ import android.os.UserHandle;
|
||||
|
||||
import com.android.internal.statusbar.StatusBarIcon;
|
||||
import com.android.systemui.statusbar.phone.StatusBarSignalPolicy.CallIndicatorIconState;
|
||||
import com.android.systemui.statusbar.phone.StatusBarSignalPolicy.MobileIconState;
|
||||
import com.android.systemui.statusbar.pipeline.mobile.ui.viewmodel.MobileIconViewModel;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
@@ -35,7 +34,6 @@ import java.lang.annotation.RetentionPolicy;
|
||||
*/
|
||||
public class StatusBarIconHolder {
|
||||
public static final int TYPE_ICON = 0;
|
||||
public static final int TYPE_MOBILE = 2;
|
||||
/**
|
||||
* TODO (b/249790733): address this once the new pipeline is in place
|
||||
* This type exists so that the new pipeline (see {@link MobileIconViewModel}) can be used
|
||||
@@ -63,7 +61,6 @@ public class StatusBarIconHolder {
|
||||
|
||||
@IntDef({
|
||||
TYPE_ICON,
|
||||
TYPE_MOBILE,
|
||||
TYPE_MOBILE_NEW,
|
||||
TYPE_WIFI_NEW
|
||||
})
|
||||
@@ -71,7 +68,6 @@ public class StatusBarIconHolder {
|
||||
@interface IconType {}
|
||||
|
||||
private StatusBarIcon mIcon;
|
||||
private MobileIconState mMobileState;
|
||||
private @IconType int mType = TYPE_ICON;
|
||||
private int mTag = 0;
|
||||
|
||||
@@ -79,7 +75,6 @@ public class StatusBarIconHolder {
|
||||
public static String getTypeString(@IconType int type) {
|
||||
switch(type) {
|
||||
case TYPE_ICON: return "ICON";
|
||||
case TYPE_MOBILE: return "MOBILE_OLD";
|
||||
case TYPE_MOBILE_NEW: return "MOBILE_NEW";
|
||||
case TYPE_WIFI_NEW: return "WIFI_NEW";
|
||||
default: return "UNKNOWN";
|
||||
@@ -103,15 +98,6 @@ public class StatusBarIconHolder {
|
||||
return holder;
|
||||
}
|
||||
|
||||
/** */
|
||||
public static StatusBarIconHolder fromMobileIconState(MobileIconState state) {
|
||||
StatusBarIconHolder holder = new StatusBarIconHolder();
|
||||
holder.mMobileState = state;
|
||||
holder.mType = TYPE_MOBILE;
|
||||
holder.mTag = state.subId;
|
||||
return holder;
|
||||
}
|
||||
|
||||
/**
|
||||
* ONLY for use with the new connectivity pipeline, where we only need a subscriptionID to
|
||||
* determine icon ordering and building the correct view model
|
||||
@@ -153,21 +139,10 @@ public class StatusBarIconHolder {
|
||||
mIcon = icon;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public MobileIconState getMobileState() {
|
||||
return mMobileState;
|
||||
}
|
||||
|
||||
public void setMobileState(MobileIconState state) {
|
||||
mMobileState = state;
|
||||
}
|
||||
|
||||
public boolean isVisible() {
|
||||
switch (mType) {
|
||||
case TYPE_ICON:
|
||||
return mIcon.visible;
|
||||
case TYPE_MOBILE:
|
||||
return mMobileState.visible;
|
||||
case TYPE_MOBILE_NEW:
|
||||
case TYPE_WIFI_NEW:
|
||||
// The new pipeline controls visibilities via the view model and view binder, so
|
||||
@@ -188,10 +163,6 @@ public class StatusBarIconHolder {
|
||||
mIcon.visible = visible;
|
||||
break;
|
||||
|
||||
case TYPE_MOBILE:
|
||||
mMobileState.visible = visible;
|
||||
break;
|
||||
|
||||
case TYPE_MOBILE_NEW:
|
||||
case TYPE_WIFI_NEW:
|
||||
// The new pipeline controls visibilities via the view model and view binder, so
|
||||
|
||||
@@ -19,7 +19,6 @@ package com.android.systemui.statusbar.phone;
|
||||
import android.annotation.NonNull;
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.telephony.SubscriptionInfo;
|
||||
import android.util.ArraySet;
|
||||
import android.util.Log;
|
||||
|
||||
@@ -27,7 +26,6 @@ import com.android.settingslib.mobile.TelephonyIcons;
|
||||
import com.android.systemui.R;
|
||||
import com.android.systemui.dagger.SysUISingleton;
|
||||
import com.android.systemui.statusbar.connectivity.IconState;
|
||||
import com.android.systemui.statusbar.connectivity.MobileDataIndicators;
|
||||
import com.android.systemui.statusbar.connectivity.NetworkController;
|
||||
import com.android.systemui.statusbar.connectivity.SignalCallback;
|
||||
import com.android.systemui.statusbar.policy.SecurityController;
|
||||
@@ -71,7 +69,6 @@ public class StatusBarSignalPolicy implements SignalCallback,
|
||||
// Track as little state as possible, and only for padding purposes
|
||||
private boolean mIsAirplaneMode = false;
|
||||
|
||||
private ArrayList<MobileIconState> mMobileStates = new ArrayList<>();
|
||||
private ArrayList<CallIndicatorIconState> mCallIndicatorStates = new ArrayList<>();
|
||||
private boolean mInitialized;
|
||||
|
||||
@@ -102,7 +99,7 @@ public class StatusBarSignalPolicy implements SignalCallback,
|
||||
mActivityEnabled = mContext.getResources().getBoolean(R.bool.config_showActivity);
|
||||
}
|
||||
|
||||
/** Call to initilaize and register this classw with the system. */
|
||||
/** Call to initialize and register this class with the system. */
|
||||
public void init() {
|
||||
if (mInitialized) {
|
||||
return;
|
||||
@@ -189,34 +186,6 @@ public class StatusBarSignalPolicy implements SignalCallback,
|
||||
CallIndicatorIconState.copyStates(mCallIndicatorStates));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMobileDataIndicators(@NonNull MobileDataIndicators indicators) {
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "setMobileDataIndicators: " + indicators);
|
||||
}
|
||||
MobileIconState state = getState(indicators.subId);
|
||||
if (state == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
state.visible = indicators.statusIcon.visible && !mHideMobile;
|
||||
state.strengthId = indicators.statusIcon.icon;
|
||||
state.typeId = indicators.statusType;
|
||||
state.contentDescription = indicators.statusIcon.contentDescription;
|
||||
state.typeContentDescription = indicators.typeContentDescription;
|
||||
state.showTriangle = indicators.showTriangle;
|
||||
state.roaming = indicators.roaming;
|
||||
state.activityIn = indicators.activityIn && mActivityEnabled;
|
||||
state.activityOut = indicators.activityOut && mActivityEnabled;
|
||||
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "MobileIconStates: "
|
||||
+ (mMobileStates == null ? "" : mMobileStates.toString()));
|
||||
}
|
||||
// Always send a copy to maintain value type semantics
|
||||
mIconController.setMobileIcons(mSlotMobile, MobileIconState.copyStates(mMobileStates));
|
||||
}
|
||||
|
||||
private CallIndicatorIconState getNoCallingState(int subId) {
|
||||
for (CallIndicatorIconState state : mCallIndicatorStates) {
|
||||
if (state.subId == subId) {
|
||||
@@ -227,74 +196,8 @@ public class StatusBarSignalPolicy implements SignalCallback,
|
||||
return null;
|
||||
}
|
||||
|
||||
private MobileIconState getState(int subId) {
|
||||
for (MobileIconState state : mMobileStates) {
|
||||
if (state.subId == subId) {
|
||||
return state;
|
||||
}
|
||||
}
|
||||
Log.e(TAG, "Unexpected subscription " + subId);
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* It is expected that a call to setSubs will be immediately followed by setMobileDataIndicators
|
||||
* so we don't have to update the icon manager at this point, just remove the old ones
|
||||
* @param subs list of mobile subscriptions, displayed as mobile data indicators (max 8)
|
||||
*/
|
||||
@Override
|
||||
public void setSubs(List<SubscriptionInfo> subs) {
|
||||
if (DEBUG) Log.d(TAG, "setSubs: " + (subs == null ? "" : subs.toString()));
|
||||
if (hasCorrectSubs(subs)) {
|
||||
return;
|
||||
}
|
||||
|
||||
mIconController.removeAllIconsForSlot(mSlotMobile);
|
||||
mIconController.removeAllIconsForSlot(mSlotNoCalling);
|
||||
mIconController.removeAllIconsForSlot(mSlotCallStrength);
|
||||
mMobileStates.clear();
|
||||
List<CallIndicatorIconState> noCallingStates = new ArrayList<CallIndicatorIconState>();
|
||||
noCallingStates.addAll(mCallIndicatorStates);
|
||||
mCallIndicatorStates.clear();
|
||||
final int n = subs.size();
|
||||
for (int i = 0; i < n; i++) {
|
||||
mMobileStates.add(new MobileIconState(subs.get(i).getSubscriptionId()));
|
||||
boolean isNewSub = true;
|
||||
for (CallIndicatorIconState state : noCallingStates) {
|
||||
if (state.subId == subs.get(i).getSubscriptionId()) {
|
||||
mCallIndicatorStates.add(state);
|
||||
isNewSub = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isNewSub) {
|
||||
mCallIndicatorStates.add(
|
||||
new CallIndicatorIconState(subs.get(i).getSubscriptionId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean hasCorrectSubs(List<SubscriptionInfo> subs) {
|
||||
final int N = subs.size();
|
||||
if (N != mMobileStates.size()) {
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < N; i++) {
|
||||
if (mMobileStates.get(i).subId != subs.get(i).getSubscriptionId()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNoSims(boolean show, boolean simDetected) {
|
||||
// Noop yay!
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEthernetIndicators(IconState state) {
|
||||
boolean visible = state.visible && !mHideEthernet;
|
||||
int resId = state.icon;
|
||||
String description = state.contentDescription;
|
||||
|
||||
@@ -324,11 +227,6 @@ public class StatusBarSignalPolicy implements SignalCallback,
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMobileDataEnabled(boolean enabled) {
|
||||
// Don't care.
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores the statusbar state for no Calling & SMS.
|
||||
*/
|
||||
@@ -388,117 +286,4 @@ public class StatusBarSignalPolicy implements SignalCallback,
|
||||
return outStates;
|
||||
}
|
||||
}
|
||||
|
||||
private static abstract class SignalIconState {
|
||||
public boolean visible;
|
||||
public boolean activityOut;
|
||||
public boolean activityIn;
|
||||
public String slot;
|
||||
public String contentDescription;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
// Skipping reference equality bc this should be more of a value type
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
SignalIconState that = (SignalIconState) o;
|
||||
return visible == that.visible &&
|
||||
activityOut == that.activityOut &&
|
||||
activityIn == that.activityIn &&
|
||||
Objects.equals(contentDescription, that.contentDescription) &&
|
||||
Objects.equals(slot, that.slot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(visible, activityOut, slot);
|
||||
}
|
||||
|
||||
protected void copyTo(SignalIconState other) {
|
||||
other.visible = visible;
|
||||
other.activityIn = activityIn;
|
||||
other.activityOut = activityOut;
|
||||
other.slot = slot;
|
||||
other.contentDescription = contentDescription;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A little different. This one delegates to SignalDrawable instead of a specific resId
|
||||
*/
|
||||
public static class MobileIconState extends SignalIconState {
|
||||
public int subId;
|
||||
public int strengthId;
|
||||
public int typeId;
|
||||
public boolean showTriangle;
|
||||
public boolean roaming;
|
||||
public boolean needsLeadingPadding;
|
||||
public CharSequence typeContentDescription;
|
||||
|
||||
private MobileIconState(int subId) {
|
||||
super();
|
||||
this.subId = subId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
if (!super.equals(o)) {
|
||||
return false;
|
||||
}
|
||||
MobileIconState that = (MobileIconState) o;
|
||||
return subId == that.subId
|
||||
&& strengthId == that.strengthId
|
||||
&& typeId == that.typeId
|
||||
&& showTriangle == that.showTriangle
|
||||
&& roaming == that.roaming
|
||||
&& needsLeadingPadding == that.needsLeadingPadding
|
||||
&& Objects.equals(typeContentDescription, that.typeContentDescription);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
|
||||
return Objects
|
||||
.hash(super.hashCode(), subId, strengthId, typeId, showTriangle, roaming,
|
||||
needsLeadingPadding, typeContentDescription);
|
||||
}
|
||||
|
||||
public MobileIconState copy() {
|
||||
MobileIconState copy = new MobileIconState(this.subId);
|
||||
copyTo(copy);
|
||||
return copy;
|
||||
}
|
||||
|
||||
public void copyTo(MobileIconState other) {
|
||||
super.copyTo(other);
|
||||
other.subId = subId;
|
||||
other.strengthId = strengthId;
|
||||
other.typeId = typeId;
|
||||
other.showTriangle = showTriangle;
|
||||
other.roaming = roaming;
|
||||
other.needsLeadingPadding = needsLeadingPadding;
|
||||
other.typeContentDescription = typeContentDescription;
|
||||
}
|
||||
|
||||
private static List<MobileIconState> copyStates(List<MobileIconState> inStates) {
|
||||
ArrayList<MobileIconState> outStates = new ArrayList<>();
|
||||
for (MobileIconState state : inStates) {
|
||||
MobileIconState copy = new MobileIconState(state.subId);
|
||||
state.copyTo(copy);
|
||||
outStates.add(copy);
|
||||
}
|
||||
|
||||
return outStates;
|
||||
}
|
||||
|
||||
@Override public String toString() {
|
||||
return "MobileIconState(subId=" + subId + ", strengthId=" + strengthId
|
||||
+ ", showTriangle=" + showTriangle + ", roaming=" + roaming
|
||||
+ ", typeId=" + typeId + ", visible=" + visible + ")";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,6 @@ package com.android.systemui.statusbar.pipeline
|
||||
|
||||
import android.content.Context
|
||||
import com.android.systemui.dagger.SysUISingleton
|
||||
import com.android.systemui.flags.FeatureFlags
|
||||
import com.android.systemui.flags.Flags
|
||||
import javax.inject.Inject
|
||||
|
||||
/** All flagging methods related to the new status bar pipeline (see b/238425913). */
|
||||
@@ -28,23 +26,10 @@ class StatusBarPipelineFlags
|
||||
@Inject
|
||||
constructor(
|
||||
context: Context,
|
||||
private val featureFlags: FeatureFlags,
|
||||
) {
|
||||
private val mobileSlot = context.getString(com.android.internal.R.string.status_bar_mobile)
|
||||
private val wifiSlot = context.getString(com.android.internal.R.string.status_bar_wifi)
|
||||
|
||||
/** True if we should display the mobile icons using the new status bar data pipeline. */
|
||||
fun useNewMobileIcons(): Boolean = featureFlags.isEnabled(Flags.NEW_STATUS_BAR_MOBILE_ICONS)
|
||||
|
||||
/**
|
||||
* True if we should run the new mobile icons backend to get the logging.
|
||||
*
|
||||
* Does *not* affect whether we render the mobile icons using the new backend data. See
|
||||
* [useNewMobileIcons] for that.
|
||||
*/
|
||||
fun runNewMobileIconsBackend(): Boolean =
|
||||
featureFlags.isEnabled(Flags.NEW_STATUS_BAR_MOBILE_ICONS_BACKEND) || useNewMobileIcons()
|
||||
|
||||
/**
|
||||
* For convenience in the StatusBarIconController, we want to gate some actions based on slot
|
||||
* name and the flag together.
|
||||
@@ -52,5 +37,5 @@ constructor(
|
||||
* @return true if this icon is controlled by any of the status bar pipeline flags
|
||||
*/
|
||||
fun isIconControlledByFlags(slotName: String): Boolean =
|
||||
slotName == wifiSlot || (slotName == mobileSlot && useNewMobileIcons())
|
||||
slotName == wifiSlot || slotName == mobileSlot
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ import com.android.systemui.CoreStartable
|
||||
import com.android.systemui.dagger.SysUISingleton
|
||||
import com.android.systemui.dagger.qualifiers.Application
|
||||
import com.android.systemui.statusbar.phone.StatusBarIconController
|
||||
import com.android.systemui.statusbar.pipeline.StatusBarPipelineFlags
|
||||
import com.android.systemui.statusbar.pipeline.mobile.domain.interactor.MobileIconsInteractor
|
||||
import com.android.systemui.statusbar.pipeline.mobile.ui.viewmodel.MobileIconsViewModel
|
||||
import java.io.PrintWriter
|
||||
@@ -46,24 +45,18 @@ constructor(
|
||||
val mobileIconsViewModel: MobileIconsViewModel,
|
||||
private val logger: MobileViewLogger,
|
||||
@Application private val scope: CoroutineScope,
|
||||
private val statusBarPipelineFlags: StatusBarPipelineFlags,
|
||||
) : CoreStartable {
|
||||
private var isCollecting: Boolean = false
|
||||
private var lastValue: List<Int>? = null
|
||||
|
||||
override fun start() {
|
||||
// Only notify the icon controller if we want to *render* the new icons.
|
||||
// Note that this flow may still run if
|
||||
// [statusBarPipelineFlags.runNewMobileIconsBackend] is true because we may want to
|
||||
// get the logging data without rendering.
|
||||
if (statusBarPipelineFlags.useNewMobileIcons()) {
|
||||
scope.launch {
|
||||
isCollecting = true
|
||||
mobileIconsViewModel.subscriptionIdsFlow.collectLatest {
|
||||
logger.logUiAdapterSubIdsSentToIconController(it)
|
||||
lastValue = it
|
||||
iconController.setNewMobileIconSubIds(it)
|
||||
}
|
||||
// Start notifying the icon controller of subscriptions
|
||||
scope.launch {
|
||||
isCollecting = true
|
||||
mobileIconsViewModel.subscriptionIdsFlow.collectLatest {
|
||||
logger.logUiAdapterSubIdsSentToIconController(it)
|
||||
lastValue = it
|
||||
iconController.setNewMobileIconSubIds(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package com.android.systemui.statusbar.phone;
|
||||
|
||||
import static com.android.systemui.statusbar.phone.StatusBarIconHolder.TYPE_ICON;
|
||||
import static com.android.systemui.statusbar.phone.StatusBarIconHolder.TYPE_MOBILE;
|
||||
|
||||
import static junit.framework.Assert.assertTrue;
|
||||
|
||||
@@ -39,14 +38,13 @@ import com.android.systemui.dump.DumpManager;
|
||||
import com.android.systemui.plugins.DarkIconDispatcher;
|
||||
import com.android.systemui.statusbar.CommandQueue;
|
||||
import com.android.systemui.statusbar.StatusBarIconView;
|
||||
import com.android.systemui.statusbar.StatusBarMobileView;
|
||||
import com.android.systemui.statusbar.StatusIconDisplayable;
|
||||
import com.android.systemui.statusbar.connectivity.ui.MobileContextProvider;
|
||||
import com.android.systemui.statusbar.phone.StatusBarIconController.DarkIconManager;
|
||||
import com.android.systemui.statusbar.phone.StatusBarIconController.IconManager;
|
||||
import com.android.systemui.statusbar.phone.StatusBarSignalPolicy.MobileIconState;
|
||||
import com.android.systemui.statusbar.pipeline.StatusBarPipelineFlags;
|
||||
import com.android.systemui.statusbar.pipeline.mobile.ui.MobileUiAdapter;
|
||||
import com.android.systemui.statusbar.pipeline.mobile.ui.viewmodel.MobileIconsViewModel;
|
||||
import com.android.systemui.statusbar.pipeline.wifi.ui.WifiUiAdapter;
|
||||
import com.android.systemui.statusbar.policy.ConfigurationController;
|
||||
import com.android.systemui.tuner.TunerService;
|
||||
@@ -57,23 +55,27 @@ import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@RunWith(AndroidTestingRunner.class)
|
||||
@RunWithLooper
|
||||
@RunWithLooper(setAsMainLooper = true)
|
||||
@SmallTest
|
||||
public class StatusBarIconControllerTest extends LeakCheckedTest {
|
||||
|
||||
private MobileContextProvider mMobileContextProvider = mock(MobileContextProvider.class);
|
||||
private MobileUiAdapter mMobileUiAdapter = mock(MobileUiAdapter.class);
|
||||
private MobileIconsViewModel mMobileIconsViewModel = mock(MobileIconsViewModel.class);
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
injectLeakCheckedDependencies(ALL_SUPPORTED_CLASSES);
|
||||
// For testing, ignore context overrides
|
||||
when(mMobileContextProvider.getMobileContextForSub(anyInt(), any())).thenReturn(mContext);
|
||||
when(mMobileUiAdapter.getMobileIconsViewModel()).thenReturn(mMobileIconsViewModel);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetCalledOnAdd_IconManager() {
|
||||
LinearLayout layout = new LinearLayout(mContext);
|
||||
TestIconManager manager = new TestIconManager(layout, mMobileContextProvider);
|
||||
TestIconManager manager =
|
||||
new TestIconManager(layout, mMobileUiAdapter, mMobileContextProvider);
|
||||
testCallOnAdd_forManager(manager);
|
||||
}
|
||||
|
||||
@@ -83,9 +85,8 @@ public class StatusBarIconControllerTest extends LeakCheckedTest {
|
||||
TestDarkIconManager manager = new TestDarkIconManager(
|
||||
layout,
|
||||
StatusBarLocation.HOME,
|
||||
mock(StatusBarPipelineFlags.class),
|
||||
mock(WifiUiAdapter.class),
|
||||
mock(MobileUiAdapter.class),
|
||||
mMobileUiAdapter,
|
||||
mMobileContextProvider,
|
||||
mock(DarkIconDispatcher.class));
|
||||
testCallOnAdd_forManager(manager);
|
||||
@@ -153,15 +154,10 @@ public class StatusBarIconControllerTest extends LeakCheckedTest {
|
||||
assertTrue("Expected StatusBarIconView",
|
||||
(manager.getViewAt(0) instanceof StatusBarIconView));
|
||||
|
||||
holder = holderForType(TYPE_MOBILE);
|
||||
manager.onIconAdded(1, "test_mobile", false, holder);
|
||||
assertTrue(manager.getViewAt(1) instanceof StatusBarMobileView);
|
||||
}
|
||||
|
||||
private StatusBarIconHolder holderForType(int type) {
|
||||
switch (type) {
|
||||
case TYPE_MOBILE:
|
||||
return StatusBarIconHolder.fromMobileIconState(mock(MobileIconState.class));
|
||||
|
||||
case TYPE_ICON:
|
||||
default:
|
||||
@@ -175,14 +171,12 @@ public class StatusBarIconControllerTest extends LeakCheckedTest {
|
||||
TestDarkIconManager(
|
||||
LinearLayout group,
|
||||
StatusBarLocation location,
|
||||
StatusBarPipelineFlags statusBarPipelineFlags,
|
||||
WifiUiAdapter wifiUiAdapter,
|
||||
MobileUiAdapter mobileUiAdapter,
|
||||
MobileContextProvider contextProvider,
|
||||
DarkIconDispatcher darkIconDispatcher) {
|
||||
super(group,
|
||||
location,
|
||||
statusBarPipelineFlags,
|
||||
wifiUiAdapter,
|
||||
mobileUiAdapter,
|
||||
contextProvider,
|
||||
@@ -202,23 +196,18 @@ public class StatusBarIconControllerTest extends LeakCheckedTest {
|
||||
|
||||
return mock;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected StatusBarMobileView addMobileIcon(int index, String slot, MobileIconState state) {
|
||||
StatusBarMobileView mock = mock(StatusBarMobileView.class);
|
||||
mGroup.addView(mock, index);
|
||||
|
||||
return mock;
|
||||
}
|
||||
}
|
||||
|
||||
private static class TestIconManager extends IconManager implements TestableIconManager {
|
||||
TestIconManager(ViewGroup group, MobileContextProvider contextProvider) {
|
||||
TestIconManager(
|
||||
ViewGroup group,
|
||||
MobileUiAdapter adapter,
|
||||
MobileContextProvider contextProvider
|
||||
) {
|
||||
super(group,
|
||||
StatusBarLocation.HOME,
|
||||
mock(StatusBarPipelineFlags.class),
|
||||
mock(WifiUiAdapter.class),
|
||||
mock(MobileUiAdapter.class),
|
||||
adapter,
|
||||
contextProvider);
|
||||
}
|
||||
|
||||
@@ -235,14 +224,6 @@ public class StatusBarIconControllerTest extends LeakCheckedTest {
|
||||
|
||||
return mock;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected StatusBarMobileView addMobileIcon(int index, String slot, MobileIconState state) {
|
||||
StatusBarMobileView mock = mock(StatusBarMobileView.class);
|
||||
mGroup.addView(mock, index);
|
||||
|
||||
return mock;
|
||||
}
|
||||
}
|
||||
|
||||
private interface TestableIconManager {
|
||||
|
||||
@@ -45,7 +45,6 @@ import com.android.systemui.statusbar.pipeline.wifi.shared.model.WifiNetworkMode
|
||||
import com.android.systemui.statusbar.pipeline.wifi.ui.viewmodel.LocationBasedWifiViewModel
|
||||
import com.android.systemui.statusbar.pipeline.wifi.ui.viewmodel.LocationBasedWifiViewModel.Companion.viewModelForLocation
|
||||
import com.android.systemui.statusbar.pipeline.wifi.ui.viewmodel.WifiViewModel
|
||||
import com.android.systemui.util.mockito.whenever
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
||||
@@ -20,7 +20,6 @@ import com.android.internal.statusbar.StatusBarIcon;
|
||||
import com.android.systemui.statusbar.phone.StatusBarIconController;
|
||||
import com.android.systemui.statusbar.phone.StatusBarIconController.IconManager;
|
||||
import com.android.systemui.statusbar.phone.StatusBarSignalPolicy.CallIndicatorIconState;
|
||||
import com.android.systemui.statusbar.phone.StatusBarSignalPolicy.MobileIconState;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -64,10 +63,6 @@ public class FakeStatusBarIconController extends BaseLeakChecker<IconManager>
|
||||
public void setNewWifiIcon() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMobileIcons(String slot, List<MobileIconState> states) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNewMobileIconSubIds(List<Integer> subIds) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user