• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
17 package com.android.server.wm;
18 
19 import android.annotation.RequiresApi;
20 import android.annotation.SystemApi;
21 import android.annotation.UserIdInt;
22 import android.car.builtin.annotation.PlatformVersion;
23 import android.hardware.display.DisplayManager;
24 import android.os.Build;
25 
26 import com.android.annotation.AddedIn;
27 
28 /**
29  * Updatable interface of CarLaunchParamsModifier.
30  * @hide
31  */
32 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
33 public interface CarLaunchParamsModifierUpdatable {
34 
35     /** Returns {@link DisplayManager.DisplayListener} of CarLaunchParamsModifierUpdatable. */
36     @AddedIn(PlatformVersion.TIRAMISU_0)
getDisplayListener()37     DisplayManager.DisplayListener getDisplayListener();
38 
39     /** Notifies user switching. */
40     @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
41     @AddedIn(PlatformVersion.UPSIDE_DOWN_CAKE_0)
handleUserVisibilityChanged(@serIdInt int userId, boolean visible)42     void handleUserVisibilityChanged(@UserIdInt int userId, boolean visible);
43 
44     /** Notifies user switching. */
45     @AddedIn(PlatformVersion.TIRAMISU_0)
handleCurrentUserSwitching(@serIdInt int newUserId)46     void handleCurrentUserSwitching(@UserIdInt int newUserId);
47 
48     /** Notifies user starting. */
49     @AddedIn(PlatformVersion.TIRAMISU_0)
handleUserStarting(@serIdInt int startingUser)50     void handleUserStarting(@UserIdInt int startingUser);
51 
52     /** Notifies user stopped. */
53     @AddedIn(PlatformVersion.TIRAMISU_0)
handleUserStopped(@serIdInt int stoppedUser)54     void handleUserStopped(@UserIdInt int stoppedUser);
55 
56     /**
57      * Calculates {@code outParams} based on the given arguments.
58      * See {@code LaunchParamsController.LaunchParamsModifier.onCalculate()} for the detail.
59      */
60     @AddedIn(PlatformVersion.TIRAMISU_0)
calculate(CalculateParams params)61     int calculate(CalculateParams params);
62 }
63