diff options
| author | Shannon Chen <shannonchen@google.com> | 2021-12-14 15:32:04 +0000 |
|---|---|---|
| committer | Shannon Chen <shannonchen@google.com> | 2021-12-14 15:34:17 +0000 |
| commit | 5704c4dfe8000bb565191e187159ce913f8c8576 (patch) | |
| tree | f213178e1709a1ce463df80ec49fb8895af7bc24 /core/java | |
| parent | ca3f277231d61755a060bb60cc91fc41397d2dd8 (diff) | |
Add sample XML to GameService javadoc to show how to request BIND_GAME_SERVICE permission.
Bug: 204504879
Bug: 202414447
Bug: 202417255
Bug: 210622264
Change-Id: I0659b13c0cb511a205e3423b5a0b5c14ffedc225
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/service/games/GameService.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/core/java/android/service/games/GameService.java b/core/java/android/service/games/GameService.java index 4b440ddf5405..ed80c840404e 100644 --- a/core/java/android/service/games/GameService.java +++ b/core/java/android/service/games/GameService.java @@ -38,10 +38,23 @@ import java.util.Objects; * when a game session should begin. It is always kept running by the system. * Because of this it should be kept as lightweight as possible. * - * Heavy weight operations (such as showing UI) should be implemented in the + * <p>Heavyweight operations (such as showing UI) should be implemented in the * associated {@link GameSessionService} when a game session is taking place. Its * implementation should run in a separate process from the {@link GameService}. * + * <p>To extend this class, you must declare the service in your manifest file with + * the {@link android.Manifest.permission#BIND_GAME_SERVICE} permission + * and include an intent filter with the {@link #SERVICE_INTERFACE} action. For example: + * <pre> + * <service android:name=".GameService" + * android:label="@string/service_name" + * android:permission="android.permission.BIND_GAME_SERVICE"> + * <intent-filter> + * <action android:name="android.service.games.GameService" /> + * </intent-filter> + * </service> + * </pre> + * * @hide */ @SystemApi |
