1 /**
2  * Copyright (c) 2024, 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 
17 package android.app.dream.cts.app;
18 
19 import android.app.dream.cts.app.IDreamLifecycleListener;
20 
21 /**
22 * The {@link IControlledDream} interface allows for various characteristics and behaviors of a dream
23 * to be changed in real-time.
24 */
25 interface IControlledDream {
26     /**
27      * Sets whether the dream is interactive and should accept interaction input.
28      */
setInteractive(boolean interactive)29     void setInteractive(boolean interactive);
30 
31     /**
32      * Sets the key codes of keys that the dream should consume. The provided list will replace any
33      * previously set list.
34      */
setConsumedKeys(in int[] keyCodes)35     void setConsumedKeys(in int[] keyCodes);
36 
37     /**
38      * Registers a lifecycle listener.
39      */
registerLifecycleListener(in IDreamLifecycleListener listener)40     void registerLifecycleListener(in IDreamLifecycleListener listener);
41 
42     /**
43      * Unregisters a lifecycle listener.
44      */
unregisterLifecycleListener(in IDreamLifecycleListener listener)45     void unregisterLifecycleListener(in IDreamLifecycleListener listener);
46 
47 
48 }