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

Commit 4aba55e6 authored by yinxu's avatar yinxu Committed by Peter Wang
Browse files

Replace the PHONE_UID with SYSTEM_UID

In Android Q Mobile Network Settings have been moved from Phone Process
to Settings Process. So we should replace the PHONE_UID with SYSTEM_UID
to check whether the network scan is triggered by Settings menu.

Bug: 143251308
Test: Manual test
Change-Id: If189340cdd336fa600ffe828c7eb757568c9df90
Merged-In: If189340cdd336fa600ffe828c7eb757568c9df90
parent 9c6951cd
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -525,12 +525,12 @@ public final class NetworkScanRequestTracker {
        // stopped, a new scan will automatically start with nsri.
        // The new scan can interrupt the live scan only when all the below requirements are met:
        //   1. There is 1 live scan and no other pending scan
        //   2. The new scan is requested by mobile network setting menu (owned by PHONE process)
        //   2. The new scan is requested by mobile network setting menu (owned by SYSTEM process)
        //   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.PHONE_UID
                            && mLiveRequestInfo.mUid != Process.PHONE_UID) {
                    && nsri.mUid == Process.SYSTEM_UID
                            && mLiveRequestInfo.mUid != Process.SYSTEM_UID) {
                doInterruptScan(mLiveRequestInfo.mScanId);
                mPendingRequestInfo = nsri;
                notifyMessenger(mLiveRequestInfo, TelephonyScanManager.CALLBACK_SCAN_ERROR,