Loading src/com/android/packageinstaller/role/model/SmsRoleBehavior.java +5 −4 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.packageinstaller.role.model; import android.content.Context; import android.os.Process; import android.os.UserHandle; import android.os.UserManager; import android.telephony.TelephonyManager; import androidx.annotation.NonNull; Loading @@ -44,10 +45,10 @@ public class SmsRoleBehavior implements RoleBehavior { if (UserUtils.isWorkProfile(user, context)) { return false; } // FIXME: STOPSHIP: Add an appropriate @SystemApi for this. //if (userManager.getUserInfo(user.getIdentifier()).isRestricted()) { // return false; //} UserManager userManager = context.getSystemService(UserManager.class); if (userManager.isRestrictedProfile(user)) { return false; } TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class); if (!telephonyManager.isSmsCapable()) { return false; Loading src/com/android/packageinstaller/role/utils/UserUtils.java +0 −2 Original line number Diff line number Diff line Loading @@ -96,6 +96,4 @@ public class UserUtils { } } } } Loading
src/com/android/packageinstaller/role/model/SmsRoleBehavior.java +5 −4 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.packageinstaller.role.model; import android.content.Context; import android.os.Process; import android.os.UserHandle; import android.os.UserManager; import android.telephony.TelephonyManager; import androidx.annotation.NonNull; Loading @@ -44,10 +45,10 @@ public class SmsRoleBehavior implements RoleBehavior { if (UserUtils.isWorkProfile(user, context)) { return false; } // FIXME: STOPSHIP: Add an appropriate @SystemApi for this. //if (userManager.getUserInfo(user.getIdentifier()).isRestricted()) { // return false; //} UserManager userManager = context.getSystemService(UserManager.class); if (userManager.isRestrictedProfile(user)) { return false; } TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class); if (!telephonyManager.isSmsCapable()) { return false; Loading
src/com/android/packageinstaller/role/utils/UserUtils.java +0 −2 Original line number Diff line number Diff line Loading @@ -96,6 +96,4 @@ public class UserUtils { } } } }