settings(nfc): Remove reference to APM setting in NFC page
APM mode no longer affects NFC stack as of Android Q. Bug: 275381319 Test: atest NfcEnablerTest NfcPreferenceControllerTest Test: Manual settings page verification Change-Id: I974a424332eb85e27d51816507183e1ca0def42c
This commit is contained in:
@@ -28,7 +28,6 @@ import android.content.Intent;
|
||||
import android.nfc.NfcAdapter;
|
||||
import android.nfc.NfcManager;
|
||||
import android.os.UserManager;
|
||||
import android.provider.Settings;
|
||||
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
@@ -188,44 +187,6 @@ public class NfcPreferenceControllerTest {
|
||||
assertThat(mNfcController.hasAsyncUpdate()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void isToggleableInAirplaneMode_containNfc_shouldReturnTrue() {
|
||||
Settings.Global.putString(mContext.getContentResolver(),
|
||||
Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS,
|
||||
Settings.Global.RADIO_NFC);
|
||||
Settings.Global.putInt(mContext.getContentResolver(),
|
||||
Settings.Global.AIRPLANE_MODE_ON, 1);
|
||||
|
||||
assertThat(NfcPreferenceController.isToggleableInAirplaneMode(mContext)).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void isToggleableInAirplaneMode_withoutNfc_shouldReturnFalse() {
|
||||
Settings.Global.putString(mContext.getContentResolver(),
|
||||
Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS,
|
||||
"null");
|
||||
Settings.Global.putInt(mContext.getContentResolver(),
|
||||
Settings.Global.AIRPLANE_MODE_ON, 1);
|
||||
|
||||
assertThat(NfcPreferenceController.isToggleableInAirplaneMode(mContext)).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldTurnOffNFCInAirplaneMode_airplaneModeRadiosContainsNfc_shouldReturnTrue() {
|
||||
Settings.Global.putString(mContext.getContentResolver(),
|
||||
Settings.Global.AIRPLANE_MODE_RADIOS, Settings.Global.RADIO_NFC);
|
||||
|
||||
assertThat(NfcPreferenceController.shouldTurnOffNFCInAirplaneMode(mContext)).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldTurnOffNFCInAirplaneMode_airplaneModeRadiosWithoutNfc_shouldReturnFalse() {
|
||||
Settings.Global.putString(mContext.getContentResolver(),
|
||||
Settings.Global.AIRPLANE_MODE_RADIOS, "");
|
||||
|
||||
assertThat(NfcPreferenceController.shouldTurnOffNFCInAirplaneMode(mContext)).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void ncfSliceWorker_nfcBroadcast_noExtra_sliceDoesntUpdate() {
|
||||
final NfcSliceWorker worker = spy(
|
||||
|
||||
Reference in New Issue
Block a user