diff options
| author | 2022-05-09 04:51:07 +0000 | |
|---|---|---|
| committer | 2022-05-09 04:51:07 +0000 | |
| commit | 04470f4d3392a640992f919c4331538e2b03ad7d (patch) | |
| tree | 3d606096becaf14d09e3b4fa8508c1ede38a5abd | |
| parent | 17c8654c58189b791a009f105f09630e7a723552 (diff) | |
| parent | 967c10b10365f544b0aa81fa66fe79c0a35bed33 (diff) | |
SetDataEnabled indicate calling package am: 967c10b103
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2091526
Change-Id: I7d973e7dbfbec2648c063b51eea7ff67dbbf6fae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 10 | ||||
| -rw-r--r-- | telephony/java/com/android/internal/telephony/ITelephony.aidl | 9 |
2 files changed, 10 insertions, 9 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index e5d56849933e..82949f29bf3b 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -10291,7 +10291,7 @@ public class TelephonyManager { try { ITelephony telephony = getITelephony(); if (telephony != null) - return telephony.enableDataConnectivity(); + return telephony.enableDataConnectivity(getOpPackageName()); } catch (RemoteException e) { Log.e(TAG, "Error calling ITelephony#enableDataConnectivity", e); } @@ -10305,7 +10305,7 @@ public class TelephonyManager { try { ITelephony telephony = getITelephony(); if (telephony != null) - return telephony.disableDataConnectivity(); + return telephony.disableDataConnectivity(getOpPackageName()); } catch (RemoteException e) { Log.e(TAG, "Error calling ITelephony#disableDataConnectivity", e); } @@ -11682,7 +11682,7 @@ public class TelephonyManager { Log.d(TAG, "factoryReset: subId=" + subId); ITelephony telephony = getITelephony(); if (telephony != null) { - telephony.factoryReset(subId); + telephony.factoryReset(subId, getOpPackageName()); } } catch (RemoteException e) { } @@ -11702,7 +11702,7 @@ public class TelephonyManager { Log.d(TAG, "resetSettings: subId=" + getSubId()); ITelephony telephony = getITelephony(); if (telephony != null) { - telephony.factoryReset(getSubId()); + telephony.factoryReset(getSubId(), getOpPackageName()); } } catch (RemoteException e) { } @@ -12942,7 +12942,7 @@ public class TelephonyManager { try { ITelephony service = getITelephony(); if (service != null) { - service.setDataEnabledForReason(subId, reason, enabled); + service.setDataEnabledForReason(subId, reason, enabled, getOpPackageName()); } else { throw new IllegalStateException("telephony service is null."); } diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index 2c1167f0b8b9..f5877d8fd20a 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -270,13 +270,13 @@ interface ITelephony { * Allow mobile data connections. */ @UnsupportedAppUsage - boolean enableDataConnectivity(); + boolean enableDataConnectivity(String callingPackage); /** * Disallow mobile data connections. */ @UnsupportedAppUsage - boolean disableDataConnectivity(); + boolean disableDataConnectivity(String callingPackage); /** * Report whether data connectivity is possible. @@ -959,8 +959,9 @@ interface ITelephony { * @param subId user preferred subId. * @param reason the reason the data enable change is taking place * @param enable true to turn on, else false + * @param callingPackage the package that changed the data enabled state */ - void setDataEnabledForReason(int subId, int reason, boolean enable); + void setDataEnabledForReason(int subId, int reason, boolean enable, String callingPackage); /** * Return whether data is enabled for certain reason @@ -1332,7 +1333,7 @@ interface ITelephony { */ PhoneAccountHandle getPhoneAccountHandleForSubscriptionId(int subscriptionId); - void factoryReset(int subId); + void factoryReset(int subId, String callingPackage); /** * Returns users's current locale based on the SIM. |