1 /* 2 * Copyright (C) 2017 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.graphics.Rect; 19 import android.os.Bundle; 20 21 /** 22 * This interface defines the communication channel between the cluster vendor implementation and 23 * Car Service. 24 * 25 * @hide 26 */ 27 interface IInstrumentClusterCallback { 28 /** 29 * Notify Car Service how to launch an activity for particular category. 30 * 31 * @param category cluster activity category, 32 * see {@link android.car.cluster.CarInstrumentClusterManager} for details. 33 * @param activityOptions this bundle will be converted to {@link android.app.ActivityOptions} 34 * and used when starting an activity. It may contain information such as virtual display 35 * id or activity stack id where to start cluster activity. 36 * 37 * @hide 38 */ setClusterActivityLaunchOptions(String category, in Bundle activityOptions)39 void setClusterActivityLaunchOptions(String category, in Bundle activityOptions); 40 41 /** 42 * Activities launched on virtual display will be in onPause state most of the time, so they 43 * can't really know whether they visible on the screen or not. We need to propagate this 44 * information along with unobscured bounds (and possible other info) from instrument cluster 45 * vendor implementation to activity. 46 * 47 * @param category cluster activity category to which this state applies, 48 * see {@link android.car.cluster.CarInstrumentClusterManager} for details. 49 * @param clusterActivityState is a {@link Bundle} object, 50 * see {@link android.car.cluster.ClusterActivityState} for how to construct the bundle. 51 * @hide 52 */ setClusterActivityState(String category, in Bundle clusterActivityState)53 void setClusterActivityState(String category, in Bundle clusterActivityState); 54 } 55