Loading src/com/android/server/telecom/TelecomService.java +15 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,8 @@ import android.telephony.SubscriptionManager; import android.telephony.TelephonyManager; import android.text.TextUtils; import android.util.EventLog; // TODO: Needed for move to system service: import com.android.internal.R; import com.android.internal.telecom.ITelecomService; import com.android.internal.util.IndentingPrintWriter; Loading Loading @@ -664,6 +666,8 @@ public class TelecomService extends Service { } else { mAppOpsManager.checkPackage(Binder.getCallingUid(), phoneAccountHandle.getComponentName().getPackageName()); enforcePhoneAccountIsRegistered(phoneAccountHandle); // Make sure it doesn't cross the UserHandle boundary enforceUserHandleMatchesCaller(phoneAccountHandle); } Loading @@ -690,6 +694,7 @@ public class TelecomService extends Service { mAppOpsManager.checkPackage( Binder.getCallingUid(), phoneAccountHandle.getComponentName().getPackageName()); enforcePhoneAccountIsRegistered(phoneAccountHandle); // Make sure it doesn't cross the UserHandle boundary enforceUserHandleMatchesCaller(phoneAccountHandle); Loading Loading @@ -855,6 +860,16 @@ public class TelecomService extends Service { return false; } // Enforce that the PhoneAccountHandle being passed in is registered to a valid PhoneAccount. private void enforcePhoneAccountIsRegistered(PhoneAccountHandle phoneAccountHandle) { PhoneAccount phoneAccount = mPhoneAccountRegistrar.getPhoneAccount(phoneAccountHandle); if(phoneAccount == null) { EventLog.writeEvent(0x534e4554, "26864502", Binder.getCallingUid(), "R"); throw new SecurityException("This PhoneAccountHandle is not registered to a valid " + "PhoneAccount!"); } } private void enforcePhoneAccountModificationForPackage(String packageName) { // TODO: Use a new telecomm permission for this instead of reusing modify. Loading Loading
src/com/android/server/telecom/TelecomService.java +15 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,8 @@ import android.telephony.SubscriptionManager; import android.telephony.TelephonyManager; import android.text.TextUtils; import android.util.EventLog; // TODO: Needed for move to system service: import com.android.internal.R; import com.android.internal.telecom.ITelecomService; import com.android.internal.util.IndentingPrintWriter; Loading Loading @@ -664,6 +666,8 @@ public class TelecomService extends Service { } else { mAppOpsManager.checkPackage(Binder.getCallingUid(), phoneAccountHandle.getComponentName().getPackageName()); enforcePhoneAccountIsRegistered(phoneAccountHandle); // Make sure it doesn't cross the UserHandle boundary enforceUserHandleMatchesCaller(phoneAccountHandle); } Loading @@ -690,6 +694,7 @@ public class TelecomService extends Service { mAppOpsManager.checkPackage( Binder.getCallingUid(), phoneAccountHandle.getComponentName().getPackageName()); enforcePhoneAccountIsRegistered(phoneAccountHandle); // Make sure it doesn't cross the UserHandle boundary enforceUserHandleMatchesCaller(phoneAccountHandle); Loading Loading @@ -855,6 +860,16 @@ public class TelecomService extends Service { return false; } // Enforce that the PhoneAccountHandle being passed in is registered to a valid PhoneAccount. private void enforcePhoneAccountIsRegistered(PhoneAccountHandle phoneAccountHandle) { PhoneAccount phoneAccount = mPhoneAccountRegistrar.getPhoneAccount(phoneAccountHandle); if(phoneAccount == null) { EventLog.writeEvent(0x534e4554, "26864502", Binder.getCallingUid(), "R"); throw new SecurityException("This PhoneAccountHandle is not registered to a valid " + "PhoneAccount!"); } } private void enforcePhoneAccountModificationForPackage(String packageName) { // TODO: Use a new telecomm permission for this instead of reusing modify. Loading