[DS] Location does not work with only Cellular data
For getCellLocation() and getAllCellInfo(), telephony frameworks needs
to find the correct phone object to query.
Bug: 16892732
Change-Id: I3dfb808d36f911cd37cb986c0cd63387ee6f0c65
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index d20df1b..b97f3b6 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -1193,7 +1193,8 @@
if (checkIfCallerIsSelfOrForegroundUser()) {
if (DBG_LOC) log("getCellLocation: is active user");
Bundle data = new Bundle();
- mPhone.getCellLocation().fillInNotifierBundle(data);
+ Phone phone = getPhone(mSubscriptionController.getDefaultDataSubId());
+ phone.getCellLocation().fillInNotifierBundle(data);
return data;
} else {
if (DBG_LOC) log("getCellLocation: suppress non-active user");
@@ -1276,7 +1277,11 @@
if (checkIfCallerIsSelfOrForegroundUser()) {
if (DBG_LOC) log("getAllCellInfo: is active user");
- return mPhone.getAllCellInfo();
+ List<CellInfo> cellInfos = new ArrayList<CellInfo>();
+ for (Phone phone : PhoneFactory.getPhones()) {
+ cellInfos.addAll(phone.getAllCellInfo());
+ }
+ return cellInfos;
} else {
if (DBG_LOC) log("getAllCellInfo: suppress non-active user");
return null;