• 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.NonNull;
20 import android.annotation.Nullable;
21 import android.annotation.SystemApi;
22 import android.car.builtin.annotation.PlatformVersion;
23 import android.graphics.Rect;
24 import android.view.Display;
25 
26 import com.android.annotation.AddedIn;
27 
28 import java.util.List;
29 
30 /**
31  * Interface implemented by {@code CarLaunchParamsModifier} and used by
32  * {@code CarLaunchParamsModifierUpdatable}.
33  *
34  * Because {@code CarLaunchParamsModifierUpdatable} calls {@code CarLaunchParamsModifierInterface}
35  * with {@code mLock} acquired, {@code CarLaunchParamsModifierInterface} shouldn't call
36  * {@code CarLaunchParamsModifierUpdatable} again during its execution.
37  * @hide
38  */
39 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
40 public interface CarLaunchParamsModifierInterface {
41     /**
42      * Returns {@link TaskDisplayAreaWrapper} of the given {@code featureId} in the given
43      * {@code displayId}.
44      */
45     @AddedIn(PlatformVersion.TIRAMISU_0)
findTaskDisplayArea(int displayId, int featureId)46     @Nullable TaskDisplayAreaWrapper findTaskDisplayArea(int displayId, int featureId);
47 
48     /**
49      * Returns the default {@link TaskDisplayAreaWrapper} of the given {@code displayId}.
50      */
51     @AddedIn(PlatformVersion.TIRAMISU_0)
getDefaultTaskDisplayAreaOnDisplay(int displayId)52     @Nullable TaskDisplayAreaWrapper getDefaultTaskDisplayAreaOnDisplay(int displayId);
53 
54     /**
55      * Returns the list of fallback {@link TaskDisplayAreaWrapper} from the source of the request.
56      */
57     @AddedIn(PlatformVersion.TIRAMISU_0)
getFallbackDisplayAreasForActivity( @onNull ActivityRecordWrapper activityRecord, @Nullable RequestWrapper request)58     @NonNull List<TaskDisplayAreaWrapper> getFallbackDisplayAreasForActivity(
59             @NonNull ActivityRecordWrapper activityRecord, @Nullable RequestWrapper request);
60 
61 }
62