1 /*
2  * Copyright (C) 2023 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.admin;
18 
19 import android.annotation.Nullable;
20 import android.annotation.SuppressLint;
21 import android.annotation.SystemApi;
22 import android.os.Parcelable;
23 
24 /**
25  * Abstract class used to identify the authority of the {@link EnforcingAdmin}.
26  *
27  * @hide
28  */
29 // This is ok as the constructor is package-protected and all subclasses have implemented
30 // Parcelable.
31 @SuppressLint({"ParcelNotFinal", "ParcelCreator"})
32 @SystemApi
33 public abstract class Authority implements Parcelable {
34 
35     /**
36      * @hide
37      */
Authority()38     protected Authority() {}
39 
40     @Override
equals(@ullable Object o)41     public boolean equals(@Nullable Object o) {
42         if (this == o) return true;
43         return o != null && getClass() == o.getClass();
44     }
45 
46     @Override
hashCode()47     public int hashCode() {
48         return 0;
49     }
50 
51     @Override
describeContents()52     public int describeContents() {
53         return 0;
54     }
55 }
56