diff options
author | Shunta Sato <shunta.sato@sonymobile.com> | 2017-04-19 12:38:41 +0900 |
---|---|---|
committer | Shunta Sato <shunta.sato@sonymobile.com> | 2017-04-19 12:39:21 +0900 |
commit | 51a3fde8c51c2040184addd928cd319ecdb31ff8 (patch) | |
tree | 8f7e96f1080f4f66e172e9c3c4cf8adce708b161 /service | |
parent | 8ab4881b5771ddd8ab3fa475362ac42efccff9c4 (diff) |
Make tetherChangePermission to be secured for AppOps permission
Symptom:
AppOps verified the incorrect package of calling tether state
changing API.
It threw SecurityException by mistake.
Solution:
Pass the correct package name to enforceTetherChangePermission.
Bug: 32931147
Change-Id: Ief21324eee02d6215d9bff681ccad435815bea04
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/util/WifiPermissionsUtil.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java b/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java index 6de39ac3d..8b687db81 100644 --- a/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java +++ b/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java @@ -81,7 +81,8 @@ public class WifiPermissionsUtil { * @param context Context object of the caller. */ public void enforceTetherChangePermission(Context context) { - ConnectivityManager.enforceTetherChangePermission(context); + String pkgName = context.getOpPackageName(); + ConnectivityManager.enforceTetherChangePermission(context, pkgName); } /** |