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

Commit b50b6873 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 12283639 from 5371b7b5 to 24Q4-release

Change-Id: I5f7b849fc71b93ea269f884902b6a0e87875c471
parents 2d219562 5371b7b5
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -46,7 +46,6 @@ import android.os.ResultReceiver;
 */
interface IBluetooth
{
    // TODO: b/357645528 - delete aidl method
    @JavaPassthrough(annotation="@android.annotation.RequiresNoPermission")
    int getState();

+7 −1
Original line number Diff line number Diff line
@@ -821,11 +821,17 @@ public final class Utils {
            UserHandle uh = um.getProfileParent(callingUser);
            int parentUser = (uh != null) ? uh.getIdentifier() : USER_HANDLE_NULL.getIdentifier();

            // In HSUM mode, UserHandle.SYSTEM is only for System and the human users will use other
            // ids
            boolean isSystemUserInHsumMode =
                    um.isHeadlessSystemUserMode() && callingUser.equals(UserHandle.SYSTEM);

            // Always allow SystemUI/System access.
            return (sForegroundUserId == callingUser.getIdentifier())
                    || (sForegroundUserId == parentUser)
                    || (UserHandle.getAppId(sSystemUiUid) == UserHandle.getAppId(callingUid))
                    || (UserHandle.getAppId(Process.SYSTEM_UID) == UserHandle.getAppId(callingUid));
                    || (UserHandle.getAppId(Process.SYSTEM_UID) == UserHandle.getAppId(callingUid))
                    || (isSystemUserInHsumMode);
        } catch (Exception ex) {
            Log.e(TAG, "checkCallerAllowManagedProfiles: Exception ex=" + ex);
            return false;
+4 −13
Original line number Diff line number Diff line
@@ -1153,10 +1153,8 @@ public class AdapterService extends Service {
    }

    private void invalidateBluetoothGetStateCache() {
        if (!Flags.broadcastAdapterStateWithCallback()) {
        BluetoothAdapter.invalidateBluetoothGetStateCache();
    }
    }

    void updateLeAudioProfileServiceState() {
        Set<Integer> nonSupportedProfiles = new HashSet<>();
@@ -1186,9 +1184,7 @@ public class AdapterService extends Service {

    void updateAdapterState(int prevState, int newState) {
        mAdapterProperties.setState(newState);
        if (!Flags.broadcastAdapterStateWithCallback()) {
        invalidateBluetoothGetStateCache();
        }

        // Only BluetoothManagerService should be registered
        int n = mRemoteCallbacks.beginBroadcast();
@@ -1486,9 +1482,7 @@ public class AdapterService extends Service {
        BluetoothAdapter.invalidateGetProfileConnectionStateCache();
        BluetoothAdapter.invalidateIsOffloadedFilteringSupportedCache();
        BluetoothDevice.invalidateBluetoothGetBondStateCache();
        if (!Flags.broadcastAdapterStateWithCallback()) {
        BluetoothAdapter.invalidateBluetoothGetStateCache();
        }
        BluetoothAdapter.invalidateGetAdapterConnectionStateCache();
        BluetoothMap.invalidateBluetoothGetConnectionStateCache();
        BluetoothSap.invalidateBluetoothGetConnectionStateCache();
@@ -2246,9 +2240,7 @@ public class AdapterService extends Service {

        AdapterServiceBinder(AdapterService svc) {
            mService = svc;
            if (!Flags.broadcastAdapterStateWithCallback()) {
            mService.invalidateBluetoothGetStateCache();
            }
            BluetoothAdapter.getDefaultAdapter().disableBluetoothGetStateCache();
        }

@@ -2259,7 +2251,6 @@ public class AdapterService extends Service {
            return mService;
        }

        // TODO: b/357645528 - delete getState method
        @Override
        public int getState() {
            AdapterService service = getService();
+4 −0
Original line number Diff line number Diff line
@@ -248,6 +248,10 @@ public class CompanionManager {
            new BluetoothAdapter.OnMetadataChangedListener() {
                @Override
                public void onMetadataChanged(BluetoothDevice device, int key, byte[] value) {
                    if (value == null) {
                        Log.d(TAG, "onMetadataChanged(device, " + key + ", null)");
                        return;
                    }
                    String valueStr = new String(value);
                    Log.d(TAG, "Metadata updated in " + device + ": " + key + "=" + valueStr);
                    if (key == BluetoothDevice.METADATA_SOFTWARE_VERSION
+0 −10
Original line number Diff line number Diff line
@@ -29,16 +29,6 @@ flag {
    bug: "339554081"
}

flag {
    name: "broadcast_adapter_state_with_callback"
    namespace: "bluetooth"
    description: "Instead of caching the value with an IPC cache, we directly broadcast the state to each app so they can store it locally"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
    bug: "357645528"
}

flag {
    name: "fast_bind_to_app"
    namespace: "bluetooth"
Loading