Remove Satellite SOS entry from AOSP
Flag: com.android.settings.flags.satellite_oem_settings_ux_migration Bug: b/378408877 Test: make pass Test: Manual test Change-Id: If47081be0ed0734be841b2fe9129d22a76ed8e1b
This commit is contained in:
@@ -288,11 +288,7 @@ public class MobileNetworkSettings extends AbstractMobileNetworkSettings impleme
|
||||
if (satelliteSettingPreferenceController != null) {
|
||||
satelliteSettingPreferenceController.init(mSubId);
|
||||
}
|
||||
final SatelliteSettingSosPreferenceController satelliteSettingSosPreferenceController = use(
|
||||
SatelliteSettingSosPreferenceController.class);
|
||||
if (satelliteSettingSosPreferenceController != null) {
|
||||
satelliteSettingSosPreferenceController.init(mSubId);
|
||||
}
|
||||
|
||||
use(ApnPreferenceController.class).init(mSubId);
|
||||
use(CarrierPreferenceController.class).init(mSubId);
|
||||
use(DataUsagePreferenceController.class).init(mSubId);
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2024 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.telephony;
|
||||
|
||||
import static android.telephony.CarrierConfigManager.KEY_SATELLITE_ESOS_SUPPORTED_BOOL;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.PersistableBundle;
|
||||
|
||||
import com.android.settings.flags.Flags;
|
||||
import com.android.settings.network.CarrierConfigCache;
|
||||
|
||||
/** A controller for Satellite SOS entry preference. */
|
||||
public class SatelliteSettingSosPreferenceController extends TelephonyBasePreferenceController {
|
||||
private static final String TAG = "SatelliteSettingSosPrefController";
|
||||
|
||||
public SatelliteSettingSosPreferenceController(Context context,
|
||||
String preferenceKey) {
|
||||
super(context, preferenceKey);
|
||||
}
|
||||
|
||||
/** Setup the subscription Id for the UI with specific UI group. */
|
||||
public void init(int subId) {
|
||||
mSubId = subId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus(int subId) {
|
||||
if (Flags.satelliteOemSettingsUxMigration()) {
|
||||
CarrierConfigCache carrierConfigCache = CarrierConfigCache.getInstance(mContext);
|
||||
PersistableBundle bundle = carrierConfigCache.getConfigForSubId(subId);
|
||||
if (bundle == null) {
|
||||
return CONDITIONALLY_UNAVAILABLE;
|
||||
}
|
||||
boolean isCarrierSupport = bundle.getBoolean(KEY_SATELLITE_ESOS_SUPPORTED_BOOL);
|
||||
return isCarrierSupport ? AVAILABLE : CONDITIONALLY_UNAVAILABLE;
|
||||
}
|
||||
return CONDITIONALLY_UNAVAILABLE;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user