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

Commit 8c6bbad4 authored by Svetoslav's avatar Svetoslav Committed by Android (Google) Code Review
Browse files

Merge "Teach telephony about location app ops"

parents b1b0aa58 275b5635
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -782,7 +782,7 @@ public class TelephonyManager {
            ITelephony telephony = getITelephony();
            ITelephony telephony = getITelephony();
            if (telephony == null)
            if (telephony == null)
                return null;
                return null;
            Bundle bundle = telephony.getCellLocation();
            Bundle bundle = telephony.getCellLocation(mContext.getOpPackageName());
            if (bundle.isEmpty()) return null;
            if (bundle.isEmpty()) return null;
            CellLocation cl = CellLocation.newFromBundle(bundle);
            CellLocation cl = CellLocation.newFromBundle(bundle);
            if (cl.isEmpty())
            if (cl.isEmpty())
@@ -2729,7 +2729,7 @@ public class TelephonyManager {
            ITelephony telephony = getITelephony();
            ITelephony telephony = getITelephony();
            if (telephony == null)
            if (telephony == null)
                return null;
                return null;
            return telephony.getAllCellInfo();
            return telephony.getAllCellInfo(mContext.getOpPackageName());
        } catch (RemoteException ex) {
        } catch (RemoteException ex) {
            return null;
            return null;
        } catch (NullPointerException ex) {
        } catch (NullPointerException ex) {
+2 −2
Original line number Original line Diff line number Diff line
@@ -343,7 +343,7 @@ interface ITelephony {
     */
     */
    boolean isDataConnectivityPossible();
    boolean isDataConnectivityPossible();


    Bundle getCellLocation();
    Bundle getCellLocation(String callingPkg);


    /**
    /**
     * Returns the neighboring cell information of the device.
     * Returns the neighboring cell information of the device.
@@ -507,7 +507,7 @@ interface ITelephony {
    /**
    /**
     * Returns the all observed cell information of the device.
     * Returns the all observed cell information of the device.
     */
     */
    List<CellInfo> getAllCellInfo();
    List<CellInfo> getAllCellInfo(String callingPkg);


    /**
    /**
     * Sets minimum time in milli-seconds between onCellInfoChanged
     * Sets minimum time in milli-seconds between onCellInfoChanged