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

Commit 982bb0f1 authored by Bill Yi's avatar Bill Yi Committed by Gerrit Code Review
Browse files

Merge "Merge SP1A.211105.004 to aosp-master - DO NOT MERGE"

parents 7e76d37f ba584f1f
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.util.Log;

import com.android.internal.annotations.GuardedBy;

import java.util.Objects;
import java.util.Set;

/**
@@ -86,6 +87,12 @@ public class Account implements Parcelable {
        if (TextUtils.isEmpty(type)) {
            throw new IllegalArgumentException("the type must not be empty: " + type);
        }
        if (name.length() > 200) {
            throw new IllegalArgumentException("account name is longer than 200 characters");
        }
        if (type.length() > 200) {
            throw new IllegalArgumentException("account type is longer than 200 characters");
        }
        this.name = name;
        this.type = type;
        this.accessId = accessId;
+4 −8
Original line number Diff line number Diff line
@@ -464,11 +464,7 @@ public final class ActivityThread extends ClientTransactionHandler

        @Override
        public int hashCode() {
            return hashCode(authority, userId);
        }

        public static int hashCode(final String auth, final int userIdent) {
            return ((auth != null) ? auth.hashCode() : 0) ^ userIdent;
            return ((authority != null) ? authority.hashCode() : 0) ^ userId;
        }
    }

@@ -490,7 +486,7 @@ public final class ActivityThread extends ClientTransactionHandler
    // Note we never removes items from this map but that's okay because there are only so many
    // users and so many authorities.
    @GuardedBy("mGetProviderKeys")
    final SparseArray<ProviderKey> mGetProviderKeys = new SparseArray<>();
    final ArrayMap<ProviderKey, ProviderKey> mGetProviderKeys = new ArrayMap<>();

    final ArrayMap<Activity, ArrayList<OnActivityPausedListener>> mOnPauseListeners
        = new ArrayMap<Activity, ArrayList<OnActivityPausedListener>>();
@@ -7020,11 +7016,11 @@ public final class ActivityThread extends ClientTransactionHandler
    }

    private ProviderKey getGetProviderKey(String auth, int userId) {
        final int key = ProviderKey.hashCode(auth, userId);
        final ProviderKey key = new ProviderKey(auth, userId);
        synchronized (mGetProviderKeys) {
            ProviderKey lock = mGetProviderKeys.get(key);
            if (lock == null) {
                lock = new ProviderKey(auth, userId);
                lock = key;
                mGetProviderKeys.put(key, lock);
            }
            return lock;
+4 −1
Original line number Diff line number Diff line
@@ -1340,7 +1340,10 @@ public final class BluetoothDevice implements Parcelable, Attributable {
            if (alias == null) {
                return getName();
            }
            return alias;
            return alias
                    .replace('\t', ' ')
                    .replace('\n', ' ')
                    .replace('\r', ' ');
        } catch (RemoteException e) {
            Log.e(TAG, "", e);
        }
+7 −0
Original line number Diff line number Diff line
@@ -102,6 +102,13 @@ public abstract class PlayerBase {
        mState = AudioPlaybackConfiguration.PLAYER_STATE_IDLE;
    };

    /** @hide */
    public int getPlayerIId() {
        synchronized (mLock) {
            return mPlayerIId;
        }
    }

    /**
     * Call from derived class when instantiation / initialization is successful
     */
+5 −5
Original line number Diff line number Diff line
@@ -93,9 +93,9 @@ public class CompanionDeviceActivity extends Activity {
            final DeviceFilterPair selectedDevice = getService().mDevicesFound.get(0);
            setTitle(Html.fromHtml(getString(
                    R.string.confirmation_title,
                    getCallingAppName(),
                    profileName,
                    selectedDevice.getDisplayName()), 0));
                    Html.escapeHtml(getCallingAppName()),
                    Html.escapeHtml(selectedDevice.getDisplayName())), 0));

            mPairButton = findViewById(R.id.button_pair);
            mPairButton.setOnClickListener(v -> onDeviceConfirmed(getService().mSelectedDevice));
            getService().mSelectedDevice = selectedDevice;
@@ -108,8 +108,8 @@ public class CompanionDeviceActivity extends Activity {
            mPairButton = findViewById(R.id.button_pair);
            mPairButton.setVisibility(View.GONE);
            setTitle(Html.fromHtml(getString(R.string.chooser_title,
                    profileName,
                    getCallingAppName()), 0));
                    Html.escapeHtml(profileName),
                    Html.escapeHtml(getCallingAppName())), 0));
            mDeviceListView = findViewById(R.id.device_list);
            mDevicesAdapter = new DevicesAdapter();
            mDeviceListView.setAdapter(mDevicesAdapter);
Loading