2 * Copyright (C) 2007 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package android.content.pm;
19 import android.os.Parcel;
20 import android.os.Parcelable;
23 * Basic information about a package as specified in its manifest.
24 * Utility class used in PackageManager methods
27 public class PackageInfoLite implements Parcelable {
29 * The name of this package. From the <manifest> tag's "name"
32 public String packageName;
35 * Specifies the recommended install location. Can be one of
36 * {@link #PackageHelper.RECOMMEND_INSTALL_INTERNAL} to install on internal storage
37 * {@link #PackageHelper.RECOMMEND_INSTALL_EXTERNAL} to install on external media
38 * {@link PackageHelper.RECOMMEND_FAILED_INSUFFICIENT_STORAGE} for storage errors
39 * {@link PackageHelper.RECOMMEND_FAILED_INVALID_APK} for parse errors.
41 public int recommendedInstallLocation;
42 public int installLocation;
44 public PackageInfoLite() {
47 public String toString() {
48 return "PackageInfoLite{"
49 + Integer.toHexString(System.identityHashCode(this))
50 + " " + packageName + "}";
53 public int describeContents() {
57 public void writeToParcel(Parcel dest, int parcelableFlags) {
58 dest.writeString(packageName);
59 dest.writeInt(recommendedInstallLocation);
60 dest.writeInt(installLocation);
63 public static final Parcelable.Creator<PackageInfoLite> CREATOR
64 = new Parcelable.Creator<PackageInfoLite>() {
65 public PackageInfoLite createFromParcel(Parcel source) {
66 return new PackageInfoLite(source);
69 public PackageInfoLite[] newArray(int size) {
70 return new PackageInfoLite[size];
74 private PackageInfoLite(Parcel source) {
75 packageName = source.readString();
76 recommendedInstallLocation = source.readInt();
77 installLocation = source.readInt();