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

Commit b0ca9f24 authored by Jack Yu's avatar Jack Yu Committed by Android (Google) Code Review
Browse files

Merge "Removed the obsolete code" into udc-dev

parents b9c4dbbb f492ad2b
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -2484,9 +2484,8 @@ public class SubscriptionController extends ISub.Stub {
    /**
     * Set uicc applications being enabled or disabled.
     * @param enabled whether uicc applications are enabled or disabled.
     * @return the number of records updated
     */
    public int setUiccApplicationsEnabled(boolean enabled, int subId) {
    public void setUiccApplicationsEnabled(boolean enabled, int subId) {
        if (DBG) logd("[setUiccApplicationsEnabled]+ enabled:" + enabled + " subId:" + subId);

        enforceModifyPhoneState("setUiccApplicationsEnabled");
@@ -2496,16 +2495,14 @@ public class SubscriptionController extends ISub.Stub {
            ContentValues value = new ContentValues(1);
            value.put(SubscriptionManager.UICC_APPLICATIONS_ENABLED, enabled);

            int result = mContext.getContentResolver().update(
                    SubscriptionManager.getUriForSubscriptionId(subId), value, null, null);
            mContext.getContentResolver().update(SubscriptionManager.getUriForSubscriptionId(subId),
                    value, null, null);

            // Refresh the Cache of Active Subscription Info List
            refreshCachedActiveSubscriptionInfoList();

            notifyUiccAppsEnableChanged();
            notifySubscriptionInfoChanged();

            return result;
        } finally {
            Binder.restoreCallingIdentity(identity);
        }
@@ -4040,7 +4037,6 @@ public class SubscriptionController extends ISub.Stub {
     * @return true if success, false if fails or the further action is
     * needed hence it's redirected to Euicc.
     */
    @Override
    public boolean setSubscriptionEnabled(boolean enable, int subId) {
        enforceModifyPhoneState("setSubscriptionEnabled");

+1 −12
Original line number Diff line number Diff line
@@ -3017,14 +3017,6 @@ public class SubscriptionManagerService extends ISub.Stub {
        }
    }

    @Override
    public boolean setSubscriptionEnabled(boolean enable, int subId) {
        enforcePermissions("setSubscriptionEnabled", Manifest.permission.MODIFY_PHONE_STATE);


        return true;
    }

    /**
     * Check if a subscription is active.
     *
@@ -3188,14 +3180,12 @@ public class SubscriptionManagerService extends ISub.Stub {
     * @param enabled whether uicc applications are enabled or disabled.
     * @param subId which subscription to operate on.
     *
     * @return the number of records updated.
     *
     * @throws IllegalArgumentException if the subscription does not exist.
     * @throws SecurityException if callers do not hold the required permission.
     */
    @Override
    @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE)
    public int setUiccApplicationsEnabled(boolean enabled, int subId) {
    public void setUiccApplicationsEnabled(boolean enabled, int subId) {
        enforcePermissions("setUiccApplicationsEnabled",
                Manifest.permission.MODIFY_PHONE_STATE);
        logl("setUiccApplicationsEnabled: subId=" + subId + ", enabled=" + enabled
@@ -3220,7 +3210,6 @@ public class SubscriptionManagerService extends ISub.Stub {
        } finally {
            Binder.restoreCallingIdentity(identity);
        }
        return 1;
    }

    /**