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

Commit 4a8624d7 authored by Xin Li's avatar Xin Li
Browse files

Merge aosp-24Q3-ts-dev

Bug: 358400644
Merged-In: I531676195e674e2ce52632e5bae6c93fc1d5e1d0
Change-Id: I5a130a145a8de3c2ab96b778343b6a3af24f96dc
parents 13ee1db0 0f3702e5
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -274,6 +274,13 @@ public class Process {
     */
    public static final int INET_GID = 3003;

    /**
     * Defines the UID/GID for the vendor based data process.
     * This is used to register AIDL service from vendor app context.
     * @hide
     */
    public static final int VENDOR_DATA_UID = 2918;

    /** {@hide} */
    public static final int NOBODY_UID = 9999;

+1 −1
Original line number Diff line number Diff line
@@ -3015,7 +3015,7 @@
    <bool name="config_syncstorageengine_masterSyncAutomatically">true</bool>

    <!--  Maximum number of supported users -->
    <integer name="config_multiuserMaximumUsers">1</integer>
    <integer name="config_multiuserMaximumUsers">4</integer>

    <!-- Maximum number of users we allow to be running at a time -->
    <integer name="config_multiuserMaxRunningUsers">3</integer>
+10 −2
Original line number Diff line number Diff line
@@ -27,6 +27,8 @@ import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTE

import static com.android.companiondevicemanager.CompanionDeviceDiscoveryService.DiscoveryState;
import static com.android.companiondevicemanager.CompanionDeviceDiscoveryService.DiscoveryState.FINISHED_TIMEOUT;
import static com.android.companiondevicemanager.CompanionDeviceDiscoveryService.LOCK;
import static com.android.companiondevicemanager.CompanionDeviceDiscoveryService.sDiscoveryStarted;
import static com.android.companiondevicemanager.CompanionDeviceResources.PROFILE_ICONS;
import static com.android.companiondevicemanager.CompanionDeviceResources.PROFILE_NAMES;
import static com.android.companiondevicemanager.CompanionDeviceResources.PROFILE_PERMISSIONS;
@@ -326,10 +328,14 @@ public class CompanionAssociationActivity extends FragmentActivity implements
    private void onDiscoveryStateChanged(DiscoveryState newState) {
        if (newState == FINISHED_TIMEOUT
                && CompanionDeviceDiscoveryService.getScanResult().getValue().isEmpty()) {
            synchronized (LOCK) {
                if (sDiscoveryStarted) {
                    cancel(/* discoveryTimeOut */ true,
                            /* userRejected */ false, /* internalError */ false);
                }
            }
        }
    }

    private void onUserSelectedDevice(@NonNull DeviceFilterPair<?> selectedDevice) {
        final MacAddress macAddress = selectedDevice.getMacAddress();
@@ -568,6 +574,8 @@ public class CompanionAssociationActivity extends FragmentActivity implements

        updateSingleDeviceUi();

        if (mRequest.isSkipPrompt()) return;

        mSummary.setVisibility(View.VISIBLE);
        mButtonAllow.setVisibility(View.VISIBLE);
        mButtonNotAllow.setVisibility(View.VISIBLE);
+5 −4
Original line number Diff line number Diff line
@@ -90,9 +90,6 @@ public class CompanionDeviceDiscoveryService extends Service {
            new MutableLiveData<>(Collections.emptyList());
    private static MutableLiveData<DiscoveryState> sStateLiveData =
            new MutableLiveData<>(DiscoveryState.NOT_STARTED);
    private static final Object LOCK = new Object();
    @GuardedBy("LOCK")
    private static boolean sDiscoveryStarted = false;

    private BluetoothManager mBtManager;
    private BluetoothAdapter mBtAdapter;
@@ -109,6 +106,10 @@ public class CompanionDeviceDiscoveryService extends Service {

    private boolean mStopAfterFirstMatch;

    static final Object LOCK = new Object();
    @GuardedBy("LOCK")
    static boolean sDiscoveryStarted = false;

    /**
     * A state enum for devices' discovery.
     */
@@ -127,6 +128,7 @@ public class CompanionDeviceDiscoveryService extends Service {
                return false;
            }
        }
        sScanResultsLiveData.setValue(Collections.emptyList());
        requireNonNull(associationRequest);
        final Intent intent = new Intent(context, CompanionDeviceDiscoveryService.class);
        intent.setAction(ACTION_START_DISCOVERY);
@@ -192,7 +194,6 @@ public class CompanionDeviceDiscoveryService extends Service {
            sDiscoveryStarted = true;
        }
        mStopAfterFirstMatch = request.isSingleDevice();
        sScanResultsLiveData.setValue(Collections.emptyList());
        sStateLiveData.setValue(DiscoveryState.IN_PROGRESS);

        final List<DeviceFilter<?>> allFilters = request.getDeviceFilters();
+1 −0
Original line number Diff line number Diff line
@@ -371,6 +371,7 @@ public class PackageManagerService implements PackageSender, TestUtilityService
    private static final int SE_UID = Process.SE_UID;
    private static final int NETWORKSTACK_UID = Process.NETWORK_STACK_UID;
    private static final int UWB_UID = Process.UWB_UID;
    private static final int VENDOR_DATA_UID = Process.VENDOR_DATA_UID;

    static final int SCAN_NO_DEX = 1 << 0;
    static final int SCAN_UPDATE_SIGNATURE = 1 << 1;