Loading core/java/android/companion/BluetoothDeviceFilter.java +10 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,16 @@ public final class BluetoothDeviceFilter implements DeviceFilter<BluetoothDevice return Objects.hash(mNamePattern, mAddress, mServiceUuids, mServiceUuidMasks); } @Override public String toString() { return "BluetoothDeviceFilter{" + "mNamePattern=" + mNamePattern + ", mAddress='" + mAddress + '\'' + ", mServiceUuids=" + mServiceUuids + ", mServiceUuidMasks=" + mServiceUuidMasks + '}'; } @Override public int describeContents() { return 0; Loading core/java/android/content/res/Configuration.java +11 −3 Original line number Diff line number Diff line Loading @@ -45,7 +45,6 @@ import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.TestApi; import android.app.UiModeManager; import android.app.WindowConfiguration; import android.compat.annotation.UnsupportedAppUsage; import android.content.LocaleProto; Loading Loading @@ -928,7 +927,13 @@ public final class Configuration implements Parcelable, Comparable<Configuration fontScale = o.fontScale; mcc = o.mcc; mnc = o.mnc; locale = o.locale == null ? null : (Locale) o.locale.clone(); if (o.locale == null) { locale = null; } else if (!o.locale.equals(locale)) { // Only clone a new Locale instance if we need to: the clone() is // both CPU and GC intensive. locale = (Locale) o.locale.clone(); } o.fixUpLocaleList(); mLocaleList = o.mLocaleList; userSetLocale = o.userSetLocale; Loading Loading @@ -1624,9 +1629,12 @@ public final class Configuration implements Parcelable, Comparable<Configuration if ((mask & ActivityInfo.CONFIG_LOCALE) != 0) { mLocaleList = delta.mLocaleList; if (!mLocaleList.isEmpty()) { if (!delta.locale.equals(locale)) { // Don't churn a new Locale clone unless we're actually changing it locale = (Locale) delta.locale.clone(); } } } if ((mask & ActivityInfo.CONFIG_LAYOUT_DIRECTION) != 0) { final int deltaScreenLayoutDir = delta.screenLayout & SCREENLAYOUT_LAYOUTDIR_MASK; screenLayout = (screenLayout & ~SCREENLAYOUT_LAYOUTDIR_MASK) | deltaScreenLayoutDir; Loading packages/CompanionDeviceManager/src/com/android/companiondevicemanager/DeviceDiscoveryService.java +11 −10 Original line number Diff line number Diff line Loading @@ -259,18 +259,19 @@ public class DeviceDiscoveryService extends Service { private void onDeviceFound(@Nullable DeviceFilterPair device) { if (device == null) return; if (mDevicesFound.contains(device)) { return; } if (DEBUG) Log.i(LOG_TAG, "Found device " + device); Handler.getMain().sendMessage(obtainMessage( DeviceDiscoveryService::onDeviceFoundMainThread, this, device)); } @MainThread void onDeviceFoundMainThread(@NonNull DeviceFilterPair device) { if (mDevicesFound.contains(device)) { Log.i(LOG_TAG, "Skipping device " + device + " - already among found devices"); return; } Log.i(LOG_TAG, "Found device " + device); if (mDevicesFound.isEmpty()) { onReadyToShowUI(); } Loading Loading @@ -432,10 +433,10 @@ public class DeviceDiscoveryService extends Service { @Override public String toString() { return "DeviceFilterPair{" + "device=" + device + ", filter=" + filter + '}'; return "DeviceFilterPair{" + "device=" + device + " " + getDisplayName() + ", filter=" + filter + '}'; } } Loading services/core/java/com/android/server/notification/NotificationManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -318,7 +318,7 @@ public class NotificationManagerService extends SystemService { static final boolean DEBUG_INTERRUPTIVENESS = SystemProperties.getBoolean( "debug.notification.interruptiveness", false); static final int MAX_PACKAGE_NOTIFICATIONS = 25; static final int MAX_PACKAGE_NOTIFICATIONS = 50; static final float DEFAULT_MAX_NOTIFICATION_ENQUEUE_RATE = 5f; // message codes Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +6 −10 Original line number Diff line number Diff line Loading @@ -209,7 +209,6 @@ import com.android.server.policy.keyguard.KeyguardStateMonitor.StateCallback; import com.android.server.statusbar.StatusBarManagerInternal; import com.android.server.vr.VrManagerInternal; import com.android.server.wm.ActivityTaskManagerInternal; import com.android.server.wm.ActivityTaskManagerInternal.SleepToken; import com.android.server.wm.AppTransition; import com.android.server.wm.DisplayPolicy; import com.android.server.wm.DisplayRotation; Loading Loading @@ -491,7 +490,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { private boolean mPendingKeyguardOccluded; private boolean mKeyguardOccludedChanged; SleepToken mScreenOffSleepToken; private ActivityTaskManagerInternal.SleepTokenAcquirer mScreenOffSleepTokenAcquirer; volatile boolean mKeyguardOccluded; Intent mHomeIntent; Intent mCarDockIntent; Loading Loading @@ -1741,6 +1740,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { new AccessibilityShortcutController(mContext, new Handler(), mCurrentUserId); mLogger = new MetricsLogger(); mScreenOffSleepTokenAcquirer = mActivityTaskManagerInternal .createSleepTokenAcquirer("ScreenOff"); Resources res = mContext.getResources(); mWakeOnDpadKeyPress = res.getBoolean(com.android.internal.R.bool.config_wakeOnDpadKeyPress); Loading Loading @@ -4988,15 +4990,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { // TODO (multidisplay): Support multiple displays in WindowManagerPolicy. private void updateScreenOffSleepToken(boolean acquire) { if (acquire) { if (mScreenOffSleepToken == null) { mScreenOffSleepToken = mActivityTaskManagerInternal.acquireSleepToken( "ScreenOff", DEFAULT_DISPLAY); } mScreenOffSleepTokenAcquirer.acquire(DEFAULT_DISPLAY); } else { if (mScreenOffSleepToken != null) { mScreenOffSleepToken.release(); mScreenOffSleepToken = null; } mScreenOffSleepTokenAcquirer.release(DEFAULT_DISPLAY); } } Loading Loading
core/java/android/companion/BluetoothDeviceFilter.java +10 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,16 @@ public final class BluetoothDeviceFilter implements DeviceFilter<BluetoothDevice return Objects.hash(mNamePattern, mAddress, mServiceUuids, mServiceUuidMasks); } @Override public String toString() { return "BluetoothDeviceFilter{" + "mNamePattern=" + mNamePattern + ", mAddress='" + mAddress + '\'' + ", mServiceUuids=" + mServiceUuids + ", mServiceUuidMasks=" + mServiceUuidMasks + '}'; } @Override public int describeContents() { return 0; Loading
core/java/android/content/res/Configuration.java +11 −3 Original line number Diff line number Diff line Loading @@ -45,7 +45,6 @@ import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.TestApi; import android.app.UiModeManager; import android.app.WindowConfiguration; import android.compat.annotation.UnsupportedAppUsage; import android.content.LocaleProto; Loading Loading @@ -928,7 +927,13 @@ public final class Configuration implements Parcelable, Comparable<Configuration fontScale = o.fontScale; mcc = o.mcc; mnc = o.mnc; locale = o.locale == null ? null : (Locale) o.locale.clone(); if (o.locale == null) { locale = null; } else if (!o.locale.equals(locale)) { // Only clone a new Locale instance if we need to: the clone() is // both CPU and GC intensive. locale = (Locale) o.locale.clone(); } o.fixUpLocaleList(); mLocaleList = o.mLocaleList; userSetLocale = o.userSetLocale; Loading Loading @@ -1624,9 +1629,12 @@ public final class Configuration implements Parcelable, Comparable<Configuration if ((mask & ActivityInfo.CONFIG_LOCALE) != 0) { mLocaleList = delta.mLocaleList; if (!mLocaleList.isEmpty()) { if (!delta.locale.equals(locale)) { // Don't churn a new Locale clone unless we're actually changing it locale = (Locale) delta.locale.clone(); } } } if ((mask & ActivityInfo.CONFIG_LAYOUT_DIRECTION) != 0) { final int deltaScreenLayoutDir = delta.screenLayout & SCREENLAYOUT_LAYOUTDIR_MASK; screenLayout = (screenLayout & ~SCREENLAYOUT_LAYOUTDIR_MASK) | deltaScreenLayoutDir; Loading
packages/CompanionDeviceManager/src/com/android/companiondevicemanager/DeviceDiscoveryService.java +11 −10 Original line number Diff line number Diff line Loading @@ -259,18 +259,19 @@ public class DeviceDiscoveryService extends Service { private void onDeviceFound(@Nullable DeviceFilterPair device) { if (device == null) return; if (mDevicesFound.contains(device)) { return; } if (DEBUG) Log.i(LOG_TAG, "Found device " + device); Handler.getMain().sendMessage(obtainMessage( DeviceDiscoveryService::onDeviceFoundMainThread, this, device)); } @MainThread void onDeviceFoundMainThread(@NonNull DeviceFilterPair device) { if (mDevicesFound.contains(device)) { Log.i(LOG_TAG, "Skipping device " + device + " - already among found devices"); return; } Log.i(LOG_TAG, "Found device " + device); if (mDevicesFound.isEmpty()) { onReadyToShowUI(); } Loading Loading @@ -432,10 +433,10 @@ public class DeviceDiscoveryService extends Service { @Override public String toString() { return "DeviceFilterPair{" + "device=" + device + ", filter=" + filter + '}'; return "DeviceFilterPair{" + "device=" + device + " " + getDisplayName() + ", filter=" + filter + '}'; } } Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -318,7 +318,7 @@ public class NotificationManagerService extends SystemService { static final boolean DEBUG_INTERRUPTIVENESS = SystemProperties.getBoolean( "debug.notification.interruptiveness", false); static final int MAX_PACKAGE_NOTIFICATIONS = 25; static final int MAX_PACKAGE_NOTIFICATIONS = 50; static final float DEFAULT_MAX_NOTIFICATION_ENQUEUE_RATE = 5f; // message codes Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +6 −10 Original line number Diff line number Diff line Loading @@ -209,7 +209,6 @@ import com.android.server.policy.keyguard.KeyguardStateMonitor.StateCallback; import com.android.server.statusbar.StatusBarManagerInternal; import com.android.server.vr.VrManagerInternal; import com.android.server.wm.ActivityTaskManagerInternal; import com.android.server.wm.ActivityTaskManagerInternal.SleepToken; import com.android.server.wm.AppTransition; import com.android.server.wm.DisplayPolicy; import com.android.server.wm.DisplayRotation; Loading Loading @@ -491,7 +490,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { private boolean mPendingKeyguardOccluded; private boolean mKeyguardOccludedChanged; SleepToken mScreenOffSleepToken; private ActivityTaskManagerInternal.SleepTokenAcquirer mScreenOffSleepTokenAcquirer; volatile boolean mKeyguardOccluded; Intent mHomeIntent; Intent mCarDockIntent; Loading Loading @@ -1741,6 +1740,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { new AccessibilityShortcutController(mContext, new Handler(), mCurrentUserId); mLogger = new MetricsLogger(); mScreenOffSleepTokenAcquirer = mActivityTaskManagerInternal .createSleepTokenAcquirer("ScreenOff"); Resources res = mContext.getResources(); mWakeOnDpadKeyPress = res.getBoolean(com.android.internal.R.bool.config_wakeOnDpadKeyPress); Loading Loading @@ -4988,15 +4990,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { // TODO (multidisplay): Support multiple displays in WindowManagerPolicy. private void updateScreenOffSleepToken(boolean acquire) { if (acquire) { if (mScreenOffSleepToken == null) { mScreenOffSleepToken = mActivityTaskManagerInternal.acquireSleepToken( "ScreenOff", DEFAULT_DISPLAY); } mScreenOffSleepTokenAcquirer.acquire(DEFAULT_DISPLAY); } else { if (mScreenOffSleepToken != null) { mScreenOffSleepToken.release(); mScreenOffSleepToken = null; } mScreenOffSleepTokenAcquirer.release(DEFAULT_DISPLAY); } } Loading