Files
app_Settings/src/com/android/settings/network/EraseEuiccDataController.java
Bonian Chen 3b7d0d2e17 Revert "[Settings] configuration for hidding SIM remove UI"
Revert submission 2299468-settings_without_siminfo

Reason for revert: Fix build breakage
Reverted Changes:
I3d6ecec14:[Settings] configuration for hidding SIM settings ...
I8f0c1d53c:[Settings] configuration for hidding SIM remove UI...
I1b88f0f70:[Settings] configuration for hidding SIM notificat...
Ibe22c3ba3:[Settings] configuration for hidding SIM provider ...
Id5ea14ca8:[Settings] configuration for hidding SIM related U...
I70be07dbc:[Settings] configuration for hidding SIM lock UI

Log of breakage:
https://android-build.googleplex.com/builds/submitted/9318826/full-eng/latest/view/logs/build_error.log

Bug: 260055628
Merged-In: Iea40b89733cc75a41f960fecb2ac24177a4cbd3d
Change-Id: I5c52b841955f5be41ce861aca740147061fc7d3f
2022-11-22 11:59:15 +00:00

60 lines
1.9 KiB
Java

/*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.settings.network;
import android.content.Context;
import android.content.pm.PackageManager;
import android.text.TextUtils;
import androidx.preference.Preference;
import com.android.settings.core.BasePreferenceController;
import com.android.settings.core.PreferenceControllerMixin;
import com.android.settings.system.ResetDashboardFragment;
/**
* Controller for erasing Euicc data
*/
public class EraseEuiccDataController extends BasePreferenceController {
private ResetDashboardFragment mHostFragment;
public EraseEuiccDataController(Context context, String preferenceKey) {
super(context, preferenceKey);
}
public void setFragment(ResetDashboardFragment hostFragment) {
mHostFragment = hostFragment;
}
@Override
public boolean handlePreferenceTreeClick(Preference preference) {
if (!TextUtils.equals(preference.getKey(), getPreferenceKey())) {
return false;
}
EraseEuiccDataDialogFragment.show(mHostFragment);
return true;
}
@Override
public int getAvailabilityStatus() {
return SubscriptionUtil.isSimHardwareVisible(mContext) &&
mContext.getPackageManager().hasSystemFeature(
PackageManager.FEATURE_TELEPHONY_EUICC) ? AVAILABLE_UNSEARCHABLE
: UNSUPPORTED_ON_DEVICE;
}
}