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 android.hardware.input;
18 
19 import android.annotation.NonNull;
20 import android.annotation.SystemApi;
21 import android.os.Parcel;
22 import android.os.Parcelable;
23 
24 /**
25  * Configurations to create virtual mouse.
26  *
27  * @hide
28  */
29 @SystemApi
30 public final class VirtualMouseConfig extends VirtualInputDeviceConfig implements Parcelable {
31     @NonNull
32     public static final Creator<VirtualMouseConfig> CREATOR = new Creator<VirtualMouseConfig>() {
33         @Override
34         public VirtualMouseConfig createFromParcel(Parcel in) {
35             return new VirtualMouseConfig(in);
36         }
37 
38         @Override
39         public VirtualMouseConfig[] newArray(int size) {
40             return new VirtualMouseConfig[size];
41         }
42     };
43 
VirtualMouseConfig(@onNull VirtualMouseConfig.Builder builder)44     private VirtualMouseConfig(@NonNull VirtualMouseConfig.Builder builder) {
45         super(builder);
46     }
47 
VirtualMouseConfig(@onNull Parcel in)48     private VirtualMouseConfig(@NonNull Parcel in) {
49         super(in);
50     }
51 
52     @Override
describeContents()53     public int describeContents() {
54         return 0;
55     }
56 
57     @Override
writeToParcel(@onNull Parcel dest, int flags)58     public void writeToParcel(@NonNull Parcel dest, int flags) {
59         super.writeToParcel(dest, flags);
60     }
61 
62     /**
63      * Builder for creating a {@link VirtualMouseConfig}.
64      */
65     public static final class Builder extends VirtualInputDeviceConfig.Builder<Builder> {
66 
67         /**
68          * Builds the {@link VirtualMouseConfig} instance.
69          */
70         @NonNull
build()71         public VirtualMouseConfig build() {
72             return new VirtualMouseConfig(this);
73         }
74     }
75 }
76