summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author shannonchen <shannonchen@google.com> 2022-04-18 20:34:03 +0000
committer Shannon Chen <shannonchen@google.com> 2022-04-27 20:13:57 +0000
commit7b2c3db83afc15a5baf8deb09ed47a6fb863f7da (patch)
tree5512f8d1b4f2fa0c762ab337c65717d4b0fa2615
parent444880f0461f3e7ea1651c523f4f1a6cc7e48815 (diff)
Make GameSessionTrampolineActivity invisible
This change adds a new theme to prevent GameSessionTrampolineActivity from displaying any UI, which in turn delegates the decision of whether or not to show things like the system bars to the delegate activity. This change also disables transition animations for the trampoline activity, to prevent them from causing flickering. Bug: 229757156 Test: manual testing using GMS dashboard Change-Id: I82e0ede2e9f0b334fd01e958eab0736042119e84
-rw-r--r--core/java/android/service/games/GameSessionTrampolineActivity.java2
-rw-r--r--core/res/AndroidManifest.xml2
-rw-r--r--core/res/res/values/themes.xml16
3 files changed, 19 insertions, 1 deletions
diff --git a/core/java/android/service/games/GameSessionTrampolineActivity.java b/core/java/android/service/games/GameSessionTrampolineActivity.java
index 3d97d0f59b33..eec7ac6ff447 100644
--- a/core/java/android/service/games/GameSessionTrampolineActivity.java
+++ b/core/java/android/service/games/GameSessionTrampolineActivity.java
@@ -60,6 +60,7 @@ public final class GameSessionTrampolineActivity extends Activity {
FUTURE_KEY);
future.completeExceptionally(e);
finish();
+ overridePendingTransition(0, 0);
}
}
@@ -74,5 +75,6 @@ public final class GameSessionTrampolineActivity extends Activity {
FUTURE_KEY);
future.complete(new GameSessionActivityResult(resultCode, data));
finish();
+ overridePendingTransition(0, 0);
}
}
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 4075c5f4d8ae..0a2b01998ca9 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -6790,7 +6790,7 @@
android:excludeFromRecents="true"
android:exported="true"
android:permission="android.permission.MANAGE_GAME_ACTIVITY"
- android:theme="@style/Theme.Translucent.NoTitleBar">
+ android:theme="@style/Theme.GameSessionTrampoline">
</activity>
<receiver android:name="com.android.server.BootReceiver"
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index bf42da080390..a60862b74e15 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -894,6 +894,22 @@ please see themes_device_defaults.xml.
<!-- @hide Special theme for the default system Activity-based Alert dialogs. -->
<style name="Theme.Dialog.Confirmation" parent="Theme.DeviceDefault.Dialog.Alert.DayNight" />
+ <!-- @hide Theme for GameSessionTrampolineActivity that prevents showing UI and activity
+ transitions. -->
+ <style name="Theme.GameSessionTrampoline">
+ <item name="backgroundDimEnabled">false</item>
+ <item name="colorBackgroundCacheHint">@null</item>
+ <item name="navigationBarColor">@color/transparent</item>
+ <item name="statusBarColor">@color/transparent</item>
+ <item name="windowAnimationStyle">@null</item>
+ <item name="windowBackground">@null</item>
+ <item name="windowContentOverlay">@null</item>
+ <item name="windowDrawsSystemBarBackgrounds">true</item>
+ <item name="windowIsFloating">true</item>
+ <item name="windowIsTranslucent">true</item>
+ <item name="windowNoTitle">true</item>
+ </style>
+
<!-- Theme for a window that looks like a toast. -->
<style name="Theme.Toast" parent="Theme.DeviceDefault.Dialog">
<item name="windowBackground">?attr/toastFrameBackground</item>