文章目录
- 开发平台基本信息
- 问题描述
- 解决方法
开发平台基本信息
芯片: SDM450
版本: Android 9.0
kernel: msm-4.9
问题描述
设备在进行入网认证,实验室在测试的时候,发现有应用会在开机启动的时候,使用定位功能,而实验室要求应用使用权限之前,需要先向用户申请,所以,要求整改去掉应用默认使用定位权限。
解决方法
diff --git a/frameworks/base/services/core/java/com/android/server/SensorNotificationService.java b/frameworks/base/services/core/java/com/android/server/SensorNotificationService.java
index 7f5befa..f5126a6 100644
--- a/frameworks/base/services/core/java/com/android/server/SensorNotificationService.java
+++ b/frameworks/base/services/core/java/com/android/server/SensorNotificationService.java
@@ -88,12 +88,14 @@ public class SensorNotificationService extends SystemServiceif (mLocationManager == null) {if (DBG) Slog.d(TAG, "Cannot obtain location service.");} else {
- mLocationManager.requestLocationUpdates(
- LocationManager.PASSIVE_PROVIDER,
- LOCATION_MIN_TIME,
- LOCATION_MIN_DISTANCE,
- this);
- }
+ /** cta disable auto location
+ mLocationManager.requestLocationUpdates(
+ LocationManager.PASSIVE_PROVIDER,
+ LOCATION_MIN_TIME,
+ LOCATION_MIN_DISTANCE,
+ this);
+ **/
+ }}}diff --git a/frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java b/frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java
index 44e4246..35b7678 100644
--- a/frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java
+++ b/frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java
@@ -2459,10 +2459,12 @@ public class GnssLocationProvider implements LocationProviderInterface, InjectNt// Don't keep track of this request since it's done on behalf of other clients// (which are kept track of separately).request.setHideFromAppOps(true);
- locManager.requestLocationUpdates(
- request,
- new NetworkLocationListener(),
- getLooper());
+ /**
+ locManager.requestLocationUpdates(
+ request,
+ new NetworkLocationListener(),
+ getLooper());
+ **/}}diff --git a/vendor/qcom/proprietary/commonsys/gps/framework/Android.mk b/vendor/qcom/proprietary/commonsys/gps/framework/Android.mk
index f87fb36..f4ef9ec 100755
--- a/vendor/qcom/proprietary/commonsys/gps/framework/Android.mk
+++ b/vendor/qcom/proprietary/commonsys/gps/framework/Android.mk
@@ -30,7 +30,9 @@ LOCAL_PROGUARD_ENABLED := disabledLOCAL_CERTIFICATE := platformLOCAL_PRIVATE_PLATFORM_APIS := true+ifdef 0include $(BUILD_PACKAGE)
+endif######## Copy permissions for com.qualcomm.locationinclude $(CLEAR_VARS)