Rename references to getLteOnCdmaMode

Use @SystemApi TelephonyManager#isGlobalModeEnabled()

Test: build
Bug: 147335742
Change-Id: Ie1b01a97cf163d68e4a5529f1718a9a782d44bb0
This commit is contained in:
Sarah Chin
2020-01-14 17:16:21 -08:00
parent 66349e21c3
commit de616afce0
6 changed files with 12 additions and 36 deletions

View File

@@ -60,7 +60,6 @@ import android.widget.Button;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.widget.LockPatternUtils;
import com.android.internal.widget.LockPatternView;
import com.android.internal.widget.LockPatternView.Cell;
@@ -916,9 +915,7 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
* phone that has no encryption.
*/
private final void setAirplaneModeIfNecessary() {
final boolean isLteDevice =
getTelephonyManager().getLteOnCdmaMode() == PhoneConstants.LTE_ON_CDMA_TRUE;
if (!isLteDevice) {
if (!getTelephonyManager().isGlobalModeEnabled()) {
Log.d(TAG, "Going into airplane mode.");
Settings.Global.putInt(getContentResolver(), Settings.Global.AIRPLANE_MODE_ON, 1);
final Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED);