diff options
31 files changed, 402 insertions, 182 deletions
diff --git a/config/hiddenapi-light-greylist.txt b/config/hiddenapi-light-greylist.txt index 9355862fa6a3..a8f85cb03104 100644 --- a/config/hiddenapi-light-greylist.txt +++ b/config/hiddenapi-light-greylist.txt @@ -262,6 +262,7 @@ Landroid/app/ActivityThread;->mNumVisibleActivities:I Landroid/app/ActivityThread;->mPackages:Landroid/util/ArrayMap; Landroid/app/ActivityThread;->mPendingConfiguration:Landroid/content/res/Configuration; Landroid/app/ActivityThread;->mProviderMap:Landroid/util/ArrayMap; +Landroid/app/ActivityThread;->mProviderRefCountMap:Landroid/util/ArrayMap; Landroid/app/ActivityThread;->mResourcePackages:Landroid/util/ArrayMap; Landroid/app/ActivityThread;->mResourcesManager:Landroid/app/ResourcesManager; Landroid/app/ActivityThread;->mServices:Landroid/util/ArrayMap; @@ -910,9 +911,14 @@ Landroid/app/SearchManager;->isVisible()Z Landroid/app/SearchManager;->launchAssist(Landroid/os/Bundle;)V Landroid/app/SearchManager;->mSearchDialog:Landroid/app/SearchDialog; Landroid/app/SearchManager;->startSearch(Ljava/lang/String;ZLandroid/content/ComponentName;Landroid/os/Bundle;ZLandroid/graphics/Rect;)V +Landroid/app/servertransaction/ActivityResultItem;->mResultInfoList:Ljava/util/List; +Landroid/app/servertransaction/ClientTransaction;->getActivityToken()Landroid/os/IBinder; +Landroid/app/servertransaction/ClientTransaction;->getCallbacks()Ljava/util/List; +Landroid/app/servertransaction/ClientTransaction;->getLifecycleStateRequest()Landroid/app/servertransaction/ActivityLifecycleItem; Landroid/app/servertransaction/ClientTransaction;->mActivityCallbacks:Ljava/util/List; Landroid/app/servertransaction/LaunchActivityItem;->mInfo:Landroid/content/pm/ActivityInfo; Landroid/app/servertransaction/LaunchActivityItem;->mIntent:Landroid/content/Intent; +Landroid/app/servertransaction/NewIntentItem;->mIntents:Ljava/util/List; Landroid/app/Service;->attach(Landroid/content/Context;Landroid/app/ActivityThread;Ljava/lang/String;Landroid/os/IBinder;Landroid/app/Application;Ljava/lang/Object;)V Landroid/app/Service;->mActivityManager:Landroid/app/IActivityManager; Landroid/app/Service;->mApplication:Landroid/app/Application; @@ -1705,6 +1711,12 @@ Landroid/content/pm/PackageParser$Provider;->syncable:Z Landroid/content/pm/PackageParser$ProviderIntentInfo;->provider:Landroid/content/pm/PackageParser$Provider; Landroid/content/pm/PackageParser$Service;->info:Landroid/content/pm/ServiceInfo; Landroid/content/pm/PackageParser$ServiceIntentInfo;->service:Landroid/content/pm/PackageParser$Service; +Landroid/content/pm/PackageParser$SigningDetails$Builder;-><init>()V +Landroid/content/pm/PackageParser$SigningDetails$Builder;->build()Landroid/content/pm/PackageParser$SigningDetails; +Landroid/content/pm/PackageParser$SigningDetails$Builder;->setPastSigningCertificates([Landroid/content/pm/Signature;)Landroid/content/pm/PackageParser$SigningDetails$Builder; +Landroid/content/pm/PackageParser$SigningDetails$Builder;->setPastSigningCertificatesFlags([I)Landroid/content/pm/PackageParser$SigningDetails$Builder; +Landroid/content/pm/PackageParser$SigningDetails$Builder;->setSignatures([Landroid/content/pm/Signature;)Landroid/content/pm/PackageParser$SigningDetails$Builder; +Landroid/content/pm/PackageParser$SigningDetails$Builder;->setSignatureSchemeVersion(I)Landroid/content/pm/PackageParser$SigningDetails$Builder; Landroid/content/pm/PackageParser$SigningDetails;->signatures:[Landroid/content/pm/Signature; Landroid/content/pm/PackageParser;-><init>()V Landroid/content/pm/PackageParser;->collectCertificates(Landroid/content/pm/PackageParser$Package;Ljava/io/File;Z)V @@ -5865,6 +5877,7 @@ Landroid/view/animation/TranslateAnimation;->mToXValue:F Landroid/view/animation/TranslateAnimation;->mToYValue:F Landroid/view/animation/TranslateYAnimation;-><init>(IFIF)V Landroid/view/autofill/IAutoFillManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/view/autofill/IAutoFillManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/view/autofill/IAutoFillManager; Landroid/view/Choreographer$CallbackQueue;->addCallbackLocked(JLjava/lang/Object;Ljava/lang/Object;)V Landroid/view/Choreographer$CallbackRecord;->run(J)V Landroid/view/Choreographer;->doFrame(JI)V @@ -9076,6 +9089,10 @@ Lorg/w3c/dom/ls/LSSerializerFilter;->getWhatToShow()I Lorg/w3c/dom/traversal/NodeFilter;->acceptNode(Lorg/w3c/dom/Node;)S Lorg/w3c/dom/traversal/NodeIterator;->detach()V Lorg/w3c/dom/traversal/NodeIterator;->nextNode()Lorg/w3c/dom/Node; +Lorg/xml/sax/ext/Attributes2Impl;->declared:[Z +Lorg/xml/sax/ext/Attributes2Impl;->specified:[Z +Lorg/xml/sax/ext/Locator2Impl;->encoding:Ljava/lang/String; +Lorg/xml/sax/ext/Locator2Impl;->version:Ljava/lang/String; Lorg/xml/sax/helpers/AttributesImpl;->badIndex(I)V Lorg/xml/sax/helpers/AttributesImpl;->data:[Ljava/lang/String; Lorg/xml/sax/helpers/AttributesImpl;->ensureCapacity(I)V diff --git a/core/java/android/os/Vibrator.java b/core/java/android/os/Vibrator.java index f1f6f414eba8..d2d8f1e159e5 100644 --- a/core/java/android/os/Vibrator.java +++ b/core/java/android/os/Vibrator.java @@ -72,12 +72,23 @@ public abstract class Vibrator { public @interface VibrationIntensity{} private final String mPackageName; + // The default vibration intensity level for haptic feedback. + @VibrationIntensity + private final int mDefaultHapticFeedbackIntensity; + // The default vibration intensity level for notifications. + @VibrationIntensity + private final int mDefaultNotificationVibrationIntensity; /** * @hide to prevent subclassing from outside of the framework */ public Vibrator() { mPackageName = ActivityThread.currentPackageName(); + final Context ctx = ActivityThread.currentActivityThread().getSystemContext(); + mDefaultHapticFeedbackIntensity = loadDefaultIntensity(ctx, + com.android.internal.R.integer.config_defaultHapticFeedbackIntensity); + mDefaultNotificationVibrationIntensity = loadDefaultIntensity(ctx, + com.android.internal.R.integer.config_defaultNotificationVibrationIntensity); } /** @@ -85,6 +96,14 @@ public abstract class Vibrator { */ protected Vibrator(Context context) { mPackageName = context.getOpPackageName(); + mDefaultHapticFeedbackIntensity = loadDefaultIntensity(context, + com.android.internal.R.integer.config_defaultHapticFeedbackIntensity); + mDefaultNotificationVibrationIntensity = loadDefaultIntensity(context, + com.android.internal.R.integer.config_defaultNotificationVibrationIntensity); + } + + private int loadDefaultIntensity(Context ctx, int resId) { + return ctx != null ? ctx.getResources().getInteger(resId) : VIBRATION_INTENSITY_MEDIUM; } /** @@ -92,7 +111,7 @@ public abstract class Vibrator { * @hide */ public int getDefaultHapticFeedbackIntensity() { - return VIBRATION_INTENSITY_MEDIUM; + return mDefaultHapticFeedbackIntensity; } /** @@ -100,7 +119,7 @@ public abstract class Vibrator { * @hide */ public int getDefaultNotificationVibrationIntensity() { - return VIBRATION_INTENSITY_HIGH; + return mDefaultNotificationVibrationIntensity; } /** diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index 65a612587827..baa38bb2f604 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -5060,9 +5060,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager child.assignParent(this); } else { child.mParent = this; - if (child.hasUnhandledKeyListener()) { - incrementChildUnhandledKeyListeners(); - } + } + if (child.hasUnhandledKeyListener()) { + incrementChildUnhandledKeyListeners(); } final boolean childHasFocus = child.hasFocus(); diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index ed67075d38d6..48f380d87dcc 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -76,7 +76,6 @@ import android.util.LongArray; import android.util.MergedConfiguration; import android.util.Slog; import android.util.SparseArray; -import android.util.SparseBooleanArray; import android.util.TimeUtils; import android.util.TypedValue; import android.view.Surface.OutOfResourcesException; @@ -5008,10 +5007,7 @@ public final class ViewRootImpl implements ViewParent, private int processKeyEvent(QueuedInputEvent q) { final KeyEvent event = (KeyEvent)q.mEvent; - mUnhandledKeyManager.mDispatched = false; - - if (mUnhandledKeyManager.hasFocus() - && mUnhandledKeyManager.dispatchUnique(mView, event)) { + if (mUnhandledKeyManager.preViewDispatch(event)) { return FINISH_HANDLED; } @@ -5024,7 +5020,10 @@ public final class ViewRootImpl implements ViewParent, return FINISH_NOT_HANDLED; } - if (mUnhandledKeyManager.dispatchUnique(mView, event)) { + // This dispatch is for windows that don't have a Window.Callback. Otherwise, + // the Window.Callback usually will have already called this (see + // DecorView.superDispatchKeyEvent) leaving this call a no-op. + if (mUnhandledKeyManager.dispatch(mView, event)) { return FINISH_HANDLED; } @@ -7062,6 +7061,10 @@ public final class ViewRootImpl implements ViewParent, stage = q.shouldSkipIme() ? mFirstPostImeInputStage : mFirstInputStage; } + if (q.mEvent instanceof KeyEvent) { + mUnhandledKeyManager.preDispatch((KeyEvent) q.mEvent); + } + if (stage != null) { handleWindowFocusChanged(); stage.deliver(q); @@ -7830,7 +7833,7 @@ public final class ViewRootImpl implements ViewParent, * @param event * @return {@code true} if the event was handled, {@code false} otherwise. */ - public boolean dispatchKeyFallbackEvent(KeyEvent event) { + public boolean dispatchUnhandledKeyEvent(KeyEvent event) { return mUnhandledKeyManager.dispatch(mView, event); } @@ -8422,35 +8425,74 @@ public final class ViewRootImpl implements ViewParent, } private static class UnhandledKeyManager { - // This is used to ensure that unhandled events are only dispatched once. We attempt // to dispatch more than once in order to achieve a certain order. Specifically, if we // are in an Activity or Dialog (and have a Window.Callback), the unhandled events should - // be dispatched after the view hierarchy, but before the Activity. However, if we aren't + // be dispatched after the view hierarchy, but before the Callback. However, if we aren't // in an activity, we still want unhandled keys to be dispatched. - boolean mDispatched = false; + private boolean mDispatched = true; - SparseBooleanArray mCapturedKeys = new SparseBooleanArray(); - WeakReference<View> mCurrentReceiver = null; + // Keeps track of which Views have unhandled key focus for which keys. This doesn't + // include modifiers. + private final SparseArray<WeakReference<View>> mCapturedKeys = new SparseArray<>(); - private void updateCaptureState(KeyEvent event) { - if (event.getAction() == KeyEvent.ACTION_DOWN) { - mCapturedKeys.append(event.getKeyCode(), true); + // The current receiver. This value is transient and used between the pre-dispatch and + // pre-view phase to ensure that other input-stages don't interfere with tracking. + private WeakReference<View> mCurrentReceiver = null; + + boolean dispatch(View root, KeyEvent event) { + if (mDispatched) { + return false; } - if (event.getAction() == KeyEvent.ACTION_UP) { - mCapturedKeys.delete(event.getKeyCode()); + View consumer; + try { + Trace.traceBegin(Trace.TRACE_TAG_VIEW, "UnhandledKeyEvent dispatch"); + mDispatched = true; + + consumer = root.dispatchUnhandledKeyEvent(event); + + // If an unhandled listener handles one, then keep track of it so that the + // consuming view is first to receive its repeats and release as well. + if (event.getAction() == KeyEvent.ACTION_DOWN) { + int keycode = event.getKeyCode(); + if (consumer != null && !KeyEvent.isModifierKey(keycode)) { + mCapturedKeys.put(keycode, new WeakReference<>(consumer)); + } + } + } finally { + Trace.traceEnd(Trace.TRACE_TAG_VIEW); } + return consumer != null; } - boolean dispatch(View root, KeyEvent event) { - Trace.traceBegin(Trace.TRACE_TAG_VIEW, "KeyFallback dispatch"); - mDispatched = true; - - updateCaptureState(event); + /** + * Called before the event gets dispatched to anything + */ + void preDispatch(KeyEvent event) { + // Always clean-up 'up' events since it's possible for earlier dispatch stages to + // consume them without consuming the corresponding 'down' event. + mCurrentReceiver = null; + if (event.getAction() == KeyEvent.ACTION_UP) { + int idx = mCapturedKeys.indexOfKey(event.getKeyCode()); + if (idx >= 0) { + mCurrentReceiver = mCapturedKeys.valueAt(idx); + mCapturedKeys.removeAt(idx); + } + } + } + /** + * Called before the event gets dispatched to the view hierarchy + * @return {@code true} if an unhandled handler has focus and consumed the event + */ + boolean preViewDispatch(KeyEvent event) { + mDispatched = false; + if (mCurrentReceiver == null) { + mCurrentReceiver = mCapturedKeys.get(event.getKeyCode()); + } if (mCurrentReceiver != null) { View target = mCurrentReceiver.get(); - if (mCapturedKeys.size() == 0) { + if (event.getAction() == KeyEvent.ACTION_UP) { mCurrentReceiver = null; } if (target != null && target.isAttachedToWindow()) { @@ -8459,24 +8501,7 @@ public final class ViewRootImpl implements ViewParent, // consume anyways so that we don't feed uncaptured key events to other views return true; } - - View consumer = root.dispatchUnhandledKeyEvent(event); - if (consumer != null) { - mCurrentReceiver = new WeakReference<>(consumer); - } - Trace.traceEnd(Trace.TRACE_TAG_VIEW); - return consumer != null; - } - - boolean hasFocus() { - return mCurrentReceiver != null; - } - - boolean dispatchUnique(View root, KeyEvent event) { - if (mDispatched) { - return false; - } - return dispatch(root, event); + return false; } } } diff --git a/core/java/com/android/internal/policy/DecorView.java b/core/java/com/android/internal/policy/DecorView.java index 465957d7cfd0..6ad1d72eaec4 100644 --- a/core/java/com/android/internal/policy/DecorView.java +++ b/core/java/com/android/internal/policy/DecorView.java @@ -429,7 +429,7 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind return true; } - return (getViewRootImpl() != null) && getViewRootImpl().dispatchKeyFallbackEvent(event); + return (getViewRootImpl() != null) && getViewRootImpl().dispatchUnhandledKeyEvent(event); } public boolean superDispatchKeyShortcutEvent(KeyEvent event) { diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index b0ecb3ecf11d..c856ed81d575 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -1108,6 +1108,15 @@ <string-array translatable="false" name="config_ringtoneEffectUris"> </string-array> + <!-- The default intensity level for haptic feedback. See + Settings.System.HAPTIC_FEEDBACK_INTENSITY more details on the constant values and + meanings. --> + <integer name="config_defaultHapticFeedbackIntensity">2</integer> + <!-- The default intensity level for notification vibrations. See + Settings.System.NOTIFICATION_VIBRATION_INTENSITY more details on the constant values and + meanings. --> + <integer name="config_defaultNotificationVibrationIntensity">2</integer> + <bool name="config_use_strict_phone_number_comparation">false</bool> <!-- Display low battery warning when battery level dips to this value. diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 8a045a07938c..faf9093c0fe9 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -3386,4 +3386,7 @@ <java-symbol type="drawable" name="ic_lock_lockdown" /> <java-symbol type="drawable" name="ic_arrow_forward" /> <java-symbol type="drawable" name="ic_permission" /> + + <java-symbol type="integer" name="config_defaultHapticFeedbackIntensity" /> + <java-symbol type="integer" name="config_defaultNotificationVibrationIntensity" /> </resources> diff --git a/media/java/android/media/MediaCodec.java b/media/java/android/media/MediaCodec.java index 02bf4e343ea3..2207a2a6d4fe 100644 --- a/media/java/android/media/MediaCodec.java +++ b/media/java/android/media/MediaCodec.java @@ -2545,6 +2545,10 @@ final public class MediaCodec { pattern = newPattern; } + private void setPattern(int blocksToEncrypt, int blocksToSkip) { + pattern = new Pattern(blocksToEncrypt, blocksToSkip); + } + @Override public String toString() { StringBuilder builder = new StringBuilder(); diff --git a/media/jni/android_media_MediaExtractor.cpp b/media/jni/android_media_MediaExtractor.cpp index a85552601b56..15957c6a9c5e 100644 --- a/media/jni/android_media_MediaExtractor.cpp +++ b/media/jni/android_media_MediaExtractor.cpp @@ -52,6 +52,7 @@ struct fields_t { jfieldID context; jmethodID cryptoInfoSetID; + jmethodID cryptoInfoSetPatternID; }; static fields_t gFields; @@ -654,6 +655,16 @@ static jboolean android_media_MediaExtractor_getSampleCryptoInfo( ivObj, mode); + int32_t encryptedByteBlock = 0, skipByteBlock = 0; + meta->findInt32(kKeyEncryptedByteBlock, &encryptedByteBlock); + meta->findInt32(kKeySkipByteBlock, &skipByteBlock); + + env->CallVoidMethod( + cryptoInfoObj, + gFields.cryptoInfoSetPatternID, + encryptedByteBlock, + skipByteBlock); + return JNI_TRUE; } @@ -669,6 +680,9 @@ static void android_media_MediaExtractor_native_init(JNIEnv *env) { gFields.cryptoInfoSetID = env->GetMethodID(clazz, "set", "(I[I[I[B[BI)V"); + + gFields.cryptoInfoSetPatternID = + env->GetMethodID(clazz, "setPattern", "(II)V"); } static void android_media_MediaExtractor_native_setup( diff --git a/packages/SettingsLib/res/values-as/arrays.xml b/packages/SettingsLib/res/values-as/arrays.xml index b8353eebd5a4..39c0b00f09ba 100644 --- a/packages/SettingsLib/res/values-as/arrays.xml +++ b/packages/SettingsLib/res/values-as/arrays.xml @@ -231,12 +231,12 @@ <item msgid="1064373276095698656">"পৰীক্ষণ কৰা চিত্ৰাংকণ কমাণ্ডবোৰ সেউজীয়া ৰঙত হাইলাইট কৰক"</item> </string-array> <string-array name="track_frame_time_entries"> - <item msgid="2193584639058893150">"অফ"</item> + <item msgid="2193584639058893150">"অফ হৈ আছে"</item> <item msgid="2751513398307949636">"স্ক্ৰীণত দণ্ড হিচাপে"</item> <item msgid="2355151170975410323">"<xliff:g id="AS_TYPED_COMMAND">adb shell dumpsys gfxinfo</xliff:g>ত"</item> </string-array> <string-array name="debug_hw_overdraw_entries"> - <item msgid="8190572633763871652">"বন্ধ কৰক"</item> + <item msgid="8190572633763871652">"অফ কৰক"</item> <item msgid="7688197031296835369">"পিক্সেল একাধিকবাৰ ব্যৱহৃত অংশসমূহ দেখুৱাওক"</item> <item msgid="2290859360633824369">"ডিউটাৰএন\'মেলীৰ অংশসমূহ দেখুৱাওক"</item> </string-array> diff --git a/packages/SettingsLib/res/values-as/strings.xml b/packages/SettingsLib/res/values-as/strings.xml index 77932fd06440..da76337fe9a8 100644 --- a/packages/SettingsLib/res/values-as/strings.xml +++ b/packages/SettingsLib/res/values-as/strings.xml @@ -118,7 +118,7 @@ <string name="bluetooth_hearingaid_right_pairing_message" msgid="1550373802309160891">"সোঁফালৰ শ্ৰৱণ যন্ত্ৰটো যোৰ পতোৱা হৈছে…"</string> <string name="bluetooth_hearingaid_left_battery_level" msgid="8797811465352097562">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g> বেটাৰি বাকী আছে"</string> <string name="bluetooth_hearingaid_right_battery_level" msgid="7309476148173459677">"সোঁ - বেটাৰি <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g>"</string> - <string name="accessibility_wifi_off" msgid="1166761729660614716">"ৱাই-ফাই অফহৈ আছে।"</string> + <string name="accessibility_wifi_off" msgid="1166761729660614716">"ৱাই-ফাই অফ হৈ আছে।"</string> <string name="accessibility_no_wifi" msgid="8834610636137374508">"ৱাইফাই সংযোগ বিচ্ছিন্ন হৈ আছে।"</string> <string name="accessibility_wifi_one_bar" msgid="4869376278894301820">"ৱাই-ফাই এদাল দণ্ড।"</string> <string name="accessibility_wifi_two_bars" msgid="3569851234710034416">"ৱাই-ফাইৰ দুডাল দণ্ড।"</string> @@ -133,7 +133,7 @@ <string name="tether_settings_title_wifi" msgid="3277144155960302049">"প\'ৰ্টেবল হ\'টস্প\'ট"</string> <string name="tether_settings_title_bluetooth" msgid="355855408317564420">"ব্লুটুথ টেডাৰিং"</string> <string name="tether_settings_title_usb_bluetooth" msgid="5355828977109785001">"টেডাৰ কৰি থকা হৈছে"</string> - <string name="tether_settings_title_all" msgid="8356136101061143841">"টেদৰিং আৰু প\'ৰ্টেবল হ\'টস্পট"</string> + <string name="tether_settings_title_all" msgid="8356136101061143841">"টেডাৰিং আৰু প\'ৰ্টেবল হটস্পট"</string> <string name="managed_user_title" msgid="8109605045406748842">"কৰ্মস্থানৰ সকলো এপ"</string> <string name="user_guest" msgid="8475274842845401871">"অতিথি"</string> <string name="unknown" msgid="1592123443519355854">"অজ্ঞাত"</string> diff --git a/packages/SettingsLib/res/values-de/strings.xml b/packages/SettingsLib/res/values-de/strings.xml index 135280a781b1..7fc5e4c4bd86 100644 --- a/packages/SettingsLib/res/values-de/strings.xml +++ b/packages/SettingsLib/res/values-de/strings.xml @@ -197,7 +197,7 @@ <string name="keep_screen_on" msgid="1146389631208760344">"Aktiv lassen"</string> <string name="keep_screen_on_summary" msgid="2173114350754293009">"Display wird beim Laden nie in den Ruhezustand versetzt"</string> <string name="bt_hci_snoop_log" msgid="3340699311158865670">"Bluetooth HCI-Snoop-Protokoll aktivieren"</string> - <string name="bt_hci_snoop_log_summary" msgid="366083475849911315">"Alle Bluetooth HCI-Pakete in einer Datei erfassen (Wenn diese Einstellung geändert wurde, muss Bluetooth umgeschaltet werden)"</string> + <string name="bt_hci_snoop_log_summary" msgid="366083475849911315">"Alle Bluetooth HCI-Pakete in einer Datei erfassen. (Wenn diese Einstellung geändert wurde, muss Bluetooth aus- und wieder eingeschaltet werden.)"</string> <string name="oem_unlock_enable" msgid="6040763321967327691">"OEM-Entsperrung"</string> <string name="oem_unlock_enable_summary" msgid="4720281828891618376">"Bootloader-Entsperrung zulassen"</string> <string name="confirm_enable_oem_unlock_title" msgid="4802157344812385674">"OEM-Entsperrung zulassen?"</string> diff --git a/packages/SettingsLib/res/values-hi/strings.xml b/packages/SettingsLib/res/values-hi/strings.xml index d7ee655d9592..9430345824fa 100644 --- a/packages/SettingsLib/res/values-hi/strings.xml +++ b/packages/SettingsLib/res/values-hi/strings.xml @@ -85,14 +85,14 @@ <string name="bluetooth_a2dp_profile_summary_connected" msgid="963376081347721598">"मीडिया ऑडियो से कनेक्ट किया गया"</string> <string name="bluetooth_headset_profile_summary_connected" msgid="7661070206715520671">"फ़ोन ऑडियो से कनेक्ट किया गया"</string> <string name="bluetooth_opp_profile_summary_connected" msgid="2611913495968309066">"फ़ाइल स्थानांतरण सर्वर से कनेक्ट किया गया"</string> - <string name="bluetooth_map_profile_summary_connected" msgid="8191407438851351713">"मानचित्र से कनेक्ट किया गया"</string> + <string name="bluetooth_map_profile_summary_connected" msgid="8191407438851351713">"मैप से कनेक्ट किया गया"</string> <string name="bluetooth_sap_profile_summary_connected" msgid="8561765057453083838">"SAP से कनेक्ट किया गया"</string> <string name="bluetooth_opp_profile_summary_not_connected" msgid="1267091356089086285">"फ़ाइल स्थानांतरण सर्वर से कनेक्ट नहीं किया गया"</string> <string name="bluetooth_hid_profile_summary_connected" msgid="3381760054215168689">"इनपुट डिवाइस से कनेक्ट किया गया"</string> <string name="bluetooth_pan_user_profile_summary_connected" msgid="6436258151814414028">"इंटरनेट के लिए डिवाइस से कनेक्ट है"</string> <string name="bluetooth_pan_nap_profile_summary_connected" msgid="1322694224800769308">"डिवाइस से इंटरनेट शेयर हो रहा है"</string> <string name="bluetooth_pan_profile_summary_use_for" msgid="5736111170225304239">"इंटरनेट से जुड़ने के लिए इस्तेमाल करें"</string> - <string name="bluetooth_map_profile_summary_use_for" msgid="5154200119919927434">"मानचित्र के लिए उपयोग करें"</string> + <string name="bluetooth_map_profile_summary_use_for" msgid="5154200119919927434">"मैप के लिए उपयोग करें"</string> <string name="bluetooth_sap_profile_summary_use_for" msgid="7085362712786907993">"सिम ऐक्सेस के लिए उपयोग करें"</string> <string name="bluetooth_a2dp_profile_summary_use_for" msgid="4630849022250168427">"मीडिया ऑडियो के लिए उपयोग करें"</string> <string name="bluetooth_headset_profile_summary_use_for" msgid="8705753622443862627">"फ़ोन ऑडियो के लिए उपयोग करें"</string> diff --git a/packages/SettingsLib/res/values-mr/strings.xml b/packages/SettingsLib/res/values-mr/strings.xml index 02e245f5ee43..514a55f18ba6 100644 --- a/packages/SettingsLib/res/values-mr/strings.xml +++ b/packages/SettingsLib/res/values-mr/strings.xml @@ -240,10 +240,10 @@ <string name="wifi_unmetered_label" msgid="6124098729457992931">"मीटरने न मोजलेले"</string> <string name="select_logd_size_title" msgid="7433137108348553508">"लॉगर बफर आकार"</string> <string name="select_logd_size_dialog_title" msgid="1206769310236476760">"प्रति लॉग बफर लॉगर आकार निवडा"</string> - <string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"लॉगरवर सतत असणारा संचय साफ करायचा?"</string> + <string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"लॉगरवर सतत असणारा स्टोरेज साफ करायचा?"</string> <string name="dev_logpersist_clear_warning_message" msgid="2256582531342994562">"सातत्याच्या लॉगरसह आम्ही परीक्षण करीत नसतो तेव्हा, आम्हाला आपल्या डिव्हाइसवर असणारा लॉगर डेटा मिटविणे आवश्यक असते."</string> <string name="select_logpersist_title" msgid="7530031344550073166">"डिव्हाइसवर सातत्याने लॉगर डेटा स्टोअर करा"</string> - <string name="select_logpersist_dialog_title" msgid="4003400579973269060">"डिव्हाइसवर सातत्याने संचयित करण्यासाठी लॉग बफर निवडा"</string> + <string name="select_logpersist_dialog_title" msgid="4003400579973269060">"डिव्हाइसवर सातत्याने स्टोअर करण्यासाठी लॉग बफर निवडा"</string> <string name="select_usb_configuration_title" msgid="2649938511506971843">"USB कॉन्फिगरेशन निवडा"</string> <string name="select_usb_configuration_dialog_title" msgid="6385564442851599963">"USB कॉन्फिगरेशन निवडा"</string> <string name="allow_mock_location" msgid="2787962564578664888">"बनावट स्थानांना अनुमती द्या"</string> @@ -426,7 +426,7 @@ <string name="use_system_language_to_select_input_method_subtypes" msgid="5747329075020379587">"सिस्टम भाषा वापरा"</string> <string name="failed_to_open_app_settings_toast" msgid="1251067459298072462">"<xliff:g id="SPELL_APPLICATION_NAME">%1$s</xliff:g> साठी सेटिंग्ज उघडण्यात अयशस्वी"</string> <string name="ime_security_warning" msgid="4135828934735934248">"ही इनपुट पद्धत पासवर्ड आणि क्रेडिट कार्ड नंबर यासह, तुम्ही टाइप करता तो सर्व मजकूर संकलित करण्यात सक्षम होऊ शकते. ही <xliff:g id="IME_APPLICATION_NAME">%1$s</xliff:g> अॅपवरून येते. ही इनपुट पद्धत वापरायची?"</string> - <string name="direct_boot_unaware_dialog_message" msgid="7870273558547549125">"टीप: रीबूट केल्यानंतर, तुम्ही आपला फोन अनलॉक करे पर्यंत हे अॅप सुरू होऊ शकत नाही"</string> + <string name="direct_boot_unaware_dialog_message" msgid="7870273558547549125">"टीप: रीबूट केल्यानंतर, तुम्ही तुमचा फोन अनलॉक करे पर्यंत हे अॅप सुरू होऊ शकत नाही"</string> <string name="ims_reg_title" msgid="7609782759207241443">"IMS नोंदणी स्थिती"</string> <string name="ims_reg_status_registered" msgid="933003316932739188">"नोंदवलेले"</string> <string name="ims_reg_status_not_registered" msgid="6529783773485229486">"नोंदवलेले नाही"</string> diff --git a/packages/SettingsLib/res/values-sw/arrays.xml b/packages/SettingsLib/res/values-sw/arrays.xml index d77c92dce75c..f13c2ea5b239 100644 --- a/packages/SettingsLib/res/values-sw/arrays.xml +++ b/packages/SettingsLib/res/values-sw/arrays.xml @@ -59,7 +59,7 @@ <item msgid="45075631231212732">"Kila wakati tumia ukakuaji wa HDCP"</item> </string-array> <string-array name="bluetooth_avrcp_versions"> - <item msgid="5347678900838034763">"AVRCP 1.4 (Chaguo-msingi)"</item> + <item msgid="5347678900838034763">"AVRCP 1.4 (Chaguo msingi)"</item> <item msgid="2809759619990248160">"AVRCP 1.3"</item> <item msgid="6199178154704729352">"AVRCP 1.5"</item> <item msgid="5172170854953034852">"AVRCP 1.6"</item> @@ -71,7 +71,7 @@ <item msgid="3422726142222090896">"avrcp16"</item> </string-array> <string-array name="bluetooth_a2dp_codec_titles"> - <item msgid="7065842274271279580">"Tumia Uteuzi wa Mfumo (Chaguo-msingi)"</item> + <item msgid="7065842274271279580">"Tumia Uteuzi wa Mfumo (Chaguo msingi)"</item> <item msgid="7539690996561263909">"SBC"</item> <item msgid="686685526567131661">"AAC"</item> <item msgid="5254942598247222737">"Sauti ya <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX">aptX™</xliff:g>"</item> @@ -81,7 +81,7 @@ <item msgid="3304843301758635896">"Zima Kodeki Zisizo za Lazima"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> - <item msgid="5062108632402595000">"Tumia Uteuzi wa Mfumo (Chaguo-msingi)"</item> + <item msgid="5062108632402595000">"Tumia Uteuzi wa Mfumo (Chaguo msingi)"</item> <item msgid="6898329690939802290">"SBC"</item> <item msgid="6839647709301342559">"AAC"</item> <item msgid="7848030269621918608">"Sauti ya <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX">aptX™</xliff:g>"</item> @@ -91,38 +91,38 @@ <item msgid="741805482892725657">"Zima Kodeki Zisizo za Lazima"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> - <item msgid="3093023430402746802">"Tumia Uteuzi wa Mfumo (Chaguo-msingi)"</item> + <item msgid="3093023430402746802">"Tumia Uteuzi wa Mfumo (Chaguo msingi)"</item> <item msgid="8895532488906185219">"kHz 44.1"</item> <item msgid="2909915718994807056">"kHz 48.0"</item> <item msgid="3347287377354164611">"kHz 88.2"</item> <item msgid="1234212100239985373">"kHz 96.0"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_summaries"> - <item msgid="3214516120190965356">"Tumia Uteuzi wa Mfumo (Chaguo-msingi)"</item> + <item msgid="3214516120190965356">"Tumia Uteuzi wa Mfumo (Chaguo msingi)"</item> <item msgid="4482862757811638365">"kHz 44.1"</item> <item msgid="354495328188724404">"kHz 48.0"</item> <item msgid="7329816882213695083">"kHz 88.2"</item> <item msgid="6967397666254430476">"kHz 96.0"</item> </string-array> <string-array name="bluetooth_a2dp_codec_bits_per_sample_titles"> - <item msgid="2684127272582591429">"Tumia Uteuzi wa Mfumo (Chaguo-msingi)"</item> + <item msgid="2684127272582591429">"Tumia Uteuzi wa Mfumo (Chaguo msingi)"</item> <item msgid="5618929009984956469">"Biti 16 kwa kila sampuli"</item> <item msgid="3412640499234627248">"Biti 24 kwa kila sampuli"</item> <item msgid="121583001492929387">"Biti 32 kwa kila sampuli"</item> </string-array> <string-array name="bluetooth_a2dp_codec_bits_per_sample_summaries"> - <item msgid="1081159789834584363">"Tumia Uteuzi wa Mfumo (Chaguo-msingi)"</item> + <item msgid="1081159789834584363">"Tumia Uteuzi wa Mfumo (Chaguo msingi)"</item> <item msgid="4726688794884191540">"Biti 16 kwa kila sampuli"</item> <item msgid="305344756485516870">"Biti 24 kwa kila sampuli"</item> <item msgid="244568657919675099">"Biti 32 kwa kila sampuli"</item> </string-array> <string-array name="bluetooth_a2dp_codec_channel_mode_titles"> - <item msgid="5226878858503393706">"Tumia Uteuzi wa Mfumo (Chaguo-msingi)"</item> + <item msgid="5226878858503393706">"Tumia Uteuzi wa Mfumo (Chaguo msingi)"</item> <item msgid="4106832974775067314">"Mono"</item> <item msgid="5571632958424639155">"Stereo"</item> </string-array> <string-array name="bluetooth_a2dp_codec_channel_mode_summaries"> - <item msgid="4118561796005528173">"Tumia Uteuzi wa Mfumo (Chaguo-msingi)"</item> + <item msgid="4118561796005528173">"Tumia Uteuzi wa Mfumo (Chaguo msingi)"</item> <item msgid="8900559293912978337">"Mono"</item> <item msgid="8883739882299884241">"Stereo"</item> </string-array> diff --git a/packages/SettingsLib/res/values-sw/strings.xml b/packages/SettingsLib/res/values-sw/strings.xml index 70dc27632f75..6d5916b36fc2 100644 --- a/packages/SettingsLib/res/values-sw/strings.xml +++ b/packages/SettingsLib/res/values-sw/strings.xml @@ -138,7 +138,7 @@ <string name="user_guest" msgid="8475274842845401871">"Aliyealikwa"</string> <string name="unknown" msgid="1592123443519355854">"Haijulikani"</string> <string name="running_process_item_user_label" msgid="3129887865552025943">"Mtumiaji: <xliff:g id="USER_NAME">%1$s</xliff:g>"</string> - <string name="launch_defaults_some" msgid="313159469856372621">"Baadhi ya chaguo-msingi zimewekwa"</string> + <string name="launch_defaults_some" msgid="313159469856372621">"Baadhi ya chaguo msingi zimewekwa"</string> <string name="launch_defaults_none" msgid="4241129108140034876">"Hakuna chaguo-misingi zilizowekwa"</string> <string name="tts_settings" msgid="8186971894801348327">"Mipangilio ya kusoma maandishi kwa sauti"</string> <string name="tts_settings_title" msgid="1237820681016639683">"Kusoma maandishi kwa sauti"</string> @@ -157,7 +157,7 @@ <string name="tts_engine_security_warning" msgid="8786238102020223650">"Hotuba hii inawezesha injini huenda ikaweza kukusanya maandishi ambayo yatazungumziwa, ikijumlisha data ya kibinafsi ya nenosiri na namba ya kaddi ya mkopo. Inatoka kwa injini ya <xliff:g id="TTS_PLUGIN_ENGINE_NAME">%s</xliff:g> Wezesha matumizi ya hotuba hii iliyowezeshwa ya injini?"</string> <string name="tts_engine_network_required" msgid="1190837151485314743">"Lugha hii inahitaji muunganisho wa mtandao unaofanya kazi ili kipengele cha kusoma maandishi kwa sauti kifanye kazi."</string> <string name="tts_default_sample_string" msgid="4040835213373086322">"Huu ni mfano wa usanisi usemaji"</string> - <string name="tts_status_title" msgid="7268566550242584413">"Hali ya lugha chaguo-msingi"</string> + <string name="tts_status_title" msgid="7268566550242584413">"Hali ya lugha chaguo msingi"</string> <string name="tts_status_ok" msgid="1309762510278029765">"<xliff:g id="LOCALE">%1$s</xliff:g> inaweza kutumiwa kikamilifu"</string> <string name="tts_status_requires_network" msgid="6042500821503226892">"<xliff:g id="LOCALE">%1$s</xliff:g> inahitaji muunganisho wa mtandao"</string> <string name="tts_status_not_supported" msgid="4491154212762472495">"<xliff:g id="LOCALE">%1$s</xliff:g> haiwezi kutumiwa"</string> @@ -167,7 +167,7 @@ <string name="tts_engine_preference_section_title" msgid="448294500990971413">"Injini inayofaa"</string> <string name="tts_general_section_title" msgid="4402572014604490502">"Kwa ujumla"</string> <string name="tts_reset_speech_pitch_title" msgid="5789394019544785915">"Weka upya mipangilio ya ubora wa matamshi"</string> - <string name="tts_reset_speech_pitch_summary" msgid="8700539616245004418">"Rejesha mipangilio ya ubora wa matamshi kuwa ya chaguo-msingi."</string> + <string name="tts_reset_speech_pitch_summary" msgid="8700539616245004418">"Rejesha mipangilio ya ubora wa matamshi kuwa ya chaguo msingi."</string> <string-array name="tts_rate_entries"> <item msgid="6695494874362656215">"Polepole sana"</item> <item msgid="4795095314303559268">"Polepole"</item> @@ -333,7 +333,7 @@ <string name="local_backup_password_toast_confirmation_mismatch" msgid="7805892532752708288">"Nenosiri jipya na uthibitisho havioani"</string> <string name="local_backup_password_toast_validation_failure" msgid="5646377234895626531">"Imeshindwa kuweka nenosiri la hifadhi rudufu"</string> <string-array name="color_mode_names"> - <item msgid="2425514299220523812">"Maridadi (chaguo-msingi)"</item> + <item msgid="2425514299220523812">"Maridadi (chaguo msingi)"</item> <item msgid="8446070607501413455">"Asili"</item> <item msgid="6553408765810699025">"Muundo-msingi"</item> </string-array> @@ -412,7 +412,7 @@ <string name="charge_length_format" msgid="8978516217024434156">"<xliff:g id="ID_1">%1$s</xliff:g> zilizopita"</string> <string name="remaining_length_format" msgid="7886337596669190587">"Zimesalia <xliff:g id="ID_1">%1$s</xliff:g>"</string> <string name="screen_zoom_summary_small" msgid="5867245310241621570">"Ndogo"</string> - <string name="screen_zoom_summary_default" msgid="2247006805614056507">"Chaguo-msingi"</string> + <string name="screen_zoom_summary_default" msgid="2247006805614056507">"Chaguo msingi"</string> <string name="screen_zoom_summary_large" msgid="4835294730065424084">"Kubwa"</string> <string name="screen_zoom_summary_very_large" msgid="7108563375663670067">"Kubwa kiasi"</string> <string name="screen_zoom_summary_extremely_large" msgid="7427320168263276227">"Kubwa zaidi"</string> diff --git a/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java b/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java index 42bd66ae4a90..9fc71c813d74 100644 --- a/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java +++ b/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java @@ -166,9 +166,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis long token = Binder.clearCallingIdentity(); try { mHandler.post(() -> { - for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) { - mConnectionCallbacks.get(i).onBackButtonAlphaChanged(alpha, animate); - } + notifyBackButtonAlphaChanged(alpha, animate); }); } finally { Binder.restoreCallingIdentity(token); @@ -355,10 +353,17 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis mOverviewProxy.asBinder().unlinkToDeath(mOverviewServiceDeathRcpt, 0); mContext.unbindService(mOverviewServiceConnection); mOverviewProxy = null; + notifyBackButtonAlphaChanged(1f, false /* animate */); notifyConnectionChanged(); } } + private void notifyBackButtonAlphaChanged(float alpha, boolean animate) { + for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) { + mConnectionCallbacks.get(i).onBackButtonAlphaChanged(alpha, animate); + } + } + private void notifyConnectionChanged() { for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) { mConnectionCallbacks.get(i).onConnectionChanged(mOverviewProxy != null); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java index f30fa6bd4b93..d647e21888dd 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java @@ -710,6 +710,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView updateClickAndFocus(); if (mNotificationParent != null) { setOverrideTintColor(NO_COLOR, 0.0f); + // Let's reset the distance to top roundness, as this isn't applied to group children + setDistanceToTopRoundness(NO_ROUNDNESS); mNotificationParent.updateBackgroundForGroupState(); } updateIconVisibilities(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java index 29c3ebdae326..ae8d84450404 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java @@ -36,6 +36,7 @@ import java.util.ArrayList; */ public abstract class ExpandableView extends FrameLayout { + public static final float NO_ROUNDNESS = -1; protected OnHeightChangedListener mOnHeightChangedListener; private int mActualHeight; protected int mClipTopAmount; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java index 804fd4161500..9c26c69045d5 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java @@ -776,7 +776,8 @@ public class NotificationStackScrollLayout extends ViewGroup boolean clip = clipStart > start && clipStart < end || clipEnd >= start && clipEnd <= end; clip &= !(first && mOwnScrollY == 0); - child.setDistanceToTopRoundness(clip ? Math.max(start - clipStart, 0) : -1); + child.setDistanceToTopRoundness(clip ? Math.max(start - clipStart, 0) + : ExpandableView.NO_ROUNDNESS); first = false; } } diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index c3f504f6c6ed..2d2c4cd6875e 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -4868,7 +4868,12 @@ public class ConnectivityService extends IConnectivityManager.Stub */ private NetworkCapabilities mixInCapabilities(NetworkAgentInfo nai, NetworkCapabilities nc) { // Once a NetworkAgent is connected, complain if some immutable capabilities are removed. + // Don't complain for VPNs since they're not driven by requests and there is no risk of + // causing a connect/teardown loop. + // TODO: remove this altogether and make it the responsibility of the NetworkFactories to + // avoid connect/teardown loops. if (nai.everConnected && + !nai.isVPN() && !nai.networkCapabilities.satisfiedByImmutableNetworkCapabilities(nc)) { // TODO: consider not complaining when a network agent degrades its capabilities if this // does not cause any request (that is not a listen) currently matching that agent to diff --git a/services/core/java/com/android/server/VibratorService.java b/services/core/java/com/android/server/VibratorService.java index ede870fbf02e..95e55182f823 100644 --- a/services/core/java/com/android/server/VibratorService.java +++ b/services/core/java/com/android/server/VibratorService.java @@ -76,17 +76,35 @@ public class VibratorService extends IVibratorService.Stub private static final long[] DOUBLE_CLICK_EFFECT_FALLBACK_TIMINGS = { 0, 30, 100, 30 }; - private static final float GAMMA_SCALE_FACTOR_MINIMUM = 2.0f; - private static final float GAMMA_SCALE_FACTOR_LOW = 1.5f; - private static final float GAMMA_SCALE_FACTOR_HIGH = 0.5f; - private static final float GAMMA_SCALE_FACTOR_NONE = 1.0f; - - private static final int MAX_AMPLITUDE_MINIMUM_INTENSITY = 168; // 2/3 * 255 - private static final int MAX_AMPLITUDE_LOW_INTENSITY = 192; // 3/4 * 255 + // Scale levels. Each level is defined as the delta between the current setting and the default + // intensity for that type of vibration (i.e. current - default). + private static final int SCALE_VERY_LOW = -2; + private static final int SCALE_LOW = -1; + private static final int SCALE_NONE = 0; + private static final int SCALE_HIGH = 1; + private static final int SCALE_VERY_HIGH = 2; + + // Gamma adjustments for scale levels. + private static final float SCALE_VERY_LOW_GAMMA = 2.0f; + private static final float SCALE_LOW_GAMMA = 1.5f; + private static final float SCALE_NONE_GAMMA = 1.0f; + private static final float SCALE_HIGH_GAMMA = 0.5f; + private static final float SCALE_VERY_HIGH_GAMMA = 0.25f; + + // Max amplitudes for scale levels. If one is not listed, then the max amplitude is the default + // max amplitude. + private static final int SCALE_VERY_LOW_MAX_AMPLITUDE = 168; // 2/3 * 255 + private static final int SCALE_LOW_MAX_AMPLITUDE = 192; // 3/4 * 255 // If a vibration is playing for longer than 5s, it's probably not haptic feedback. private static final long MAX_HAPTIC_FEEDBACK_DURATION = 5000; + + // A mapping from the intensity adjustment to the scaling to apply, where the intensity + // adjustment is defined as the delta between the default intensity level and the user selected + // intensity level. It's important that we apply the scaling on the delta between the two so + // that the default intensity level applies no scaling to application provided effects. + private final SparseArray<ScaleLevel> mScaleLevels; private final LinkedList<VibrationInfo> mPreviousVibrations; private final int mPreviousVibrationsLimit; private final boolean mAllowPriorityVibrationsInLowPowerMode; @@ -180,6 +198,8 @@ public class VibratorService extends IVibratorService.Stub case VibrationEffect.EFFECT_DOUBLE_CLICK: case VibrationEffect.EFFECT_HEAVY_CLICK: case VibrationEffect.EFFECT_TICK: + case VibrationEffect.EFFECT_POP: + case VibrationEffect.EFFECT_THUD: return true; default: Slog.w(TAG, "Unknown prebaked vibration effect, " @@ -254,6 +274,25 @@ public class VibratorService extends IVibratorService.Stub } } + private static final class ScaleLevel { + public final float gamma; + public final int maxAmplitude; + + public ScaleLevel(float gamma) { + this(gamma, VibrationEffect.MAX_AMPLITUDE); + } + + public ScaleLevel(float gamma, int maxAmplitude) { + this.gamma = gamma; + this.maxAmplitude = maxAmplitude; + } + + @Override + public String toString() { + return "ScaleLevel{gamma=" + gamma + ", maxAmplitude=" + maxAmplitude + "}"; + } + } + VibratorService(Context context) { vibratorInit(); // Reset the hardware to a default state, in case this is a runtime @@ -295,11 +334,19 @@ public class VibratorService extends IVibratorService.Stub VibrationEffect tickEffect = createEffectFromResource( com.android.internal.R.array.config_clockTickVibePattern); - mFallbackEffects = new SparseArray<VibrationEffect>(); + mFallbackEffects = new SparseArray<>(); mFallbackEffects.put(VibrationEffect.EFFECT_CLICK, clickEffect); mFallbackEffects.put(VibrationEffect.EFFECT_DOUBLE_CLICK, doubleClickEffect); mFallbackEffects.put(VibrationEffect.EFFECT_TICK, tickEffect); mFallbackEffects.put(VibrationEffect.EFFECT_HEAVY_CLICK, heavyClickEffect); + + mScaleLevels = new SparseArray<>(); + mScaleLevels.put(SCALE_VERY_LOW, + new ScaleLevel(SCALE_VERY_LOW_GAMMA, SCALE_VERY_LOW_MAX_AMPLITUDE)); + mScaleLevels.put(SCALE_LOW, new ScaleLevel(SCALE_LOW_GAMMA, SCALE_LOW_MAX_AMPLITUDE)); + mScaleLevels.put(SCALE_NONE, new ScaleLevel(SCALE_NONE_GAMMA)); + mScaleLevels.put(SCALE_HIGH, new ScaleLevel(SCALE_HIGH_GAMMA)); + mScaleLevels.put(SCALE_VERY_HIGH, new ScaleLevel(SCALE_VERY_HIGH_GAMMA)); } private VibrationEffect createEffectFromResource(int resId) { @@ -675,41 +722,35 @@ public class VibratorService extends IVibratorService.Stub return; } - final float gamma; - final int maxAmplitude; + final int defaultIntensity; if (vib.isNotification() || vib.isRingtone()) { - if (intensity == Vibrator.VIBRATION_INTENSITY_LOW) { - gamma = GAMMA_SCALE_FACTOR_MINIMUM; - maxAmplitude = MAX_AMPLITUDE_MINIMUM_INTENSITY; - } else if (intensity == Vibrator.VIBRATION_INTENSITY_MEDIUM) { - gamma = GAMMA_SCALE_FACTOR_LOW; - maxAmplitude = MAX_AMPLITUDE_LOW_INTENSITY; - } else { - gamma = GAMMA_SCALE_FACTOR_NONE; - maxAmplitude = VibrationEffect.MAX_AMPLITUDE; - } + defaultIntensity = mVibrator.getDefaultNotificationVibrationIntensity(); + } else if (vib.isHapticFeedback()) { + defaultIntensity = mVibrator.getDefaultHapticFeedbackIntensity(); } else { - if (intensity == Vibrator.VIBRATION_INTENSITY_LOW) { - gamma = GAMMA_SCALE_FACTOR_LOW; - maxAmplitude = MAX_AMPLITUDE_LOW_INTENSITY; - } else if (intensity == Vibrator.VIBRATION_INTENSITY_HIGH) { - gamma = GAMMA_SCALE_FACTOR_HIGH; - maxAmplitude = VibrationEffect.MAX_AMPLITUDE; - } else { - gamma = GAMMA_SCALE_FACTOR_NONE; - maxAmplitude = VibrationEffect.MAX_AMPLITUDE; - } + // If we don't know what kind of vibration we're playing then just skip scaling for + // now. + return; + } + + final ScaleLevel scale = mScaleLevels.get(intensity - defaultIntensity); + if (scale == null) { + // We should have scaling levels for all cases, so not being able to scale because of a + // missing level is unexpected. + Slog.e(TAG, "No configured scaling level!" + + " (current=" + intensity + ", default= " + defaultIntensity + ")"); + return; } VibrationEffect scaledEffect = null; if (vib.effect instanceof VibrationEffect.OneShot) { VibrationEffect.OneShot oneShot = (VibrationEffect.OneShot) vib.effect; oneShot = oneShot.resolve(mDefaultVibrationAmplitude); - scaledEffect = oneShot.scale(gamma, maxAmplitude); + scaledEffect = oneShot.scale(scale.gamma, scale.maxAmplitude); } else if (vib.effect instanceof VibrationEffect.Waveform) { VibrationEffect.Waveform waveform = (VibrationEffect.Waveform) vib.effect; waveform = waveform.resolve(mDefaultVibrationAmplitude); - scaledEffect = waveform.scale(gamma, maxAmplitude); + scaledEffect = waveform.scale(scale.gamma, scale.maxAmplitude); } else { Slog.w(TAG, "Unable to apply intensity scaling, unknown VibrationEffect type"); } diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java index aaa51615bbb9..3ad461f9b1b0 100644 --- a/services/core/java/com/android/server/am/ActivityStack.java +++ b/services/core/java/com/android/server/am/ActivityStack.java @@ -1360,7 +1360,9 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai } void goToSleep() { - ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS); + // Ensure visibility without updating configuration, as activities are about to sleep. + ensureActivitiesVisibleLocked(null /* starting */, 0 /* configChanges */, !PRESERVE_WINDOWS, + false /* updateConfiguration */); // Make sure any paused or stopped but visible activities are now sleeping. // This ensures that the activity's onStop() is called. @@ -1829,12 +1831,23 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai } /** - * Make sure that all activities that need to be visible (that is, they - * currently can be seen by the user) actually are. + * Make sure that all activities that need to be visible in the stack (that is, they + * currently can be seen by the user) actually are and update their configuration. */ - // TODO: Should be re-worked based on the fact that each task as a stack in most cases. final void ensureActivitiesVisibleLocked(ActivityRecord starting, int configChanges, boolean preserveWindows) { + ensureActivitiesVisibleLocked(starting, configChanges, preserveWindows, + true /* updateConfiguration */); + } + + /** + * Ensure visibility with an option to also update the configuration of visible activities. + * @see #ensureActivitiesVisibleLocked(ActivityRecord, int, boolean) + * @see ActivityStackSupervisor#ensureActivitiesVisibleLocked(ActivityRecord, int, boolean) + */ + // TODO: Should be re-worked based on the fact that each task as a stack in most cases. + final void ensureActivitiesVisibleLocked(ActivityRecord starting, int configChanges, + boolean preserveWindows, boolean updateConfiguration) { mTopActivityOccludesKeyguard = false; mTopDismissingKeyguardActivity = null; mStackSupervisor.getKeyguardController().beginActivityVisibilityUpdate(); @@ -1886,9 +1899,7 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai + " finishing=" + r.finishing + " state=" + r.getState()); // First: if this is not the current activity being started, make // sure it matches the current configuration. - if (r != starting) { - // Ensure activity configuration ignoring stop state since we are - // becoming visible. + if (r != starting && updateConfiguration) { r.ensureActivityConfiguration(0 /* globalChanges */, preserveWindows, true /* ignoreStopState */); } @@ -2608,25 +2619,16 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai boolean notUpdated = true; if (mStackSupervisor.isFocusedStack(this)) { - - // We have special rotation behavior when Keyguard is locked. Make sure all - // activity visibilities are set correctly as well as the transition is updated - // if needed to get the correct rotation behavior. + // We have special rotation behavior when here is some active activity that + // requests specific orientation or Keyguard is locked. Make sure all activity + // visibilities are set correctly as well as the transition is updated if needed + // to get the correct rotation behavior. Otherwise the following call to update + // the orientation may cause incorrect configurations delivered to client as a + // result of invisible window resize. // TODO: Remove this once visibilities are set correctly immediately when // starting an activity. - if (mStackSupervisor.getKeyguardController().isKeyguardLocked()) { - mStackSupervisor.ensureActivitiesVisibleLocked(null /* starting */, - 0 /* configChanges */, false /* preserveWindows */); - } - final Configuration config = mWindowManager.updateOrientationFromAppTokens( - mStackSupervisor.getDisplayOverrideConfiguration(mDisplayId), - next.mayFreezeScreenLocked(next.app) ? next.appToken : null, - mDisplayId); - if (config != null) { - next.frozenBeforeDestroy = true; - } - notUpdated = !mService.updateDisplayOverrideConfigurationLocked(config, next, - false /* deferResume */, mDisplayId); + notUpdated = !mStackSupervisor.ensureVisibilityAndConfig(next, mDisplayId, + true /* markFrozenIfConfigChanged */, false /* deferResume */); } if (notUpdated) { @@ -3834,7 +3836,8 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai if (finishingActivityInNonFocusedStack) { // Finishing activity that was in paused state and it was in not currently focused // stack, need to make something visible in its place. - mStackSupervisor.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS); + mStackSupervisor.ensureVisibilityAndConfig(null, mDisplayId, + false /* markFrozenIfConfigChanged */, true /* deferResume */); } if (activityRemoved) { mStackSupervisor.resumeFocusedStackTopActivityLocked(); diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java index 7310fab72cf8..257d79d2c153 100644 --- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java +++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java @@ -1409,15 +1409,11 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D // manager with a new orientation. We don't care about that, because the activity is // not currently running so we are just restarting it anyway. if (checkConfig) { - final int displayId = r.getDisplayId(); - final Configuration config = mWindowManager.updateOrientationFromAppTokens( - getDisplayOverrideConfiguration(displayId), - r.mayFreezeScreenLocked(app) ? r.appToken : null, displayId); // Deferring resume here because we're going to launch new activity shortly. // We don't want to perform a redundant launch of the same record while ensuring // configurations and trying to resume top activity of focused stack. - mService.updateDisplayOverrideConfigurationLocked(config, r, true /* deferResume */, - displayId); + ensureVisibilityAndConfig(r, r.getDisplayId(), + false /* markFrozenIfConfigChanged */, true /* deferResume */); } if (r.getStack().checkKeyguardVisibility(r, true /* shouldBeVisible */, @@ -1630,6 +1626,31 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D return true; } + /** + * Ensure all activities visibility, update orientation and configuration. + */ + boolean ensureVisibilityAndConfig(ActivityRecord r, int displayId, + boolean markFrozenIfConfigChanged, boolean deferResume) { + // First ensure visibility without updating the config just yet. We need this to know what + // activities are affecting configuration now. + ensureActivitiesVisibleLocked(null /* starting */, 0 /* configChanges */, + false /* preserveWindows */, false /* updateConfiguration */); + + // Force-update the orientation from the WindowManager, since we need the true configuration + // to send to the client now. + final Configuration config = mWindowManager.updateOrientationFromAppTokens( + getDisplayOverrideConfiguration(displayId), + r != null && r.mayFreezeScreenLocked(r.app) ? r.appToken : null, + displayId, true /* forceUpdate */); + if (r != null && markFrozenIfConfigChanged && config != null) { + r.frozenBeforeDestroy = true; + } + + // Update the configuration of the activities on the display. + return mService.updateDisplayOverrideConfigurationLocked(config, r, + deferResume, displayId); + } + private void logIfTransactionTooLarge(Intent intent, Bundle icicle) { int extrasSize = 0; if (intent != null) { @@ -3647,8 +3668,21 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D mHandler.obtainMessage(LAUNCH_TASK_BEHIND_COMPLETE, token).sendToTarget(); } + /** + * Make sure that all activities that need to be visible in the system actually are and update + * their configuration. + */ void ensureActivitiesVisibleLocked(ActivityRecord starting, int configChanges, boolean preserveWindows) { + ensureActivitiesVisibleLocked(starting, configChanges, preserveWindows, + true /* updateConfiguration */); + } + + /** + * @see #ensureActivitiesVisibleLocked(ActivityRecord, int, boolean) + */ + void ensureActivitiesVisibleLocked(ActivityRecord starting, int configChanges, + boolean preserveWindows, boolean updateConfiguration) { getKeyguardController().beginActivityVisibilityUpdate(); try { // First the front stacks. In case any are not fullscreen and are in front of home. @@ -3656,7 +3690,8 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D final ActivityDisplay display = mActivityDisplays.valueAt(displayNdx); for (int stackNdx = display.getChildCount() - 1; stackNdx >= 0; --stackNdx) { final ActivityStack stack = display.getChildAt(stackNdx); - stack.ensureActivitiesVisibleLocked(starting, configChanges, preserveWindows); + stack.ensureActivitiesVisibleLocked(starting, configChanges, preserveWindows, + updateConfiguration); } } } finally { diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index 92310b92d932..3fd69ee5645c 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -215,6 +215,10 @@ public class AudioService extends IAudioService.Stub return mPlatformType == AudioSystem.PLATFORM_TELEVISION; } + private boolean isPlatformAutomotive() { + return mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE); + } + /** The controller for the volume UI. */ private final VolumeController mVolumeController = new VolumeController(); @@ -2367,8 +2371,11 @@ public class AudioService extends IAudioService.Stub if (DEBUG_VOL) { Log.d(TAG, String.format("Master mute %s, %d, user=%d", mute, flags, userId)); } - if (mUseFixedVolume) { - return; // If using fixed volume, we don't mute. + if (!isPlatformAutomotive() && mUseFixedVolume) { + // If using fixed volume, we don't mute. + // TODO: remove the isPlatformAutomotive check here. + // The isPlatformAutomotive check is added for safety but may not be necessary. + return; } if (getCurrentUserId() == userId) { if (mute != AudioSystem.getMasterMute()) { diff --git a/services/core/java/com/android/server/wm/AppWindowToken.java b/services/core/java/com/android/server/wm/AppWindowToken.java index e637df4db502..0ba5a56b6e67 100644 --- a/services/core/java/com/android/server/wm/AppWindowToken.java +++ b/services/core/java/com/android/server/wm/AppWindowToken.java @@ -1297,7 +1297,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree // going to the bottom. Allowing closing {@link AppWindowToken} to participate can lead to // an Activity in another task being started in the wrong orientation during the transition. if (!(sendingToBottom || mService.mClosingApps.contains(this)) - && (isVisible() || mService.mOpeningApps.contains(this) || isOnTop())) { + && (isVisible() || mService.mOpeningApps.contains(this))) { return mOrientation; } diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index f3423c63e270..b59e728a721e 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -944,33 +944,50 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo /** * Update rotation of the display. * - * Returns true if the rotation has been changed. In this case YOU MUST CALL - * {@link WindowManagerService#sendNewConfiguration(int)} TO UNFREEZE THE SCREEN. + * @return {@code true} if the rotation has been changed. In this case YOU MUST CALL + * {@link WindowManagerService#sendNewConfiguration(int)} TO UNFREEZE THE SCREEN. */ boolean updateRotationUnchecked() { - if (mService.mDeferredRotationPauseCount > 0) { - // Rotation updates have been paused temporarily. Defer the update until - // updates have been resumed. - if (DEBUG_ORIENTATION) Slog.v(TAG_WM, "Deferring rotation, rotation is paused."); - return false; - } + return updateRotationUnchecked(false /* forceUpdate */); + } - ScreenRotationAnimation screenRotationAnimation = - mService.mAnimator.getScreenRotationAnimationLocked(mDisplayId); - if (screenRotationAnimation != null && screenRotationAnimation.isAnimating()) { - // Rotation updates cannot be performed while the previous rotation change - // animation is still in progress. Skip this update. We will try updating - // again after the animation is finished and the display is unfrozen. - if (DEBUG_ORIENTATION) Slog.v(TAG_WM, "Deferring rotation, animation in progress."); - return false; - } - if (mService.mDisplayFrozen) { - // Even if the screen rotation animation has finished (e.g. isAnimating - // returns false), there is still some time where we haven't yet unfrozen - // the display. We also need to abort rotation here. - if (DEBUG_ORIENTATION) Slog.v(TAG_WM, - "Deferring rotation, still finishing previous rotation"); - return false; + /** + * Update rotation of the display with an option to force the update. + * @param forceUpdate Force the rotation update. Sometimes in WM we might skip updating + * orientation because we're waiting for some rotation to finish or display + * to unfreeze, which results in configuration of the previously visible + * activity being applied to a newly visible one. Forcing the rotation + * update allows to workaround this issue. + * @return {@code true} if the rotation has been changed. In this case YOU MUST CALL + * {@link WindowManagerService#sendNewConfiguration(int)} TO UNFREEZE THE SCREEN. + */ + boolean updateRotationUnchecked(boolean forceUpdate) { + ScreenRotationAnimation screenRotationAnimation; + if (!forceUpdate) { + if (mService.mDeferredRotationPauseCount > 0) { + // Rotation updates have been paused temporarily. Defer the update until + // updates have been resumed. + if (DEBUG_ORIENTATION) Slog.v(TAG_WM, "Deferring rotation, rotation is paused."); + return false; + } + + screenRotationAnimation = + mService.mAnimator.getScreenRotationAnimationLocked(mDisplayId); + if (screenRotationAnimation != null && screenRotationAnimation.isAnimating()) { + // Rotation updates cannot be performed while the previous rotation change + // animation is still in progress. Skip this update. We will try updating + // again after the animation is finished and the display is unfrozen. + if (DEBUG_ORIENTATION) Slog.v(TAG_WM, "Deferring rotation, animation in progress."); + return false; + } + if (mService.mDisplayFrozen) { + // Even if the screen rotation animation has finished (e.g. isAnimating + // returns false), there is still some time where we haven't yet unfrozen + // the display. We also need to abort rotation here. + if (DEBUG_ORIENTATION) Slog.v(TAG_WM, + "Deferring rotation, still finishing previous rotation"); + return false; + } } if (!mService.mDisplayEnabled) { @@ -992,7 +1009,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo if (mayRotateSeamlessly) { final WindowState seamlessRotated = getWindow((w) -> w.mSeamlesslyRotated); - if (seamlessRotated != null) { + if (seamlessRotated != null && !forceUpdate) { // We can't rotate (seamlessly or not) while waiting for the last seamless rotation // to complete (that is, waiting for windows to redraw). It's tempting to check // w.mSeamlessRotationCount but that could be incorrect in the case of diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index f42f855e7ac5..9c253fb949e1 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -2372,6 +2372,12 @@ public class WindowManagerService extends IWindowManager.Stub @Override public Configuration updateOrientationFromAppTokens(Configuration currentConfig, IBinder freezeThisOneIfNeeded, int displayId) { + return updateOrientationFromAppTokens(currentConfig, freezeThisOneIfNeeded, displayId, + false /* forceUpdate */); + } + + public Configuration updateOrientationFromAppTokens(Configuration currentConfig, + IBinder freezeThisOneIfNeeded, int displayId, boolean forceUpdate) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "updateOrientationFromAppTokens()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } @@ -2381,7 +2387,7 @@ public class WindowManagerService extends IWindowManager.Stub try { synchronized(mWindowMap) { config = updateOrientationFromAppTokensLocked(currentConfig, freezeThisOneIfNeeded, - displayId); + displayId, forceUpdate); } } finally { Binder.restoreCallingIdentity(ident); @@ -2391,13 +2397,13 @@ public class WindowManagerService extends IWindowManager.Stub } private Configuration updateOrientationFromAppTokensLocked(Configuration currentConfig, - IBinder freezeThisOneIfNeeded, int displayId) { + IBinder freezeThisOneIfNeeded, int displayId, boolean forceUpdate) { if (!mDisplayReady) { return null; } Configuration config = null; - if (updateOrientationFromAppTokensLocked(displayId)) { + if (updateOrientationFromAppTokensLocked(displayId, forceUpdate)) { // If we changed the orientation but mOrientationChangeComplete is already true, // we used seamless rotation, and we don't need to freeze the screen. if (freezeThisOneIfNeeded != null && !mRoot.mOrientationChangeComplete) { @@ -2445,11 +2451,15 @@ public class WindowManagerService extends IWindowManager.Stub * @see android.view.IWindowManager#updateOrientationFromAppTokens(Configuration, IBinder, int) */ boolean updateOrientationFromAppTokensLocked(int displayId) { + return updateOrientationFromAppTokensLocked(displayId, false /* forceUpdate */); + } + + boolean updateOrientationFromAppTokensLocked(int displayId, boolean forceUpdate) { long ident = Binder.clearCallingIdentity(); try { final DisplayContent dc = mRoot.getDisplayContent(displayId); final int req = dc.getOrientation(); - if (req != dc.getLastOrientation()) { + if (req != dc.getLastOrientation() || forceUpdate) { dc.setLastOrientation(req); //send a message to Policy indicating orientation change to take //action like disabling/enabling sensors etc., @@ -2457,12 +2467,8 @@ public class WindowManagerService extends IWindowManager.Stub if (dc.isDefaultDisplay) { mPolicy.setCurrentOrientationLw(req); } - if (dc.updateRotationUnchecked()) { - // changed - return true; - } + return dc.updateRotationUnchecked(forceUpdate); } - return false; } finally { Binder.restoreCallingIdentity(ident); diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index c797d8d35db2..febc1a9473c1 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -1763,7 +1763,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP @Override void onResize() { final ArrayList<WindowState> resizingWindows = mService.mResizingWindows; - if (mHasSurface && !resizingWindows.contains(this)) { + if (mHasSurface && !isGoneForLayoutLw() && !resizingWindows.contains(this)) { if (DEBUG_RESIZE) Slog.d(TAG, "onResize: Resizing " + this); resizingWindows.add(this); } diff --git a/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenTests.java b/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenTests.java index 0c63cd270d39..f6599dcaf87e 100644 --- a/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenTests.java +++ b/services/tests/servicestests/src/com/android/server/wm/AppWindowTokenTests.java @@ -202,11 +202,6 @@ public class AppWindowTokenTests extends WindowTestsBase { assertEquals(SCREEN_ORIENTATION_UNSET, mToken.getOrientation()); // Can specify orientation if the current orientation candidate is orientation behind. assertEquals(SCREEN_ORIENTATION_LANDSCAPE, mToken.getOrientation(SCREEN_ORIENTATION_BEHIND)); - - mToken.sendingToBottom = false; - mToken.setIsOnTop(true); - // Allow for mToken to provide orientation hidden if on top and not being sent to bottom. - assertEquals(SCREEN_ORIENTATION_LANDSCAPE, mToken.getOrientation()); } @Test diff --git a/telephony/java/android/telephony/ims/stub/ImsRegistrationImplBase.java b/telephony/java/android/telephony/ims/stub/ImsRegistrationImplBase.java index 4334d3aadab3..31381804d143 100644 --- a/telephony/java/android/telephony/ims/stub/ImsRegistrationImplBase.java +++ b/telephony/java/android/telephony/ims/stub/ImsRegistrationImplBase.java @@ -213,6 +213,17 @@ public class ImsRegistrationImplBase { /** * Notify the framework that the device is disconnected from the IMS network. + * <p> + * Note: Prior to calling {@link #onDeregistered(ImsReasonInfo)}, you should ensure that any + * changes to {@link android.telephony.ims.feature.ImsFeature} capability availability is sent + * to the framework. For example, + * {@link android.telephony.ims.feature.MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_VIDEO} + * and + * {@link android.telephony.ims.feature.MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_VOICE} + * may be set to unavailable to ensure the framework knows these services are no longer + * available due to de-registration. If you do not report capability changes impacted by + * de-registration, the framework will not know which features are no longer available as a + * result. * * @param info the {@link ImsReasonInfo} associated with why registration was disconnected. */ |