Merge "Use dark theme for alerts if device is in dark mode" am: 8ecde2ba35 am: 4eac3a5447
Original change: https://android-review.googlesource.com/c/platform/packages/services/Telephony/+/1863282
Change-Id: I1164b186dc189bd2379f1260511942e9f5be8569
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index db14924..af77c38 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -3138,6 +3138,13 @@
@Override
public String getMeidForSlot(int slotIndex, String callingPackage, String callingFeatureId) {
+ try {
+ mAppOps.checkPackage(Binder.getCallingUid(), callingPackage);
+ } catch (SecurityException se) {
+ EventLog.writeEvent(0x534e4554, "186530496", Binder.getCallingUid());
+ throw new SecurityException("Package " + callingPackage + " does not belong to "
+ + Binder.getCallingUid());
+ }
Phone phone = PhoneFactory.getPhone(slotIndex);
if (phone == null) {
return null;
@@ -4919,6 +4926,13 @@
@Override
public int getNetworkTypeForSubscriber(int subId, String callingPackage,
String callingFeatureId) {
+ try {
+ mAppOps.checkPackage(Binder.getCallingUid(), callingPackage);
+ } catch (SecurityException se) {
+ EventLog.writeEvent(0x534e4554, "186776740", Binder.getCallingUid());
+ throw new SecurityException("Package " + callingPackage + " does not belong to "
+ + Binder.getCallingUid());
+ }
final int targetSdk = TelephonyPermissions.getTargetSdk(mApp, callingPackage);
if (targetSdk > android.os.Build.VERSION_CODES.Q) {
return getDataNetworkTypeForSubscriber(subId, callingPackage, callingFeatureId);
@@ -7474,6 +7488,13 @@
*/
@Override
public String getDeviceIdWithFeature(String callingPackage, String callingFeatureId) {
+ try {
+ mAppOps.checkPackage(Binder.getCallingUid(), callingPackage);
+ } catch (SecurityException se) {
+ EventLog.writeEvent(0x534e4554, "186530889", Binder.getCallingUid());
+ throw new SecurityException("Package " + callingPackage + " does not belong to "
+ + Binder.getCallingUid());
+ }
final Phone phone = PhoneFactory.getPhone(0);
if (phone == null) {
return null;