summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mark Chien <markchien@google.com> 2020-06-11 07:24:01 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2020-06-11 07:24:01 +0000
commit443092b9a862405f5e569b3c72d6dd6ca92d5597 (patch)
tree19404cc43fced874a728c5783c0bf2b81074bb7c
parent5bd9279c863c083a40a3505f05de945f648963d1 (diff)
parenta46ba4ea21422084970c3f313e0d21bc6948b59c (diff)
Merge "Cleanup config_mobile_hotspot_provision_app usage"
-rw-r--r--core/java/android/net/ConnectivityManager.java21
1 files changed, 0 insertions, 21 deletions
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index 6b713602215a..4b2ef118eaa3 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -2271,27 +2271,6 @@ public class ConnectivityManager {
throwException);
}
- /** {@hide} */
- public static final void enforceTetherChangePermission(Context context, String callingPkg,
- String callingAttributionTag) {
- 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.
- checkAndNoteWriteSettingsOperation(context, uid, callingPkg,
- callingAttributionTag, true /* throwException */);
- }
- }
-
/**
* Check if the package is a allowed to write settings. This also accounts that such an access
* happened.