From 0aeafabef3c8d35a06fa0e08db7bca6f0226895f Mon Sep 17 00:00:00 2001
From: Jungshik Shin
Date: Sun, 15 Sep 2019 22:57:31 -0700
Subject: [PATCH 1/5] Use NotoSansMyanmar (pure Unicode) fonts
Revert Myanmar fonts to those on Android P.
Instead NotoSansMyanmar*-ZawDecode (Unicode-Zawgyi hybrid) fonts,
go back to NotoSansMyanmar and NotoSansMyanmarUI (pure Unicode) fonts.
Bug: 141019225
Change-Id: Ib2494b9b5cb148f598e69271c5676e7104f66ae3
---
data/fonts/fonts.xml | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/data/fonts/fonts.xml b/data/fonts/fonts.xml
index 072beae8baf7e..c6920977f6b9c 100644
--- a/data/fonts/fonts.xml
+++ b/data/fonts/fonts.xml
@@ -323,14 +323,16 @@
NotoSansLaoUI-Bold.ttf
- NotoSansMyanmar-Regular-ZawDecode.ttf
- NotoSansMyanmar-Bold-ZawDecode.ttf
+ NotoSansMyanmar-Regular.otf
+ NotoSansMyanmar-Medium.otf
+ NotoSansMyanmar-Bold.otf
NotoSerifMyanmar-Regular.otf
NotoSerifMyanmar-Bold.otf
- NotoSansMyanmarUI-Regular-ZawDecode.ttf
- NotoSansMyanmarUI-Bold-ZawDecode.ttf
+ NotoSansMyanmarUI-Regular.otf
+ NotoSansMyanmarUI-Medium.otf
+ NotoSansMyanmarUI-Bold.otf
NotoSansThaana-Regular.ttf
From 7a29413429971a6ca17ea01c2939c978fa2f4ff4 Mon Sep 17 00:00:00 2001
From: Bernardo Rufino
Date: Thu, 29 Aug 2019 19:12:28 +0100
Subject: [PATCH 2/5] Don't consider tasks with INITIALIZING top activity as
visible
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
To fix b/130645908, tasks with top activities in INITIALIZING state were
considered visible. This allowed apps to circumvent background activity
launch restriction by starting 2 activities when in a background stack.
The first activity will remain in INITIALIZING state (since it's in the
bg), so the second launch is permitted since top activity is
INITIALIZING.
Removing '|| topActivity.isState(INITIALIZING)' removes the
vulnerability and curiously still allow the legitimate use case of the
bug linked above to work, i.e. the test in ag/7088262 still passes. This
is because of 2 reasons:
1) Grace period introduced in ag/7638265.
2) Allow bg activity starts to put activity on top of bg task (instead of
fg’ing it) in ag/7190176.
I verified (2) by removing the grace period check, reverting the linked
CL and verifying that the test failed.
This essentially reverts ag/7090415.
Test: atest BackgroundActivityLaunchTest \
RootWindowContainerTests \
WmTests:ActivityStarterTests \
CtsWindowManagerDeviceTestCases:ActivityStarterTests
Bug: 138583650
Bug: 130645908
Change-Id: Iee4ba841c6c83888b55c5cb55fffc949048d2030
---
.../com/android/server/wm/WindowProcessController.java | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/services/core/java/com/android/server/wm/WindowProcessController.java b/services/core/java/com/android/server/wm/WindowProcessController.java
index bc5e32823547a..a8f5d00219ba1 100644
--- a/services/core/java/com/android/server/wm/WindowProcessController.java
+++ b/services/core/java/com/android/server/wm/WindowProcessController.java
@@ -23,7 +23,6 @@ import static android.view.Display.INVALID_DISPLAY;
import static com.android.server.am.ActivityManagerService.MY_PID;
import static com.android.server.wm.ActivityStack.ActivityState.DESTROYED;
import static com.android.server.wm.ActivityStack.ActivityState.DESTROYING;
-import static com.android.server.wm.ActivityStack.ActivityState.INITIALIZING;
import static com.android.server.wm.ActivityStack.ActivityState.PAUSED;
import static com.android.server.wm.ActivityStack.ActivityState.PAUSING;
import static com.android.server.wm.ActivityStack.ActivityState.RESUMED;
@@ -546,14 +545,7 @@ public class WindowProcessController extends ConfigurationContainer
Date: Wed, 25 Sep 2019 12:19:27 +0100
Subject: [PATCH 3/5] [WebView] Minor javadoc fix for WebSettings.
No change to logic.
Test: N/A
Bug:132394762
Change-Id: I957b0d8a03cd937b38611e32f6c012b01a6ad7da
---
core/java/android/webkit/WebSettings.java | 45 ++++++++++++-----------
1 file changed, 23 insertions(+), 22 deletions(-)
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index 18d4d691f7264..7282008f7e3a7 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -193,26 +193,24 @@ public abstract class WebSettings {
}
/**
- * Used with {@link #setMixedContentMode}
- *
* In this mode, the WebView will allow a secure origin to load content from any other origin,
* even if that origin is insecure. This is the least secure mode of operation for the WebView,
* and where possible apps should not set this mode.
+ *
+ * @see #setMixedContentMode
*/
public static final int MIXED_CONTENT_ALWAYS_ALLOW = 0;
/**
- * Used with {@link #setMixedContentMode}
- *
* In this mode, the WebView will not allow a secure origin to load content from an insecure
* origin. This is the preferred and most secure mode of operation for the WebView and apps are
* strongly advised to use this mode.
+ *
+ * @see #setMixedContentMode
*/
public static final int MIXED_CONTENT_NEVER_ALLOW = 1;
/**
- * Used with {@link #setMixedContentMode}
- *
* In this mode, the WebView will attempt to be compatible with the approach of a modern web
* browser with regard to mixed content. Some insecure content may be allowed to be loaded by
* a secure origin and other types of content will be blocked. The types of content are allowed
@@ -221,6 +219,8 @@ public abstract class WebSettings {
* This mode is intended to be used by apps that are not in control of the content that they
* render but desire to operate in a reasonably secure environment. For highest security, apps
* are recommended to use {@link #MIXED_CONTENT_NEVER_ALLOW}.
+ *
+ * @see #setMixedContentMode
*/
public static final int MIXED_CONTENT_COMPATIBILITY_MODE = 2;
@@ -234,30 +234,30 @@ public abstract class WebSettings {
public @interface ForceDark {}
/**
- * Used with {@link #setForceDark}
- *
* Disable force dark, irrespective of the force dark mode of the WebView parent. In this mode,
* WebView content will always be rendered as-is, regardless of whether native views are being
* automatically darkened.
+ *
+ * @see #setForceDark
*/
public static final int FORCE_DARK_OFF = 0;
/**
- * Used with {@link #setForceDark}
- *
* Enable force dark dependent on the state of the WebView parent view. If the WebView parent
* view is being automatically force darkened
* (see: {@link android.view.View#setForceDarkAllowed}), then WebView content will be rendered
* so as to emulate a dark theme. WebViews that are not attached to the view hierarchy will not
* be inverted.
+ *
+ * @see #setForceDark
*/
public static final int FORCE_DARK_AUTO = 1;
/**
- * Used with {@link #setForceDark}
- *
* Unconditionally enable force dark. In this mode WebView content will always be rendered so
* as to emulate a dark theme.
+ *
+ * @see #setForceDark
*/
public static final int FORCE_DARK_ON = 2;
@@ -1471,6 +1471,7 @@ public abstract class WebSettings {
* Set the force dark mode for this WebView.
*
* @param forceDark the force dark mode to set.
+ * @see #getForceDark
*/
public void setForceDark(@ForceDark int forceDark) {
// Stub implementation to satisfy Roboelectrc shadows that don't override this yet.
@@ -1478,10 +1479,10 @@ public abstract class WebSettings {
/**
* Get the force dark mode for this WebView.
- *
- * The default force dark mode is {@link #FORCE_DARK_AUTO}
+ * The default force dark mode is {@link #FORCE_DARK_AUTO}.
*
* @return the currently set force dark mode.
+ * @see #setForceDark
*/
public @ForceDark int getForceDark() {
// Stub implementation to satisfy Roboelectrc shadows that don't override this yet.
@@ -1516,34 +1517,34 @@ public abstract class WebSettings {
public abstract @MenuItemFlags int getDisabledActionModeMenuItems();
/**
- * Used with {@link #setDisabledActionModeMenuItems}.
- *
* No menu items should be disabled.
+ *
+ * @see #setDisabledActionModeMenuItems
*/
public static final int MENU_ITEM_NONE = 0;
/**
- * Used with {@link #setDisabledActionModeMenuItems}.
- *
* Disable menu item "Share".
+ *
+ * @see #setDisabledActionModeMenuItems
*/
public static final int MENU_ITEM_SHARE = 1 << 0;
/**
- * Used with {@link #setDisabledActionModeMenuItems}.
- *
* Disable menu item "Web Search".
+ *
+ * @see #setDisabledActionModeMenuItems
*/
public static final int MENU_ITEM_WEB_SEARCH = 1 << 1;
/**
- * Used with {@link #setDisabledActionModeMenuItems}.
- *
* Disable all the action mode menu items for text processing.
* By default WebView searches for activities that are able to handle
* {@link android.content.Intent#ACTION_PROCESS_TEXT} and show them in the
* action mode menu. If this flag is set via {@link
* #setDisabledActionModeMenuItems}, these menu items will be disabled.
+ *
+ * @see #setDisabledActionModeMenuItems
*/
public static final int MENU_ITEM_PROCESS_TEXT = 1 << 2;
}
From 36ef69743cde0765c823e48e2429958932ffb6c3 Mon Sep 17 00:00:00 2001
From: Kevin Hufnagle
Date: Fri, 27 Sep 2019 23:51:27 +0000
Subject: [PATCH 4/5] docs: Added link to multi-window drag how-to guide
Test: make ds-docs -j32
Bug: 71008103
Change-Id: Ifcc50920cf3828697add018d1d3a6a827c7c9f98
---
core/java/android/view/DragAndDropPermissions.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/core/java/android/view/DragAndDropPermissions.java b/core/java/android/view/DragAndDropPermissions.java
index e72ff38ce3f04..d47604d6ec417 100644
--- a/core/java/android/view/DragAndDropPermissions.java
+++ b/core/java/android/view/DragAndDropPermissions.java
@@ -37,7 +37,7 @@ import com.android.internal.view.IDragAndDropPermissions;
* View.startDragAndDrop} by the app that started the drag operation.
*
*
- * The life cycle of the permissions is bound to the activity used to call {@link
+ * The lifecycle of the permissions is bound to the activity used to call {@link
* android.app.Activity#requestDragAndDropPermissions(DragEvent) requestDragAndDropPermissions}. The
* permissions are revoked when this activity is destroyed, or when {@link #release()} is called,
* whichever occurs first.
@@ -49,6 +49,10 @@ import com.android.internal.view.IDragAndDropPermissions;
* {@link Activity#onSaveInstanceState} bundle and later retrieved in order to manually release
* the permissions once they are no longer needed.
*
+ *
+ * Learn more about drag permissions
+ * in multi-window mode.
+ *
*/
public final class DragAndDropPermissions implements Parcelable {
From 22fa97577f39524e3ffbfbbf37040eff540bcb49 Mon Sep 17 00:00:00 2001
From: Selim Cinek
Date: Thu, 26 Sep 2019 16:53:31 -0700
Subject: [PATCH 5/5] Only calling finishedwhen all the animations have
finished
Previously we would finish way too early if any of the scrims
finished animation. Since some scrims almost never change, we
would have animations being terminated early.
Fixes: 141649119
Test: unlock with bypass, observe no lock icon change
Change-Id: I6aefd6a27ef315995d8e1ae62c27a5f33cc9e160
---
.../statusbar/phone/ScrimController.java | 18 ++++++++++++++++++
.../statusbar/phone/ScrimControllerTest.java | 1 +
2 files changed, 19 insertions(+)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
index 45f3b32d81556..fd3c9526149dd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
@@ -754,6 +754,16 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, OnCo
}
private void onFinished(Callback callback) {
+ if (!hasReachedFinalState(mScrimBehind)
+ || !hasReachedFinalState(mScrimInFront)
+ || !hasReachedFinalState(mScrimForBubble)) {
+ if (callback != null && callback != mCallback) {
+ // Since we only notify the callback that we're finished once everything has
+ // finished, we need to make sure that any changing callbacks are also invoked
+ callback.onFinished();
+ }
+ return;
+ }
if (mWakeLockHeld) {
mWakeLock.release(TAG);
mWakeLockHeld = false;
@@ -773,9 +783,17 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, OnCo
mInFrontTint = Color.TRANSPARENT;
mBehindTint = Color.TRANSPARENT;
mBubbleTint = Color.TRANSPARENT;
+ updateScrimColor(mScrimInFront, mInFrontAlpha, mInFrontTint);
+ updateScrimColor(mScrimBehind, mBehindAlpha, mBehindTint);
+ updateScrimColor(mScrimForBubble, mBubbleAlpha, mBubbleTint);
}
}
+ private boolean hasReachedFinalState(ScrimView scrim) {
+ return scrim.getViewAlpha() == getCurrentScrimAlpha(scrim)
+ && scrim.getTint() == getCurrentScrimTint(scrim);
+ }
+
private boolean isAnimating(View scrim) {
return scrim.getTag(TAG_KEY_ANIM) != null;
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java
index e05ad09deebf2..d4ad4b6d4f166 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java
@@ -431,6 +431,7 @@ public class ScrimControllerTest extends SysuiTestCase {
TRANSPARENT /* behind */,
TRANSPARENT /* bubble */);
+ // Make sure at the very end of the animation, we're reset to transparent
assertScrimTint(false /* front */,
false /* behind */,
false /* bubble */);