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

Commit df38d242 authored by Lee Chou's avatar Lee Chou Committed by Android (Google) Code Review
Browse files

Merge "Added check for preference click"

parents baf12eeb 22a1e5b2
Loading
Loading
Loading
Loading
+16 −11
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.content.Intent;
import android.provider.Settings;
import android.telephony.SubscriptionInfo;
import android.telephony.euicc.EuiccManager;
import android.text.TextUtils;

import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
@@ -60,6 +61,7 @@ public class DeleteSimProfilePreferenceController extends BasePreferenceControll

    @Override
    public boolean handlePreferenceTreeClick(Preference preference) {
        if (TextUtils.equals(preference.getKey(), getPreferenceKey())) {
            boolean confirmDeletion =
                    Settings.Global.getInt(
                            mContext.getContentResolver(),
@@ -75,6 +77,9 @@ public class DeleteSimProfilePreferenceController extends BasePreferenceControll
            return true;
        }

        return false;
    }

    private void deleteSim() {
        final Intent intent = new Intent(EuiccManager.ACTION_DELETE_SUBSCRIPTION_PRIVILEGED);
        intent.putExtra(EuiccManager.EXTRA_SUBSCRIPTION_ID, mSubscriptionInfo.getSubscriptionId());