Loading core/java/android/accounts/Account.java +7 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.util.Log; import com.android.internal.annotations.GuardedBy; import java.util.Objects; import java.util.Set; /** Loading Loading @@ -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; Loading core/java/android/app/ActivityThread.java +4 −8 Original line number Diff line number Diff line Loading @@ -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; } } Loading @@ -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>>(); Loading Loading @@ -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; Loading core/java/android/bluetooth/BluetoothDevice.java +4 −1 Original line number Diff line number Diff line Loading @@ -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); } Loading media/java/android/media/PlayerBase.java +7 −0 Original line number Diff line number Diff line Loading @@ -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 */ Loading packages/CompanionDeviceManager/src/com/android/companiondevicemanager/CompanionDeviceActivity.java +5 −5 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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 Loading
core/java/android/accounts/Account.java +7 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.util.Log; import com.android.internal.annotations.GuardedBy; import java.util.Objects; import java.util.Set; /** Loading Loading @@ -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; Loading
core/java/android/app/ActivityThread.java +4 −8 Original line number Diff line number Diff line Loading @@ -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; } } Loading @@ -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>>(); Loading Loading @@ -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; Loading
core/java/android/bluetooth/BluetoothDevice.java +4 −1 Original line number Diff line number Diff line Loading @@ -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); } Loading
media/java/android/media/PlayerBase.java +7 −0 Original line number Diff line number Diff line Loading @@ -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 */ Loading
packages/CompanionDeviceManager/src/com/android/companiondevicemanager/CompanionDeviceActivity.java +5 −5 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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