| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.content.pm; |
| 18 |
|
| 19 |
import android.annotation.NonNull; |
| 20 |
import android.annotation.Nullable; |
| 21 |
import android.content.ComponentName; |
| 22 |
import android.content.LocusId; |
| 23 |
import android.os.Parcel; |
| 24 |
import android.os.Parcelable; |
| 25 |
|
| 26 |
import com.android.internal.util.DataClass; |
| 27 |
|
| 28 |
import java.util.ArrayList; |
| 29 |
import java.util.List; |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
@DataClass(genParcelable = true, genToString = true) |
| 35 |
public final class ShortcutQueryWrapper extends LauncherApps.ShortcutQuery implements Parcelable { |
| 36 |
|
| 37 |
public ShortcutQueryWrapper(LauncherApps.ShortcutQuery query) { |
| 38 |
this(); |
| 39 |
mChangedSince = query.mChangedSince; |
| 40 |
mPackage = query.mPackage; |
| 41 |
mLocusIds = query.mLocusIds; |
| 42 |
mShortcutIds = query.mShortcutIds; |
| 43 |
mActivity = query.mActivity; |
| 44 |
mQueryFlags = query.mQueryFlags; |
| 45 |
} |
| 46 |
|
| 47 |
public long getChangedSince() { |
| 48 |
return mChangedSince; |
| 49 |
} |
| 50 |
|
| 51 |
@Nullable |
| 52 |
public String getPackage() { |
| 53 |
return mPackage; |
| 54 |
} |
| 55 |
|
| 56 |
@Nullable |
| 57 |
public List<LocusId> getLocusIds() { |
| 58 |
return mLocusIds; |
| 59 |
} |
| 60 |
|
| 61 |
@Nullable |
| 62 |
public List<String> getShortcutIds() { |
| 63 |
return mShortcutIds; |
| 64 |
} |
| 65 |
|
| 66 |
@Nullable |
| 67 |
public ComponentName getActivity() { |
| 68 |
return mActivity; |
| 69 |
} |
| 70 |
|
| 71 |
public int getQueryFlags() { |
| 72 |
return mQueryFlags; |
| 73 |
} |
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
@DataClass.Generated.Member |
| 89 |
public ShortcutQueryWrapper() { |
| 90 |
|
| 91 |
|
| 92 |
} |
| 93 |
|
| 94 |
@Override |
| 95 |
@DataClass.Generated.Member |
| 96 |
public String toString() { |
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
return "ShortcutQueryWrapper { " + |
| 101 |
" }"; |
| 102 |
} |
| 103 |
|
| 104 |
@Override |
| 105 |
@DataClass.Generated.Member |
| 106 |
public void writeToParcel(@NonNull Parcel dest, int flags) { |
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
byte flg = 0; |
| 111 |
if (mPackage != null) flg |= 0x2; |
| 112 |
if (mShortcutIds != null) flg |= 0x4; |
| 113 |
if (mLocusIds != null) flg |= 0x8; |
| 114 |
if (mActivity != null) flg |= 0x10; |
| 115 |
dest.writeByte(flg); |
| 116 |
dest.writeLong(mChangedSince); |
| 117 |
if (mPackage != null) dest.writeString(mPackage); |
| 118 |
if (mShortcutIds != null) dest.writeStringList(mShortcutIds); |
| 119 |
if (mLocusIds != null) dest.writeParcelableList(mLocusIds, flags); |
| 120 |
if (mActivity != null) dest.writeTypedObject(mActivity, flags); |
| 121 |
dest.writeInt(mQueryFlags); |
| 122 |
} |
| 123 |
|
| 124 |
@Override |
| 125 |
@DataClass.Generated.Member |
| 126 |
public int describeContents() { return 0; } |
| 127 |
|
| 128 |
|
| 129 |
@SuppressWarnings({"unchecked", "RedundantCast"}) |
| 130 |
@DataClass.Generated.Member |
| 131 |
ShortcutQueryWrapper(@NonNull Parcel in) { |
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
byte flg = in.readByte(); |
| 136 |
long changedSince = in.readLong(); |
| 137 |
String pkg = (flg & 0x2) == 0 ? null : in.readString(); |
| 138 |
List<String> shortcutIds = null; |
| 139 |
if ((flg & 0x4) != 0) { |
| 140 |
shortcutIds = new ArrayList<>(); |
| 141 |
in.readStringList(shortcutIds); |
| 142 |
} |
| 143 |
List<LocusId> locusIds = null; |
| 144 |
if ((flg & 0x8) != 0) { |
| 145 |
locusIds = new ArrayList<>(); |
| 146 |
in.readParcelableList(locusIds, LocusId.class.getClassLoader(), android.content.LocusId.class); |
| 147 |
} |
| 148 |
ComponentName activity = (flg & 0x10) == 0 ? null |
| 149 |
: (ComponentName) in.readTypedObject(ComponentName.CREATOR); |
| 150 |
int queryFlags = in.readInt(); |
| 151 |
|
| 152 |
this.mChangedSince = changedSince; |
| 153 |
this.mPackage = pkg; |
| 154 |
this.mShortcutIds = shortcutIds; |
| 155 |
this.mLocusIds = locusIds; |
| 156 |
this.mActivity = activity; |
| 157 |
this.mQueryFlags = queryFlags; |
| 158 |
com.android.internal.util.AnnotationValidations.validate( |
| 159 |
QueryFlags.class, null, mQueryFlags); |
| 160 |
|
| 161 |
|
| 162 |
} |
| 163 |
|
| 164 |
@DataClass.Generated.Member |
| 165 |
public static final @NonNull Parcelable.Creator<ShortcutQueryWrapper> CREATOR |
| 166 |
= new Parcelable.Creator<ShortcutQueryWrapper>() { |
| 167 |
@Override |
| 168 |
public ShortcutQueryWrapper[] newArray(int size) { |
| 169 |
return new ShortcutQueryWrapper[size]; |
| 170 |
} |
| 171 |
|
| 172 |
@Override |
| 173 |
public ShortcutQueryWrapper createFromParcel(@NonNull Parcel in) { |
| 174 |
return new ShortcutQueryWrapper(in); |
| 175 |
} |
| 176 |
}; |
| 177 |
|
| 178 |
@DataClass.Generated( |
| 179 |
time = 1582049937960L, |
| 180 |
codegenVersion = "1.0.14", |
| 181 |
sourceFile = "frameworks/base/core/java/android/content/pm/ShortcutQueryWrapper.java", |
| 182 |
inputSignatures = "public long getChangedSince()\npublic @android.annotation.Nullable java.lang.String getPackage()\npublic @android.annotation.Nullable java.util.List<android.content.LocusId> getLocusIds()\npublic @android.annotation.Nullable java.util.List<java.lang.String> getShortcutIds()\npublic @android.annotation.Nullable android.content.ComponentName getActivity()\npublic int getQueryFlags()\nclass ShortcutQueryWrapper extends android.content.pm.LauncherApps.ShortcutQuery implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genParcelable=true, genToString=true)") |
| 183 |
@Deprecated |
| 184 |
private void __metadata() {} |
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
} |