1 /* 2 * Copyright (C) 2022 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package android.service.games.testing; 17 18 import android.content.Intent; 19 import android.graphics.Rect; 20 import android.os.Bundle; 21 import android.service.games.testing.ActivityResult; 22 import android.service.games.testing.GameSessionEventInfo; 23 import android.service.games.testing.OnSystemBarVisibilityChangedInfo; 24 25 interface IGameServiceTestService { isGameServiceConnected()26 boolean isGameServiceConnected(); 27 setGamePackageNames(in List<String> packageNames)28 void setGamePackageNames(in List<String> packageNames); 29 getActiveSessions()30 List<String> getActiveSessions(); 31 getGameSessionEventHistory()32 List<GameSessionEventInfo> getGameSessionEventHistory(); 33 resetState()34 void resetState(); 35 getFocusedTaskId()36 int getFocusedTaskId(); 37 startGameSessionActivity(in Intent intent, in Bundle options)38 void startGameSessionActivity(in Intent intent, in Bundle options); 39 getLastActivityResult()40 ActivityResult getLastActivityResult(); 41 getTouchableOverlayBounds()42 Rect getTouchableOverlayBounds(); 43 restartFocusedGameSession()44 void restartFocusedGameSession(); 45 takeScreenshotForFocusedGameSession()46 boolean takeScreenshotForFocusedGameSession(); 47 getOnSystemBarVisibilityChangedInfo()48 OnSystemBarVisibilityChangedInfo getOnSystemBarVisibilityChangedInfo(); 49 setGameServiceComponentEnabled(boolean enabled)50 void setGameServiceComponentEnabled(boolean enabled); 51 setGameSessionServiceComponentEnabled(boolean enabled)52 void setGameSessionServiceComponentEnabled(boolean enabled); 53 }