Loading packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java +12 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.os.IBinder; import android.os.RemoteException; import android.util.Log; import android.view.GestureDetector; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; Loading Loading @@ -245,6 +246,17 @@ public class NotificationPanelViewController extends OverlayPanelViewController mNotificationView = (CarNotificationView) LayoutInflater.from(mContext).inflate( R.layout.notification_center_activity, container, /* attachToRoot= */ false); mNotificationView.setKeyEventHandler( event -> { if (event.getKeyCode() != KeyEvent.KEYCODE_BACK) { return false; } if (event.getAction() == KeyEvent.ACTION_UP && isPanelExpanded()) { toggle(); } return true; }); container.addView(mNotificationView); onNotificationViewInflated(); Loading services/core/java/com/android/server/pm/PackageManagerService.java +9 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ import static android.content.Intent.EXTRA_PACKAGE_NAME; import static android.content.Intent.EXTRA_VERSION_CODE; import static android.content.pm.PackageManager.CERT_INPUT_RAW_X509; import static android.content.pm.PackageManager.CERT_INPUT_SHA256; import static android.content.Intent.CATEGORY_BROWSABLE; import static android.content.Intent.CATEGORY_DEFAULT; import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DEFAULT; import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED; import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED; Loading Loading @@ -7704,6 +7706,13 @@ public class PackageManagerService extends IPackageManager.Stub Slog.i(TAG, " + always: " + info.activityInfo.packageName + " : linkgen=" + linkGeneration); } if (!intent.hasCategory(CATEGORY_BROWSABLE) || !intent.hasCategory(CATEGORY_DEFAULT)) { undefinedList.add(info); continue; } // Use link-enabled generation as preferredOrder, i.e. // prefer newly-enabled over earlier-enabled. info.preferredOrder = linkGeneration; services/core/java/com/android/server/wm/ActivityMetricsLogger.java +2 −2 Original line number Diff line number Diff line Loading @@ -264,7 +264,7 @@ class ActivityMetricsLogger { return; } mLastLaunchedActivity = r; if (!r.noDisplay) { if (!r.noDisplay && !r.mDrawn) { if (DEBUG_METRICS) Slog.i(TAG, "Add pending draw " + r); mPendingDrawActivities.add(r); } Loading Loading @@ -546,7 +546,7 @@ class ActivityMetricsLogger { + " processSwitch=" + processSwitch + " info=" + info); } if (launchedActivity.mDrawn) { if (launchedActivity.mDrawn && launchedActivity.isVisible()) { // Launched activity is already visible. We cannot measure windows drawn delay. abort(info, "launched activity already visible"); return; Loading services/tests/wmtests/src/com/android/server/wm/ActivityMetricsLaunchObserverTests.java +16 −0 Original line number Diff line number Diff line Loading @@ -311,6 +311,22 @@ public class ActivityMetricsLaunchObserverTests extends ActivityTestsBase { verifyNoMoreInteractions(mLaunchObserver); } @Test public void testActivityDrawnBeforeTransition() { mTopActivity.setVisible(false); notifyActivityLaunching(mTopActivity.intent); // Assume the activity is launched the second time consecutively. The drawn event is from // the first time (omitted in test) launch that is earlier than transition. mTopActivity.mDrawn = true; notifyWindowsDrawn(mTopActivity); notifyActivityLaunched(START_SUCCESS, mTopActivity); // If the launching activity was drawn when starting transition, the launch event should // be reported successfully. notifyTransitionStarting(mTopActivity); verifyOnActivityLaunchFinished(mTopActivity); } @Test public void testActivityRecordProtoIsNotTooBig() { // The ActivityRecordProto must not be too big, otherwise converting it at runtime Loading Loading
packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java +12 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.os.IBinder; import android.os.RemoteException; import android.util.Log; import android.view.GestureDetector; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; Loading Loading @@ -245,6 +246,17 @@ public class NotificationPanelViewController extends OverlayPanelViewController mNotificationView = (CarNotificationView) LayoutInflater.from(mContext).inflate( R.layout.notification_center_activity, container, /* attachToRoot= */ false); mNotificationView.setKeyEventHandler( event -> { if (event.getKeyCode() != KeyEvent.KEYCODE_BACK) { return false; } if (event.getAction() == KeyEvent.ACTION_UP && isPanelExpanded()) { toggle(); } return true; }); container.addView(mNotificationView); onNotificationViewInflated(); Loading
services/core/java/com/android/server/pm/PackageManagerService.java +9 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ import static android.content.Intent.EXTRA_PACKAGE_NAME; import static android.content.Intent.EXTRA_VERSION_CODE; import static android.content.pm.PackageManager.CERT_INPUT_RAW_X509; import static android.content.pm.PackageManager.CERT_INPUT_SHA256; import static android.content.Intent.CATEGORY_BROWSABLE; import static android.content.Intent.CATEGORY_DEFAULT; import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DEFAULT; import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED; import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED; Loading Loading @@ -7704,6 +7706,13 @@ public class PackageManagerService extends IPackageManager.Stub Slog.i(TAG, " + always: " + info.activityInfo.packageName + " : linkgen=" + linkGeneration); } if (!intent.hasCategory(CATEGORY_BROWSABLE) || !intent.hasCategory(CATEGORY_DEFAULT)) { undefinedList.add(info); continue; } // Use link-enabled generation as preferredOrder, i.e. // prefer newly-enabled over earlier-enabled. info.preferredOrder = linkGeneration;
services/core/java/com/android/server/wm/ActivityMetricsLogger.java +2 −2 Original line number Diff line number Diff line Loading @@ -264,7 +264,7 @@ class ActivityMetricsLogger { return; } mLastLaunchedActivity = r; if (!r.noDisplay) { if (!r.noDisplay && !r.mDrawn) { if (DEBUG_METRICS) Slog.i(TAG, "Add pending draw " + r); mPendingDrawActivities.add(r); } Loading Loading @@ -546,7 +546,7 @@ class ActivityMetricsLogger { + " processSwitch=" + processSwitch + " info=" + info); } if (launchedActivity.mDrawn) { if (launchedActivity.mDrawn && launchedActivity.isVisible()) { // Launched activity is already visible. We cannot measure windows drawn delay. abort(info, "launched activity already visible"); return; Loading
services/tests/wmtests/src/com/android/server/wm/ActivityMetricsLaunchObserverTests.java +16 −0 Original line number Diff line number Diff line Loading @@ -311,6 +311,22 @@ public class ActivityMetricsLaunchObserverTests extends ActivityTestsBase { verifyNoMoreInteractions(mLaunchObserver); } @Test public void testActivityDrawnBeforeTransition() { mTopActivity.setVisible(false); notifyActivityLaunching(mTopActivity.intent); // Assume the activity is launched the second time consecutively. The drawn event is from // the first time (omitted in test) launch that is earlier than transition. mTopActivity.mDrawn = true; notifyWindowsDrawn(mTopActivity); notifyActivityLaunched(START_SUCCESS, mTopActivity); // If the launching activity was drawn when starting transition, the launch event should // be reported successfully. notifyTransitionStarting(mTopActivity); verifyOnActivityLaunchFinished(mTopActivity); } @Test public void testActivityRecordProtoIsNotTooBig() { // The ActivityRecordProto must not be too big, otherwise converting it at runtime Loading