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

Commit f276a562 authored by Hall Liu's avatar Hall Liu Committed by Gerrit Code Review
Browse files

Merge changes from topics "nw-scan-cts", "nw-scan-changes"

* changes:
  Add shell permissions for CTS testing
  Allow requestNetworkScan to return sanitized info
parents 1423684d 64fbe76f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -261,6 +261,7 @@ applications that come with the platform
        <permission name="android.permission.MOUNT_FORMAT_FILESYSTEMS"/>
        <permission name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>
        <permission name="android.permission.MOVE_PACKAGE"/>
        <permission name="android.permission.NETWORK_SCAN"/>
        <permission name="android.permission.PACKAGE_USAGE_STATS" />
        <!-- Needed for test only -->
        <permission name="android.permission.PACKET_KEEPALIVE_OFFLOAD" />
+2 −0
Original line number Diff line number Diff line
@@ -118,6 +118,8 @@
    <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
    <uses-permission android:name="android.permission.MOUNT_FORMAT_FILESYSTEMS" />
    <uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
    <!-- Shell only holds android.permission.NETWORK_SCAN in order to to enable CTS testing -->
    <uses-permission android:name="android.permission.NETWORK_SCAN" />
    <uses-permission android:name="android.permission.REGISTER_CALL_PROVIDER" />
    <uses-permission android:name="android.permission.REGISTER_CONNECTION_MANAGER" />
    <uses-permission android:name="android.permission.REGISTER_SIM_SUBSCRIPTION" />
+16 −0
Original line number Diff line number Diff line
@@ -109,6 +109,22 @@ public abstract class CellIdentity implements Parcelable {
        return mType;
    }

    /**
     * @return MCC or null for CDMA
     * @hide
     */
    public String getMccString() {
        return mMccStr;
    }

    /**
     * @return MNC or null for CDMA
     * @hide
     */
    public String getMncString() {
        return mMncStr;
    }

    /**
     * Returns the channel number of the cell identity.
     *
+7 −0
Original line number Diff line number Diff line
@@ -109,6 +109,13 @@ public final class CellIdentityCdma extends CellIdentity {
        return new CellIdentityCdma(this);
    }

    /** @hide */
    public CellIdentityCdma sanitizeLocationInfo() {
        return new CellIdentityCdma(CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE,
                CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE,
                mAlphaLong, mAlphaShort);
    }

    /**
     * Take the latitude and longitude in 1/4 seconds and see if
     * the reported location is on Null Island.
+6 −0
Original line number Diff line number Diff line
@@ -97,6 +97,12 @@ public final class CellIdentityGsm extends CellIdentity {
        return new CellIdentityGsm(this);
    }

    /** @hide */
    public CellIdentityGsm sanitizeLocationInfo() {
        return new CellIdentityGsm(CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE,
                CellInfo.UNAVAILABLE, mMccStr, mMncStr, mAlphaLong, mAlphaShort);
    }

    /**
     * @return 3-digit Mobile Country Code, 0..999,
     *         {@link android.telephony.CellInfo#UNAVAILABLE UNAVAILABLE} if unavailable.
Loading