From 60101c9f298e69ee2b5ee5f67943515aae79b187 Mon Sep 17 00:00:00 2001 From: Mady Mellor Date: Thu, 11 Apr 2019 19:04:00 -0700 Subject: Make lifecycle events for bubble activity views report normally There are some extra onPause / onResume events in ActivityView due to SysUI calling startActivity in onActivityViewReady which happens a bit before the display being turned on. This CL posts the startActivity call which is enough to avoid the extra lifecycle events. This CL also adds new method on ActivityView to startActivity with your own ActivityOptions (because posting causes activity transition to occur...) Test: manual - have Bubbles test APK - create a new bubble - adb logcat | grep "BubbleActivity" - observe the logging to make sure lifecycle events behave normally Bug: 130363466 Change-Id: Ia44d6033e5cff625222006632b7bdc4dc1e59e81 --- api/test-current.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'api') diff --git a/api/test-current.txt b/api/test-current.txt index 63c8df047f90..6b0399b7b30e 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -117,6 +117,7 @@ package android.app { method public void startActivity(@NonNull android.content.Intent); method public void startActivity(@NonNull android.content.Intent, android.os.UserHandle); method public void startActivity(@NonNull android.app.PendingIntent); + method public void startActivity(@NonNull android.app.PendingIntent, @NonNull android.app.ActivityOptions); } public abstract static class ActivityView.StateCallback { -- cgit v1.2.3-59-g8ed1b