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

Commit 9a3c4d6f authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "SIM refresh of type init should not dispose CatService."

parents a7f4d1c2 58242d6f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -230,13 +230,13 @@ public class UiccCard {
     *
     * A null aid implies a card level reset - all applications must be reset.
     *
     * @deprecated Please use {@link UiccProfile#resetAppWithAid(String)} instead.
     * @deprecated Please use {@link UiccProfile#resetAppWithAid(String, boolean)} instead.
     */
    @Deprecated
    public boolean resetAppWithAid(String aid) {
    public boolean resetAppWithAid(String aid, boolean disposeCatService) {
        synchronized (mLock) {
            if (mUiccProfile != null) {
                return mUiccProfile.resetAppWithAid(aid);
                return mUiccProfile.resetAppWithAid(aid, disposeCatService);
            } else {
                return false;
            }
+8 −5
Original line number Diff line number Diff line
@@ -642,11 +642,14 @@ public class UiccController extends Handler {

        boolean changed = false;
        switch(resp.refreshResult) {
            case IccRefreshResponse.REFRESH_RESULT_RESET:
            case IccRefreshResponse.REFRESH_RESULT_INIT:
            // Reset the required apps when we know about the refresh so that
            // anyone interested does not get stale state.
                 changed = uiccCard.resetAppWithAid(resp.aid);
            case IccRefreshResponse.REFRESH_RESULT_RESET:
                changed = uiccCard.resetAppWithAid(resp.aid, true /* disposeCatService */);
                break;
            case IccRefreshResponse.REFRESH_RESULT_INIT:
                // don't dispose CatService on SIM REFRESH of type INIT
                changed = uiccCard.resetAppWithAid(resp.aid, false /* disposeCatService */);
                break;
            default:
                return;
+7 −2
Original line number Diff line number Diff line
@@ -1240,8 +1240,13 @@ public class UiccProfile extends IccCard {
     * Resets the application with the input AID. Returns true if any changes were made.
     *
     * A null aid implies a card level reset - all applications must be reset.
     *
     * @param aid aid of the application which should be reset; null imples all applications
     * @param disposeCatService flag indicating if CatService should be disposed as part of
     *                          this reset
     * @return boolean indicating if there was any change made as part of the reset
     */
    public boolean resetAppWithAid(String aid) {
    public boolean resetAppWithAid(String aid, boolean disposeCatService) {
        synchronized (mLock) {
            boolean changed = false;
            for (int i = 0; i < mUiccApplications.length; i++) {
@@ -1258,7 +1263,7 @@ public class UiccProfile extends IccCard {
                    mCarrierPrivilegeRules = null;
                    changed = true;
                }
                if (mCatService != null) {
                if (disposeCatService && mCatService != null) {
                    mCatService.dispose();
                    mCatService = null;
                    changed = true;