Merge "Enable modem with SatelliteModemEnableRequestAttributes" into main
diff --git a/data/fonts/Android.bp b/data/fonts/Android.bp
index f1a6b69..1a3a0f6 100644
--- a/data/fonts/Android.bp
+++ b/data/fonts/Android.bp
@@ -86,3 +86,11 @@
// Because `system.img` is a dependency of `fontchain_lint`, it cannot be
// converted to Android.bp for now.
// After system.img can be generated by Soong, then it can be converted to Android.bp.
+
+filegroup {
+ name: "DroidSansMono",
+ srcs: ["font_config.json"],
+ required: [
+ "DroidSansMono.ttf",
+ ],
+}
diff --git a/data/fonts/font_config.json b/data/fonts/font_config.json
new file mode 100644
index 0000000..427e6cf
--- /dev/null
+++ b/data/fonts/font_config.json
@@ -0,0 +1,12 @@
+[
+ {
+ "name": "monospace",
+ "fonts": [
+ {
+ "file": "DroidSansMono.ttf",
+ "weight": "400",
+ "style": "normal"
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecorViewModel.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecorViewModel.java
index 501e856..11976ae 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecorViewModel.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecorViewModel.java
@@ -27,7 +27,6 @@
import android.app.ActivityManager.RunningTaskInfo;
import android.content.ContentResolver;
import android.content.Context;
-import android.graphics.Color;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.Region;
@@ -181,7 +180,6 @@
}
decoration.relayout(taskInfo);
- setupCaptionColor(taskInfo, decoration);
}
@Override
@@ -243,15 +241,6 @@
decoration.close();
}
- private void setupCaptionColor(RunningTaskInfo taskInfo, CaptionWindowDecoration decoration) {
- if (TaskInfoKt.isTransparentCaptionBarAppearance(taskInfo)) {
- decoration.setCaptionColor(Color.TRANSPARENT);
- } else {
- final int statusBarColor = taskInfo.taskDescription.getStatusBarColor();
- decoration.setCaptionColor(statusBarColor);
- }
- }
-
private boolean shouldShowWindowDecor(RunningTaskInfo taskInfo) {
if (taskInfo.getWindowingMode() == WINDOWING_MODE_FREEFORM) {
return true;
@@ -320,7 +309,6 @@
windowDecoration.setTaskDragResizer(taskPositioner);
windowDecoration.relayout(taskInfo, startT, finishT,
false /* applyStartTransactionOnDraw */, false /* setTaskCropAndPosition */);
- setupCaptionColor(taskInfo, windowDecoration);
}
private class CaptionTouchEventListener implements
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java
index 231570f..349ee0b 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java
@@ -35,7 +35,6 @@
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.drawable.GradientDrawable;
-import android.graphics.drawable.VectorDrawable;
import android.os.Handler;
import android.util.Size;
import android.view.Choreographer;
@@ -310,6 +309,9 @@
}
private void bindData(View rootView, RunningTaskInfo taskInfo) {
+ // Set up the tint first so that the drawable can be stylized when loaded.
+ setupCaptionColor(taskInfo);
+
final boolean isFullscreen =
taskInfo.getWindowingMode() == WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
rootView.findViewById(R.id.maximize_window)
@@ -317,7 +319,16 @@
: R.drawable.decor_maximize_button_dark);
}
- void setCaptionColor(int captionColor) {
+ private void setupCaptionColor(RunningTaskInfo taskInfo) {
+ if (TaskInfoKt.isTransparentCaptionBarAppearance(taskInfo)) {
+ setCaptionColor(Color.TRANSPARENT);
+ } else {
+ final int statusBarColor = taskInfo.taskDescription.getStatusBarColor();
+ setCaptionColor(statusBarColor);
+ }
+ }
+
+ private void setCaptionColor(int captionColor) {
if (mResult.mRootView == null) {
return;
}
@@ -334,20 +345,16 @@
caption.getResources().getColorStateList(buttonTintColorRes, null /* theme */);
final View back = caption.findViewById(R.id.back_button);
- final VectorDrawable backBackground = (VectorDrawable) back.getBackground();
- backBackground.setTintList(buttonTintColor);
+ back.setBackgroundTintList(buttonTintColor);
final View minimize = caption.findViewById(R.id.minimize_window);
- final VectorDrawable minimizeBackground = (VectorDrawable) minimize.getBackground();
- minimizeBackground.setTintList(buttonTintColor);
+ minimize.setBackgroundTintList(buttonTintColor);
final View maximize = caption.findViewById(R.id.maximize_window);
- final VectorDrawable maximizeBackground = (VectorDrawable) maximize.getBackground();
- maximizeBackground.setTintList(buttonTintColor);
+ maximize.setBackgroundTintList(buttonTintColor);
final View close = caption.findViewById(R.id.close_window);
- final VectorDrawable closeBackground = (VectorDrawable) close.getBackground();
- closeBackground.setTintList(buttonTintColor);
+ close.setBackgroundTintList(buttonTintColor);
}
boolean isHandlingDragResize() {
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/DraggableHandler.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/DraggableHandler.kt
index 9c3896b..83db724 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/DraggableHandler.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/DraggableHandler.kt
@@ -1024,10 +1024,6 @@
val canStart =
when (behavior) {
- NestedScrollBehavior.DuringTransitionBetweenScenes -> {
- canChangeScene = false // unused: added for consistency
- false
- }
NestedScrollBehavior.EdgeNoPreview -> {
canChangeScene = isZeroOffset
isZeroOffset && hasNextScene(offsetAvailable)
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/NestedScrollToScene.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/NestedScrollToScene.kt
index 945043d..8a0e462 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/NestedScrollToScene.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/NestedScrollToScene.kt
@@ -35,13 +35,6 @@
*/
enum class NestedScrollBehavior(val canStartOnPostFling: Boolean) {
/**
- * During scene transitions, if we are within
- * [SceneTransitionLayoutImpl.transitionInterceptionThreshold], the [SceneTransitionLayout]
- * consumes scroll events instead of the scrollable component.
- */
- DuringTransitionBetweenScenes(canStartOnPostFling = false),
-
- /**
* Overscroll will only be used by the [SceneTransitionLayout] to move to the next scene if the
* gesture begins at the edge of the scrollable component (so that a scroll in that direction
* can no longer be consumed). If the gesture is partially consumed by the scrollable component,
diff --git a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/DraggableHandlerTest.kt b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/DraggableHandlerTest.kt
index dc5b2f7..6360f85 100644
--- a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/DraggableHandlerTest.kt
+++ b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/DraggableHandlerTest.kt
@@ -28,7 +28,6 @@
import androidx.compose.ui.unit.LayoutDirection
import androidx.compose.ui.unit.Velocity
import androidx.test.ext.junit.runners.AndroidJUnit4
-import com.android.compose.animation.scene.NestedScrollBehavior.DuringTransitionBetweenScenes
import com.android.compose.animation.scene.NestedScrollBehavior.EdgeAlways
import com.android.compose.animation.scene.NestedScrollBehavior.EdgeNoPreview
import com.android.compose.animation.scene.NestedScrollBehavior.EdgeWithPreview
@@ -730,13 +729,6 @@
}
@Test
- fun flingAfterScroll_DuringTransitionBetweenScenes_doNothing() = runGestureTest {
- flingAfterScroll(use = DuringTransitionBetweenScenes, idleAfterScroll = true)
-
- assertIdle(currentScene = SceneA)
- }
-
- @Test
fun flingAfterScroll_EdgeNoOverscroll_goToNextScene() = runGestureTest {
flingAfterScroll(use = EdgeNoPreview, idleAfterScroll = false)
@@ -789,13 +781,6 @@
}
@Test
- fun flingAfterScrollStartedInScene_DuringTransitionBetweenScenes_doNothing() = runGestureTest {
- flingAfterScrollStartedInScene(use = DuringTransitionBetweenScenes, idleAfterScroll = true)
-
- assertIdle(currentScene = SceneA)
- }
-
- @Test
fun flingAfterScrollStartedInScene_EdgeNoOverscroll_doNothing() = runGestureTest {
flingAfterScrollStartedInScene(use = EdgeNoPreview, idleAfterScroll = true)
diff --git a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/NestedScrollToSceneTest.kt b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/NestedScrollToSceneTest.kt
index d8a06f5..ccefe3d 100644
--- a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/NestedScrollToSceneTest.kt
+++ b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/NestedScrollToSceneTest.kt
@@ -133,33 +133,6 @@
}
@Test
- fun customizeStlNestedScrollBehavior_DuringTransitionBetweenScenes() {
- var canScroll = true
- val state = setup2ScenesAndScrollTouchSlop {
- Modifier.verticalNestedScrollToScene(
- bottomBehavior = NestedScrollBehavior.DuringTransitionBetweenScenes
- )
- .scrollable(rememberScrollableState { if (canScroll) it else 0f }, Vertical)
- }
-
- scrollUp(percent = 0.5f)
- assertThat(state.transitionState).isIdle()
-
- // Reach the end of the scrollable element
- canScroll = false
- scrollUp(percent = 0.5f)
- assertThat(state.transitionState).isIdle()
-
- pointerUp()
- assertThat(state.transitionState).isIdle()
-
- // Start a new gesture
- pointerDownAndScrollTouchSlop()
- scrollUp(percent = 0.5f)
- assertThat(state.transitionState).isIdle()
- }
-
- @Test
fun customizeStlNestedScrollBehavior_EdgeNoPreview() {
var canScroll = true
val state = setup2ScenesAndScrollTouchSlop {
@@ -253,19 +226,24 @@
@Test
fun customizeStlNestedScrollBehavior_multipleRequests() {
+ var canScroll = true
val state = setup2ScenesAndScrollTouchSlop {
Modifier
// This verticalNestedScrollToScene is closer the STL (an ancestor node)
.verticalNestedScrollToScene(bottomBehavior = NestedScrollBehavior.EdgeAlways)
// Another verticalNestedScrollToScene modifier
- .verticalNestedScrollToScene(
- bottomBehavior = NestedScrollBehavior.DuringTransitionBetweenScenes
- )
- .scrollable(rememberScrollableState { 0f }, Vertical)
+ .verticalNestedScrollToScene(bottomBehavior = NestedScrollBehavior.EdgeNoPreview)
+ .scrollable(rememberScrollableState { if (canScroll) it else 0f }, Vertical)
}
scrollUp(percent = 0.5f)
- // EdgeAlways always consume the remaining scroll, DuringTransitionBetweenScenes does not.
+ assertThat(state.transitionState).isIdle()
+
+ // Reach the end of the scrollable element
+ canScroll = false
+
+ scrollUp(percent = 0.5f)
+ // EdgeAlways always consume the remaining scroll, EdgeNoPreview does not.
val transition = assertThat(state.transitionState).isTransition()
assertThat(transition).hasProgress(0.5f)
}
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index 129931e..9bf2555 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -951,6 +951,7 @@
w.updateLastFrames();
mWmService.mFrameChangingWindows.remove(w);
}
+ w.updateSurfacePositionNonOrganized();
w.onResizeHandled();
}
diff --git a/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java b/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java
index a4dfaa1..105147f 100644
--- a/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java
+++ b/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java
@@ -281,7 +281,7 @@
if (mIProfcollect == null) {
return;
}
- if (Utils.withFrequency("applaunch_trace_freq", 2)) {
+ if (Utils.withFrequency("applaunch_trace_freq", 5)) {
Utils.traceSystem(mIProfcollect, "applaunch");
}
}