Loading apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java +11 −6 Original line number Diff line number Diff line Loading @@ -456,7 +456,7 @@ public class AppStandbyController implements AppStandbyInternal { mSystemServicesReady = true; // Offload to handler thread to avoid boot time impact. mHandler.post(mInjector::updatePowerWhitelistCache); mHandler.post(AppStandbyController.this::updatePowerWhitelistCache); boolean userFileExists; synchronized (mAppIdleLock) { Loading Loading @@ -1684,6 +1684,14 @@ public class AppStandbyController implements AppStandbyInternal { } } private void updatePowerWhitelistCache() { if (mInjector.getBootPhase() < PHASE_SYSTEM_SERVICES_READY) { return; } mInjector.updatePowerWhitelistCache(); postCheckIdleStates(UserHandle.USER_ALL); } private class PackageReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Loading Loading @@ -1999,10 +2007,7 @@ public class AppStandbyController implements AppStandbyInternal { } } private void updatePowerWhitelistCache() { if (mBootPhase < PHASE_SYSTEM_SERVICES_READY) { return; } void updatePowerWhitelistCache() { try { // Don't call out to DeviceIdleController with the lock held. final String[] whitelistedPkgs = Loading Loading @@ -2204,7 +2209,7 @@ public class AppStandbyController implements AppStandbyInternal { break; case PowerManager.ACTION_POWER_SAVE_WHITELIST_CHANGED: if (mSystemServicesReady) { mHandler.post(mInjector::updatePowerWhitelistCache); mHandler.post(AppStandbyController.this::updatePowerWhitelistCache); } break; } Loading cmds/statsd/src/atoms.proto +6 −0 Original line number Diff line number Diff line Loading @@ -5178,6 +5178,12 @@ message DataUsageBytesTransfer { // record is combined across opportunistic data subscriptions. // See {@link SubscriptionManager#setOpportunistic}. optional DataSubscriptionState opportunistic_data_sub = 10; // Indicate whether NR is connected, server side could use this with RAT type to determine if // the record is for 5G NSA (Non Stand Alone) mode, where the primary cell is still LTE and // network allocates a secondary 5G cell so telephony reports RAT = LTE along with NR state as // connected. optional bool is_nr_connected = 11; } /** Loading core/java/android/net/NetworkTemplate.java +12 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,15 @@ public class NetworkTemplate implements Parcelable { * @hide */ public static final int NETWORK_TYPE_ALL = -1; /** * Virtual RAT type to represent 5G NSA (Non Stand Alone) mode, where the primary cell is * still LTE and network allocates a secondary 5G cell so telephony reports RAT = LTE along * with NR state as connected. This should not be overlapped with any of the * {@code TelephonyManager.NETWORK_TYPE_*} constants. * * @hide */ public static final int NETWORK_TYPE_5G_NSA = -2; private static boolean isKnownMatchRule(final int rule) { switch (rule) { Loading Loading @@ -475,6 +484,9 @@ public class NetworkTemplate implements Parcelable { return TelephonyManager.NETWORK_TYPE_LTE; case TelephonyManager.NETWORK_TYPE_NR: return TelephonyManager.NETWORK_TYPE_NR; // Virtual RAT type for 5G NSA mode, see {@link NetworkTemplate#NETWORK_TYPE_5G_NSA}. case NetworkTemplate.NETWORK_TYPE_5G_NSA: return NetworkTemplate.NETWORK_TYPE_5G_NSA; default: return TelephonyManager.NETWORK_TYPE_UNKNOWN; } Loading core/java/android/speech/tts/TextToSpeech.java +27 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,19 @@ import java.util.Set; * notified of the completion of the initialization.<br> * When you are done using the TextToSpeech instance, call the {@link #shutdown()} method * to release the native resources used by the TextToSpeech engine. * * Apps targeting Android 11 that use text-to-speech should declare {@link * TextToSpeech.Engine#INTENT_ACTION_TTS_SERVICE} in the <code><queries></code> elements of their * manifest: * * <code> * <queries> * ... * <intent> * <action android:name="android.intent.action.TTS_SERVICE" /> * </intent> * </queries> * </code> */ public class TextToSpeech { Loading Loading @@ -239,6 +252,20 @@ public class TextToSpeech { * through {@link TextToSpeech#getFeatures(java.util.Locale)}. * </li> * </ul> * * Apps targeting Android 11 that use text-to-speech should declare {@link * #INTENT_ACTION_TTS_SERVICE} in the <code><queries></code> elements of their * manifest: * * <code> * <queries> * ... * <intent> * <action android:name="android.intent.action.TTS_SERVICE" /> * </intent> * </queries> * </code> */ public class Engine { Loading core/java/android/view/ImeFocusController.java +5 −5 Original line number Diff line number Diff line Loading @@ -125,10 +125,10 @@ public final class ImeFocusController { final View viewForWindowFocus = focusedView != null ? focusedView : mViewRootImpl.mView; onViewFocusChanged(viewForWindowFocus, true); // Starting new input when the next focused view is same as served view but the // editor is not aligned with the same editor or editor is inactive. final boolean nextFocusIsServedView = mServedView != null && mServedView == focusedView; if (nextFocusIsServedView && !immDelegate.isSameEditorAndAcceptingText(focusedView)) { // Starting new input when the next focused view is same as served view but the currently // active connection (if any) is not associated with it. final boolean nextFocusIsServedView = mServedView == viewForWindowFocus; if (nextFocusIsServedView && !immDelegate.hasActiveConnection(viewForWindowFocus)) { forceFocus = true; } Loading Loading @@ -254,7 +254,7 @@ public final class ImeFocusController { void setCurrentRootView(ViewRootImpl rootView); boolean isCurrentRootView(ViewRootImpl rootView); boolean isRestartOnNextWindowFocus(boolean reset); boolean isSameEditorAndAcceptingText(View view); boolean hasActiveConnection(View view); } public View getServedView() { Loading Loading
apex/jobscheduler/service/java/com/android/server/usage/AppStandbyController.java +11 −6 Original line number Diff line number Diff line Loading @@ -456,7 +456,7 @@ public class AppStandbyController implements AppStandbyInternal { mSystemServicesReady = true; // Offload to handler thread to avoid boot time impact. mHandler.post(mInjector::updatePowerWhitelistCache); mHandler.post(AppStandbyController.this::updatePowerWhitelistCache); boolean userFileExists; synchronized (mAppIdleLock) { Loading Loading @@ -1684,6 +1684,14 @@ public class AppStandbyController implements AppStandbyInternal { } } private void updatePowerWhitelistCache() { if (mInjector.getBootPhase() < PHASE_SYSTEM_SERVICES_READY) { return; } mInjector.updatePowerWhitelistCache(); postCheckIdleStates(UserHandle.USER_ALL); } private class PackageReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Loading Loading @@ -1999,10 +2007,7 @@ public class AppStandbyController implements AppStandbyInternal { } } private void updatePowerWhitelistCache() { if (mBootPhase < PHASE_SYSTEM_SERVICES_READY) { return; } void updatePowerWhitelistCache() { try { // Don't call out to DeviceIdleController with the lock held. final String[] whitelistedPkgs = Loading Loading @@ -2204,7 +2209,7 @@ public class AppStandbyController implements AppStandbyInternal { break; case PowerManager.ACTION_POWER_SAVE_WHITELIST_CHANGED: if (mSystemServicesReady) { mHandler.post(mInjector::updatePowerWhitelistCache); mHandler.post(AppStandbyController.this::updatePowerWhitelistCache); } break; } Loading
cmds/statsd/src/atoms.proto +6 −0 Original line number Diff line number Diff line Loading @@ -5178,6 +5178,12 @@ message DataUsageBytesTransfer { // record is combined across opportunistic data subscriptions. // See {@link SubscriptionManager#setOpportunistic}. optional DataSubscriptionState opportunistic_data_sub = 10; // Indicate whether NR is connected, server side could use this with RAT type to determine if // the record is for 5G NSA (Non Stand Alone) mode, where the primary cell is still LTE and // network allocates a secondary 5G cell so telephony reports RAT = LTE along with NR state as // connected. optional bool is_nr_connected = 11; } /** Loading
core/java/android/net/NetworkTemplate.java +12 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,15 @@ public class NetworkTemplate implements Parcelable { * @hide */ public static final int NETWORK_TYPE_ALL = -1; /** * Virtual RAT type to represent 5G NSA (Non Stand Alone) mode, where the primary cell is * still LTE and network allocates a secondary 5G cell so telephony reports RAT = LTE along * with NR state as connected. This should not be overlapped with any of the * {@code TelephonyManager.NETWORK_TYPE_*} constants. * * @hide */ public static final int NETWORK_TYPE_5G_NSA = -2; private static boolean isKnownMatchRule(final int rule) { switch (rule) { Loading Loading @@ -475,6 +484,9 @@ public class NetworkTemplate implements Parcelable { return TelephonyManager.NETWORK_TYPE_LTE; case TelephonyManager.NETWORK_TYPE_NR: return TelephonyManager.NETWORK_TYPE_NR; // Virtual RAT type for 5G NSA mode, see {@link NetworkTemplate#NETWORK_TYPE_5G_NSA}. case NetworkTemplate.NETWORK_TYPE_5G_NSA: return NetworkTemplate.NETWORK_TYPE_5G_NSA; default: return TelephonyManager.NETWORK_TYPE_UNKNOWN; } Loading
core/java/android/speech/tts/TextToSpeech.java +27 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,19 @@ import java.util.Set; * notified of the completion of the initialization.<br> * When you are done using the TextToSpeech instance, call the {@link #shutdown()} method * to release the native resources used by the TextToSpeech engine. * * Apps targeting Android 11 that use text-to-speech should declare {@link * TextToSpeech.Engine#INTENT_ACTION_TTS_SERVICE} in the <code><queries></code> elements of their * manifest: * * <code> * <queries> * ... * <intent> * <action android:name="android.intent.action.TTS_SERVICE" /> * </intent> * </queries> * </code> */ public class TextToSpeech { Loading Loading @@ -239,6 +252,20 @@ public class TextToSpeech { * through {@link TextToSpeech#getFeatures(java.util.Locale)}. * </li> * </ul> * * Apps targeting Android 11 that use text-to-speech should declare {@link * #INTENT_ACTION_TTS_SERVICE} in the <code><queries></code> elements of their * manifest: * * <code> * <queries> * ... * <intent> * <action android:name="android.intent.action.TTS_SERVICE" /> * </intent> * </queries> * </code> */ public class Engine { Loading
core/java/android/view/ImeFocusController.java +5 −5 Original line number Diff line number Diff line Loading @@ -125,10 +125,10 @@ public final class ImeFocusController { final View viewForWindowFocus = focusedView != null ? focusedView : mViewRootImpl.mView; onViewFocusChanged(viewForWindowFocus, true); // Starting new input when the next focused view is same as served view but the // editor is not aligned with the same editor or editor is inactive. final boolean nextFocusIsServedView = mServedView != null && mServedView == focusedView; if (nextFocusIsServedView && !immDelegate.isSameEditorAndAcceptingText(focusedView)) { // Starting new input when the next focused view is same as served view but the currently // active connection (if any) is not associated with it. final boolean nextFocusIsServedView = mServedView == viewForWindowFocus; if (nextFocusIsServedView && !immDelegate.hasActiveConnection(viewForWindowFocus)) { forceFocus = true; } Loading Loading @@ -254,7 +254,7 @@ public final class ImeFocusController { void setCurrentRootView(ViewRootImpl rootView); boolean isCurrentRootView(ViewRootImpl rootView); boolean isRestartOnNextWindowFocus(boolean reset); boolean isSameEditorAndAcceptingText(View view); boolean hasActiveConnection(View view); } public View getServedView() { Loading