summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mark Chien <markchien@google.com> 2020-06-11 15:26:02 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-06-11 15:26:02 +0000
commitef24e2121dbd4eb56bdfa1e4e588e77af6bd28c3 (patch)
treecf7d61f90440c6d86cf759fc89976f72187e0528
parent2b92ce540ba955a52c8afb0f4f9b0ae266007eaf (diff)
parentd3252e3e6195660227e55e2a87c1047a24d40f01 (diff)
Merge "Cleanup config_mobile_hotspot_provision_app usage" into rvc-dev
-rw-r--r--core/java/android/net/ConnectivityManager.java20
1 files changed, 0 insertions, 20 deletions
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index 36ffe50ef82d..ba348993e2ae 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -2246,26 +2246,6 @@ public class ConnectivityManager {
.getPackageNameForUid(context, uid), true /* throwException */);
}
- /** {@hide} */
- public static final void enforceTetherChangePermission(Context context, String callingPkg) {
- Preconditions.checkNotNull(context, "Context cannot be null");
- Preconditions.checkNotNull(callingPkg, "callingPkg cannot be null");
-
- if (context.getResources().getStringArray(
- com.android.internal.R.array.config_mobile_hotspot_provision_app).length == 2) {
- // Have a provisioning app - must only let system apps (which check this app)
- // turn on tethering
- context.enforceCallingOrSelfPermission(
- android.Manifest.permission.TETHER_PRIVILEGED, "ConnectivityService");
- } else {
- int uid = Binder.getCallingUid();
- // If callingPkg's uid is not same as Binder.getCallingUid(),
- // AppOpsService throws SecurityException.
- Settings.checkAndNoteWriteSettingsOperation(context, uid, callingPkg,
- true /* throwException */);
- }
- }
-
/**
* @deprecated - use getSystemService. This is a kludge to support static access in certain
* situations where a Context pointer is unavailable.