diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-17 21:06:13 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-17 21:06:13 +0000 |
commit | b8ac4c9e8240621440c113d78537f406488bdf2a (patch) | |
tree | 2ac5a0202b5d9c10128411c016709da174bde56d | |
parent | 2a31245900d70326d54765b492f9c39efe2193f8 (diff) | |
parent | 758461abfb2dbfaef95ac47848cebc00a01217a0 (diff) | |
download | Cluster-android-platform-12.1.0_r8.tar.gz |
Snap for 8589293 from 758461abfb2dbfaef95ac47848cebc00a01217a0 to sc-v2-platform-releaseandroid-platform-12.1.0_r9android-platform-12.1.0_r8android-platform-12.1.0_r7android-platform-12.1.0_r6android-platform-12.1.0_r5android-platform-12.1.0_r4android-platform-12.1.0_r27android-platform-12.1.0_r26android-platform-12.1.0_r25android-platform-12.1.0_r24android-platform-12.1.0_r23android-platform-12.1.0_r22android-platform-12.1.0_r21android-platform-12.1.0_r20android-platform-12.1.0_r19android-platform-12.1.0_r18android-platform-12.1.0_r17android-platform-12.1.0_r16android-platform-12.1.0_r15android-platform-12.1.0_r14android-platform-12.1.0_r13android-platform-12.1.0_r12android-platform-12.1.0_r11android-platform-12.1.0_r10android12L-platform-release
Change-Id: I79b767cf779586161b8f3a62df40b794835147eb
3 files changed, 9 insertions, 1 deletions
diff --git a/ClusterHomeSample/AndroidManifest.xml b/ClusterHomeSample/AndroidManifest.xml index 1142467..1dc7eb5 100644 --- a/ClusterHomeSample/AndroidManifest.xml +++ b/ClusterHomeSample/AndroidManifest.xml @@ -31,6 +31,7 @@ --> <application android:name=".ClusterHomeApplication" android:label="ClusterHomeSample" + android:persistent="true" android:directBootAware="true"> <!-- android:showForAllUsers to keep the Activity regardless of user-switching --> <activity android:name=".ClusterHomeActivity" diff --git a/ClusterHomeSample/src/com/android/car/cluster/home/ClusterHomeApplication.java b/ClusterHomeSample/src/com/android/car/cluster/home/ClusterHomeApplication.java index 3f0b924..86b8d30 100644 --- a/ClusterHomeSample/src/com/android/car/cluster/home/ClusterHomeApplication.java +++ b/ClusterHomeSample/src/com/android/car/cluster/home/ClusterHomeApplication.java @@ -251,6 +251,10 @@ public final class ClusterHomeApplication extends Application { } private final UserLifecycleListener mUserLifecycleListener = (event) -> { + if (DBG) Log.d(TAG, "UserLifecycleListener.onEvent: event=" + event); + if (event.getUserId() != ActivityManager.getCurrentUser()) { + return; + } mUserLifeCycleEvent = event.getEventType(); if (mUserLifeCycleEvent == USER_LIFECYCLE_EVENT_TYPE_STARTING) { startClusterActivity(UI_TYPE_HOME); @@ -266,6 +270,7 @@ public final class ClusterHomeApplication extends Application { }; private void onKeyEvent(KeyEvent keyEvent) { + if (DBG) Log.d(TAG, "onKeyEvent: " + keyEvent); if (keyEvent.getKeyCode() == KeyEvent.KEYCODE_MENU) { if (keyEvent.getAction() != KeyEvent.ACTION_DOWN) return; int nextUiType = (mLastLaunchedUiType + 1) % mUiAvailability.length; diff --git a/ClusterOsDouble/src/com/android/car/cluster/osdouble/ClusterOsDoubleActivity.java b/ClusterOsDouble/src/com/android/car/cluster/osdouble/ClusterOsDoubleActivity.java index 1b4f571..8ba7eb3 100644 --- a/ClusterOsDouble/src/com/android/car/cluster/osdouble/ClusterOsDoubleActivity.java +++ b/ClusterOsDouble/src/com/android/car/cluster/osdouble/ClusterOsDoubleActivity.java @@ -194,7 +194,9 @@ public class ClusterOsDoubleActivity extends ComponentActivity { + "x" + height); return mDisplayManager.createVirtualDisplay(/* projection= */ null, "ClusterOsDouble-VD", width, height, 160, surface, - VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY | VIRTUAL_DISPLAY_FLAG_TRUSTED, + // Don't use VIRTUAL_DISPLAY_FLAG_TRUSTED, because we don't want the cluster display + // to be the focus display which can hinder Rotary service (b/206862329). + VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY, /* callback= */ null, /* handler= */ null, "ClusterDisplay"); } |