Remove Support for Deprecated Location Updating
Remove support for location update control that impacts
the services state tracker. This functionality hasn't been
needed in many years, and it has the ability to:
-consume additional battery
-cause ServiceState to be reported incorrectly
-cause the phone to not know about changes to
the service state (current cell, technology, etc).
Bug: 152648516
Test: compilation - code removal only
Change-Id: I01971e23fa705325291cd66003507b99892fdbc0
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index aeda70c..b483027 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -1929,9 +1929,13 @@
}
}
+ /**
+ * This method has been removed due to privacy and stability concerns.
+ */
+ @Override
public void updateServiceLocation() {
- updateServiceLocationForSubscriber(getDefaultSubscription());
-
+ Log.e(LOG_TAG, "Call to unsupported method updateServiceLocation()");
+ return;
}
@Override
@@ -1977,21 +1981,6 @@
}
}
- public void updateServiceLocationForSubscriber(int subId) {
- // No permission check needed here: this call is harmless, and it's
- // needed for the ServiceState.requestStateUpdate() call (which is
- // already intentionally exposed to 3rd parties.)
- final long identity = Binder.clearCallingIdentity();
- try {
- final Phone phone = getPhone(subId);
- if (phone != null) {
- phone.updateServiceLocation(null);
- }
- } finally {
- Binder.restoreCallingIdentity(identity);
- }
- }
-
@Deprecated
@Override
public boolean isRadioOn(String callingPackage) {
@@ -2360,46 +2349,30 @@
}
}
+ /**
+ * This method was removed due to potential issues caused by performing partial
+ * updates of service state, and lack of a credible use case.
+ *
+ * This has the ability to break the telephony implementation by disabling notification of
+ * changes in device connectivity. DO NOT USE THIS!
+ */
@Override
public void enableLocationUpdates() {
- enableLocationUpdatesForSubscriber(getDefaultSubscription());
- }
-
- @Override
- public void enableLocationUpdatesForSubscriber(int subId) {
mApp.enforceCallingOrSelfPermission(
android.Manifest.permission.CONTROL_LOCATION_UPDATES, null);
-
- final long identity = Binder.clearCallingIdentity();
- try {
- final Phone phone = getPhone(subId);
- if (phone != null) {
- phone.enableLocationUpdates();
- }
- } finally {
- Binder.restoreCallingIdentity(identity);
- }
}
+ /**
+ * This method was removed due to potential issues caused by performing partial
+ * updates of service state, and lack of a credible use case.
+ *
+ * This has the ability to break the telephony implementation by disabling notification of
+ * changes in device connectivity. DO NOT USE THIS!
+ */
@Override
public void disableLocationUpdates() {
- disableLocationUpdatesForSubscriber(getDefaultSubscription());
- }
-
- @Override
- public void disableLocationUpdatesForSubscriber(int subId) {
mApp.enforceCallingOrSelfPermission(
android.Manifest.permission.CONTROL_LOCATION_UPDATES, null);
-
- final long identity = Binder.clearCallingIdentity();
- try {
- final Phone phone = getPhone(subId);
- if (phone != null) {
- phone.disableLocationUpdates();
- }
- } finally {
- Binder.restoreCallingIdentity(identity);
- }
}
/**