1 /*
2  * Copyright (C) 2019 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.car.cluster.renderer;
17 
18 import android.content.Intent;
19 import android.os.Bundle;
20 
21 /**
22  * Helper binder API for InstrumentClusterRenderingService. This contains binder calls to car
23  * service.
24  *
25  * @hide
26  */
27 interface IInstrumentClusterHelper {
28     /**
29      * Start an activity to specified display / user. The activity is considered as
30      * in fixed mode for the display and will be re-launched if the activity crashes, the package
31      * is updated or goes to background for whatever reason.
32      * Only one activity can exist in fixed mode for the target display and calling this multiple
33      * times with different {@code Intent} will lead into making all previous activities into
34      * non-fixed normal state (= will not be re-launched.)
35      *
36      * Do not change binder transaction number.
37      */
startFixedActivityModeForDisplayAndUser(in Intent intent, in Bundle activityOptionsBundle, int userId)38     boolean startFixedActivityModeForDisplayAndUser(in Intent intent,
39             in Bundle activityOptionsBundle, int userId) = 0;
40     /**
41      * The activity lauched on the display is no longer in fixed mode. Re-launching or finishing
42      * should not trigger re-launfhing any more. Note that Activity for non-current user will
43      * be auto-stopped and there is no need to call this for user swiching. Note that this does not
44      * stop the activity but it will not be re-launched any more.
45      *
46      * Do not change binder transaction number.
47      */
stopFixedActivityMode(int displayId)48     void stopFixedActivityMode(int displayId) = 1;
49 }
50