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

Commit 816360a9 authored by Xin Li's avatar Xin Li
Browse files

Merge ab/6692658 into stage-aosp-rvc-ts-dev

Bug: 148878042
Merged-In: Ib6b5679f22901d2d9e7996e25b19318cc1916460
Change-Id: Ib8d508dd51391958ac12cc5b67a46c89f6703bf3
parents 8162b6e0 c2946877
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -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) {
@@ -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) {
@@ -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 =
@@ -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;
            }
+6 −0
Original line number Diff line number Diff line
@@ -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;
}

/**
+12 −0
Original line number Diff line number Diff line
@@ -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) {
@@ -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;
        }
+27 −0
Original line number Diff line number Diff line
@@ -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 {

@@ -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 {

+5 −5
Original line number Diff line number Diff line
@@ -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;
        }

@@ -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