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

Commit 738f3fc6 authored by Jack Yu's avatar Jack Yu
Browse files

Fixed the incorrect uid check for HSUM mode

In the HSUM mode, the uid is pre-fixed with user id. Fixed by
using the correct method to check uid.

Fix: 367402314
Flag: EXEMPT bug fix
Test: Basic telephony functionality tests
Test: atest FrameworksTelephonyTests TeleServicesTest
Change-Id: Iad0360f79633132883ebba3d528b55e33e0970e9
parent 5771ea9e
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ import android.os.Message;
import android.os.Messenger;
import android.os.Process;
import android.os.RemoteException;
import android.os.UserHandle;
import android.telephony.CellInfo;
import android.telephony.LocationAccessPolicy;
import android.telephony.NetworkScan;
@@ -567,8 +568,8 @@ public final class NetworkScanRequestTracker {
        //   3. The live scan is not requested by mobile network setting menu
        private synchronized boolean interruptLiveScan(NetworkScanRequestInfo nsri) {
            if (mLiveRequestInfo != null && mPendingRequestInfo == null
                    && nsri.mUid == Process.SYSTEM_UID
                            && mLiveRequestInfo.mUid != Process.SYSTEM_UID) {
                    && !UserHandle.isSameApp(nsri.mUid, Process.SYSTEM_UID)
                            && !UserHandle.isSameApp(mLiveRequestInfo.mUid, Process.SYSTEM_UID)) {
                doInterruptScan(mLiveRequestInfo.mScanId);
                mPendingRequestInfo = nsri;
                notifyMessenger(mLiveRequestInfo, TelephonyScanManager.CALLBACK_SCAN_ERROR,