Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d65740e authored by Jack Yu's avatar Jack Yu
Browse files

Allow IWLAN data service to get cell identity information

Even when location is disabled by the user, the data
service is still able to get the LAC/TAC from the
cell identity.

Fix: 169253540
Test: Manual

Change-Id: Ia05aead0d747f57c9e7cb6ab3172629f535a6d61
parent fa7a04d8
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -4516,4 +4516,25 @@ public class GsmCdmaPhone extends Phone {
        }
        return Collections.emptyList();
    }

    /**
     * @return Currently bound data service package names.
     */
    public @NonNull List<String> getDataServicePackages() {
        List<String> packages = new ArrayList<>();
        int[] transports = new int[]{AccessNetworkConstants.TRANSPORT_TYPE_WWAN,
                AccessNetworkConstants.TRANSPORT_TYPE_WLAN};

        for (int transport : transports) {
            DcTracker dct = getDcTracker(transport);
            if (dct != null) {
                String pkg = dct.getDataServiceManager().getDataServicePackageName();
                if (!TextUtils.isEmpty(pkg)) {
                    packages.add(pkg);
                }
            }
        }

        return packages;
    }
}
+8 −0
Original line number Diff line number Diff line
@@ -4451,6 +4451,14 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
        return Collections.emptyList();
    }

    /**
     *
     * @return
     */
    public @NonNull List<String> getDataServicePackages() {
        return Collections.emptyList();
    }

    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        pw.println("Phone: subId=" + getSubId());
        pw.println(" mPhoneId=" + mPhoneId);
+1 −1
Original line number Diff line number Diff line
@@ -454,7 +454,7 @@ public class DataServiceManager extends Handler {
     *
     * @return package name of the data service package for the the current transportType.
     */
    private String getDataServicePackageName() {
    public String getDataServicePackageName() {
        return getDataServicePackageName(mTransportType);
    }

+7 −0
Original line number Diff line number Diff line
@@ -5228,4 +5228,11 @@ public class DcTracker extends Handler {
        // Return static default defined in CarrierConfigManager.
        return CarrierConfigManager.getDefaultConfig();
    }

    /**
     * @return The data service manager.
     */
    public @NonNull DataServiceManager getDataServiceManager() {
        return mDataServiceManager;
    }
}