Guard CellularSecurityPreferenceController with FEATURE_TELEPHONY
TelephonyManager is only available if Packagemanager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY) returns true. If false we should return UNSUPPORTED_ON_DEVICE. Bug: 330726177 Test: m & manual Change-Id: I1c2a1cb1f61b58f448ef207b2391dd9c262f6848
This commit is contained in:
@@ -19,6 +19,7 @@ package com.android.settings.network;
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.safetycenter.SafetyCenterManager;
|
||||
@@ -65,7 +66,8 @@ public class CellularSecurityPreferenceController extends BasePreferenceControll
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
if (!Flags.enableIdentifierDisclosureTransparencyUnsolEvents()
|
||||
if (!mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEPHONY)
|
||||
|| !Flags.enableIdentifierDisclosureTransparencyUnsolEvents()
|
||||
|| !Flags.enableModemCipherTransparencyUnsolEvents()
|
||||
|| !Flags.enableIdentifierDisclosureTransparency()
|
||||
|| !Flags.enableModemCipherTransparency()) {
|
||||
|
Reference in New Issue
Block a user