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

Commit 3748b1c9 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Improve potential NPE problem" into main

parents 60072553 00ab92f9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -68,6 +68,7 @@ public class SatelliteSettingPreferenceController extends

    public SatelliteSettingPreferenceController(@NonNull Context context, @NonNull String key) {
        super(context, key);
        mCarrierConfigCache = CarrierConfigCache.getInstance(mContext);
    }

    /**
@@ -78,7 +79,6 @@ public class SatelliteSettingPreferenceController extends
    public void initialize(int subId) {
        logd("initialize(), subId=" + subId);
        mSubId = subId;
        mCarrierConfigCache = CarrierConfigCache.getInstance(mContext);
        mSatelliteManager = mContext.getSystemService(SatelliteManager.class);
        mTelephonyManager = mContext.getSystemService(TelephonyManager.class);
        if (mTelephonyManager != null) {
+1 −1
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ public class SatelliteSettingsPreferenceCategoryController extends

    public SatelliteSettingsPreferenceCategoryController(Context context, String key) {
        super(context, key);
        mCarrierConfigCache = CarrierConfigCache.getInstance(mContext);
    }

    /**
@@ -74,7 +75,6 @@ public class SatelliteSettingsPreferenceCategoryController extends
    public void init(int subId) {
        Log.d(TAG, "init(), subId=" + subId);
        mSubId = subId;
        mCarrierConfigCache = CarrierConfigCache.getInstance(mContext);
        mSatelliteManager = mContext.getSystemService(SatelliteManager.class);
        mTelephonyManager = mContext.getSystemService(TelephonyManager.class);
        requestIsSatelliteSupported();