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

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

Merge cherrypicks of [15831545, 15831526, 15831634, 15831684, 15831293,...

Merge cherrypicks of [15831545, 15831526, 15831634, 15831684, 15831293, 15831546, 15831847, 15831808, 15831638, 15831639, 15831558, 15831793, 15831794, 15831795, 15831796, 15831797, 15831798, 15831799, 15831800, 15831801, 15831802, 15831803, 15831804, 15831640, 15831849, 15831810, 15831811, 15831850, 15831641, 15831805, 15831812, 15831642, 15831813, 15831851, 15831852, 15831887, 15831888, 15831559, 15831814, 15831815, 15831853, 15831854, 15831855, 15831315] into sc-release

Change-Id: I6b2fbc1d2e4c5f02209d5d3e86b453369df2132f
parents cebf5c06 39627225
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>>();
@@ -7015,11 +7011,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
@@ -1329,7 +1329,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