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

Commit 1d71e62e authored by chen xu's avatar chen xu
Browse files

expose carrier id APIs and internal cleanup

Bug: 110559381
Test: unit test
Change-Id: I692dce3b91ea45188f2cc2a055154083d8a42089
parent 7c24af33
Loading
Loading
Loading
Loading
+1 −4
Original line number Original line Diff line number Diff line
@@ -373,7 +373,6 @@ public class CarrierResolver extends Handler {
                    .ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED);
                    .ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED);
            intent.putExtra(TelephonyManager.EXTRA_CARRIER_ID, mCarrierId);
            intent.putExtra(TelephonyManager.EXTRA_CARRIER_ID, mCarrierId);
            intent.putExtra(TelephonyManager.EXTRA_CARRIER_NAME, mCarrierName);
            intent.putExtra(TelephonyManager.EXTRA_CARRIER_NAME, mCarrierName);
            intent.putExtra(TelephonyManager.EXTRA_MNO_CARRIER_ID, mMnoCarrierId);
            intent.putExtra(TelephonyManager.EXTRA_SUBSCRIPTION_ID, mPhone.getSubId());
            intent.putExtra(TelephonyManager.EXTRA_SUBSCRIPTION_ID, mPhone.getSubId());
            mContext.sendBroadcast(intent);
            mContext.sendBroadcast(intent);


@@ -381,10 +380,8 @@ public class CarrierResolver extends Handler {
            ContentValues cv = new ContentValues();
            ContentValues cv = new ContentValues();
            cv.put(CarrierId.CARRIER_ID, mCarrierId);
            cv.put(CarrierId.CARRIER_ID, mCarrierId);
            cv.put(CarrierId.CARRIER_NAME, mCarrierName);
            cv.put(CarrierId.CARRIER_NAME, mCarrierName);
            cv.put(CarrierId.MNO_CARRIER_ID, mMnoCarrierId);
            mContext.getContentResolver().update(
            mContext.getContentResolver().update(
                    Uri.withAppendedPath(CarrierId.CONTENT_URI,
                    Telephony.CarrierId.getUriForSubscriptionId(mPhone.getSubId()), cv, null, null);
                            Integer.toString(mPhone.getSubId())), cv, null, null);
        }
        }


        update = false;
        update = false;