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

Commit 7c2361fc authored by Fang Yunong's avatar Fang Yunong Committed by Gerrit - the friendly Code Review server
Browse files

SystemUI: System UI force close when switch font size

SystemUI force close as the ClassCastException occured when typecasting, use
the parameters of the parent class instead of typecasting.

Change-Id: I8a495c7dc9c34fd954304b5f6f2a18d6b445781d
CRs-Fixed: 1064417
parent 51ba7c50
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ public class MobileSignalController extends SignalController<
    private MobileIconGroup mDefaultIcons;
    private Config mConfig;
    private int mNewCellIdentity = Integer.MAX_VALUE;
    private CallbackHandler mCallbackHandler;

    private final int STATUS_BAR_STYLE_ANDROID_DEFAULT = 0;
    private final int STATUS_BAR_STYLE_CDMA_1X_COMBINED = 1;
@@ -96,6 +97,8 @@ public class MobileSignalController extends SignalController<
        super("MobileSignalController(" + info.getSubscriptionId() + ")", context,
                NetworkCapabilities.TRANSPORT_CELLULAR, callbackHandler,
                networkController);

        mCallbackHandler = callbackHandler;
        mNetworkToIconLookup = new SparseArray<>();
        mConfig = config;
        mPhone = phone;
@@ -337,13 +340,6 @@ public class MobileSignalController extends SignalController<
                    dataContentDescription, description, icons.mIsWide,
                    mSubscriptionInfo.getSubscriptionId(), dataNetworkTypeInRoamingId,
                    getEmbmsIconId(), getImsIconId(), isImsRegisteredInWifi());
            CallbackHandler callbackHandler = (CallbackHandler) callback;
            callbackHandler.post(new Runnable() {
                @Override
                public void run() {
                    mNetworkController.updateNetworkLabelView();
                }
            });
        } else {
            callback.setMobileDataIndicators(statusIcon, qsIcon, typeIcon, qsTypeIcon,
                    activityIn, activityOut, dataActivityId, mobileActivityId,
@@ -351,6 +347,12 @@ public class MobileSignalController extends SignalController<
                    dataContentDescription, description, icons.mIsWide,
                    mSubscriptionInfo.getSubscriptionId());
        }
        mCallbackHandler.post(new Runnable() {
            @Override
            public void run() {
                mNetworkController.updateNetworkLabelView();
            }
        });
    }

    private int getEmbmsIconId() {