• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 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.view;
18 
19 import android.annotation.NonNull;
20 import android.media.quality.PictureProfileHandle;
21 
22 /**
23  * A record of a visible layer that is using picture processing.
24  * @hide
25  */
26 public class SurfaceControlActivePicture {
27     private final int mLayerId;
28     private final int mOwnerUid;
29     private final @NonNull PictureProfileHandle mPictureProfileHandle;
30 
31     /**
32      * Create a record of a visible layer that is using picture processing.
33      *
34      * @param layerId the layer that is using picture processing
35      * @param ownerUid the UID of the package that owns the layer
36      * @param handle the handle for the picture profile that configured the processing
37      */
SurfaceControlActivePicture(int layerId, int ownerUid, PictureProfileHandle handle)38     private SurfaceControlActivePicture(int layerId, int ownerUid, PictureProfileHandle handle) {
39         mLayerId = layerId;
40         mOwnerUid = ownerUid;
41         mPictureProfileHandle = handle;
42     }
43 
44     /** The layer that is using picture processing.  */
getLayerId()45     public int getLayerId() {
46         return mLayerId;
47     }
48 
49     /** The UID of the package that owns the layer using picture processing. */
getOwnerUid()50     public int getOwnerUid() {
51         return mOwnerUid;
52     }
53 
54     /** A handle that indicates which picture profile has configured the picture processing. */
getPictureProfileHandle()55     public @NonNull PictureProfileHandle getPictureProfileHandle() {
56         return mPictureProfileHandle;
57     }
58 }
59