Debian Codegraph @

core/java/android/os/CarrierAssociatedAppEntry.java

raw symbols SCIP
1 /*
2 * Copyright (C) 2020 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 package android.os;
17
18 /**
19 * Represents a carrier app entry for use with {@link SystemConfigService}.
20 *
21 * @hide
22 */
23 public final class CarrierAssociatedAppEntry implements Parcelable {
24
25 /**
26 * For carrier-associated app entries that don't specify the addedInSdk XML
27 * attribute.
28 */
29 public static final int SDK_UNSPECIFIED = -1;
30
31 public final String packageName;
32 /** May be {@link #SDK_UNSPECIFIED}. */
33 public final int addedInSdk;
34
35 public CarrierAssociatedAppEntry(String packageName, int addedInSdk) {
36 this.packageName = packageName;
37 this.addedInSdk = addedInSdk;
38 }
39
40 public CarrierAssociatedAppEntry(Parcel in) {
41 packageName = in.readString();
42 addedInSdk = in.readInt();
43 }
44
45 @Override
46 public int describeContents() {
47 return 0;
48 }
49
50 @Override
51 public void writeToParcel(Parcel dest, int flags) {
52 dest.writeString(packageName);
53 dest.writeInt(addedInSdk);
54 }
55
56 public static final Parcelable.Creator<CarrierAssociatedAppEntry> CREATOR =
57 new Parcelable.Creator<CarrierAssociatedAppEntry>() {
58 @Override
59 public CarrierAssociatedAppEntry createFromParcel(Parcel source) {
60 return new CarrierAssociatedAppEntry(source);
61 }
62
63 @Override
64 public CarrierAssociatedAppEntry[] newArray(int size) {
65 return new CarrierAssociatedAppEntry[size];
66 }
67 };
68 }