Cleaned up the flag enforce_telephony_feature_mapping_for_public_apis

Cleaned up the 24Q3 flag enforce_telephony_feature_mapping_for_public_apis

Test: Basic telephony functionality tests
Test: atest FrameworksTelephonyTests
Bug: 297989574
Flag: EXEMPT flag cleanup
Change-Id: Iefb9a02eebe06fb42a23d645e6be034c94508487
This commit is contained in:
Jack Yu
2025-02-18 13:31:50 -08:00
parent 2c90d30415
commit a38de2654d
4 changed files with 19 additions and 47 deletions

View File

@@ -911,15 +911,11 @@ public class EnabledNetworkModePreferenceController extends
// assign current call state so that it helps to show correct preference state even
// before first onCallStateChanged() by initial registration.
if (Flags.enforceTelephonyFeatureMappingForPublicApis()) {
try {
mCallState = mTelephonyManager.getCallState(subId);
} catch (UnsupportedOperationException e) {
// Device doesn't support FEATURE_TELEPHONY_CALLING
mCallState = TelephonyManager.CALL_STATE_IDLE;
}
} else {
try {
mCallState = mTelephonyManager.getCallState(subId);
} catch (UnsupportedOperationException e) {
// Device doesn't support FEATURE_TELEPHONY_CALLING
mCallState = TelephonyManager.CALL_STATE_IDLE;
}
mTelephonyManager.registerTelephonyCallback(
mContext.getMainExecutor(), mTelephonyCallback);

View File

@@ -33,7 +33,6 @@ import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import androidx.preference.TwoStatePreference;
import com.android.internal.telephony.flags.Flags;
import com.android.settings.R;
import com.android.settings.network.ims.VolteQueryImsState;
import com.android.settingslib.core.lifecycle.LifecycleObserver;
@@ -233,15 +232,11 @@ public class Enhanced4gBasePreferenceController extends TelephonyTogglePreferenc
}
// assign current call state so that it helps to show correct preference state even
// before first onCallStateChanged() by initial registration.
if (Flags.enforceTelephonyFeatureMappingForPublicApis()) {
try {
mCallState = mTelephonyManager.getCallState(subId);
} catch (UnsupportedOperationException e) {
// Device doesn't support FEATURE_TELEPHONY_CALLING
mCallState = TelephonyManager.CALL_STATE_IDLE;
}
} else {
try {
mCallState = mTelephonyManager.getCallState(subId);
} catch (UnsupportedOperationException e) {
// Device doesn't support FEATURE_TELEPHONY_CALLING
mCallState = TelephonyManager.CALL_STATE_IDLE;
}
mTelephonyManager.registerTelephonyCallback(
mContext.getMainExecutor(), mTelephonyCallback);