| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.permission; |
| 18 |
|
| 19 |
import android.annotation.CurrentTimeMillisLong; |
| 20 |
import android.annotation.NonNull; |
| 21 |
import android.annotation.Nullable; |
| 22 |
import android.annotation.SystemApi; |
| 23 |
import android.os.Parcelable; |
| 24 |
|
| 25 |
import com.android.internal.util.DataClass; |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
@SystemApi |
| 35 |
@DataClass( |
| 36 |
genHiddenConstructor = true, |
| 37 |
genEqualsHashCode = true, |
| 38 |
genToString = true |
| 39 |
) |
| 40 |
public final class PermissionGroupUsage implements Parcelable { |
| 41 |
|
| 42 |
private final @NonNull String mPackageName; |
| 43 |
private final int mUid; |
| 44 |
private final long mLastAccessTimeMillis; |
| 45 |
private final @NonNull String mPermissionGroupName; |
| 46 |
private final boolean mActive; |
| 47 |
private final boolean mPhoneCall; |
| 48 |
private final @Nullable CharSequence mAttributionTag; |
| 49 |
private final @Nullable CharSequence mAttributionLabel; |
| 50 |
private final @Nullable CharSequence mProxyLabel; |
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
@DataClass.Generated.Member |
| 73 |
public PermissionGroupUsage( |
| 74 |
@NonNull String packageName, |
| 75 |
int uid, |
| 76 |
long lastAccessTimeMillis, |
| 77 |
@NonNull String permissionGroupName, |
| 78 |
boolean active, |
| 79 |
boolean phoneCall, |
| 80 |
@Nullable CharSequence attributionTag, |
| 81 |
@Nullable CharSequence attributionLabel, |
| 82 |
@Nullable CharSequence proxyLabel) { |
| 83 |
this.mPackageName = packageName; |
| 84 |
com.android.internal.util.AnnotationValidations.validate( |
| 85 |
NonNull.class, null, mPackageName); |
| 86 |
this.mUid = uid; |
| 87 |
this.mLastAccessTimeMillis = lastAccessTimeMillis; |
| 88 |
this.mPermissionGroupName = permissionGroupName; |
| 89 |
com.android.internal.util.AnnotationValidations.validate( |
| 90 |
NonNull.class, null, mPermissionGroupName); |
| 91 |
this.mActive = active; |
| 92 |
this.mPhoneCall = phoneCall; |
| 93 |
this.mAttributionTag = attributionTag; |
| 94 |
this.mAttributionLabel = attributionLabel; |
| 95 |
this.mProxyLabel = proxyLabel; |
| 96 |
|
| 97 |
|
| 98 |
} |
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
@DataClass.Generated.Member |
| 104 |
public @NonNull String getPackageName() { |
| 105 |
return mPackageName; |
| 106 |
} |
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
@DataClass.Generated.Member |
| 112 |
public int getUid() { |
| 113 |
return mUid; |
| 114 |
} |
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
@CurrentTimeMillisLong |
| 120 |
@DataClass.Generated.Member |
| 121 |
public long getLastAccessTimeMillis() { |
| 122 |
return mLastAccessTimeMillis; |
| 123 |
} |
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
@DataClass.Generated.Member |
| 129 |
public @NonNull String getPermissionGroupName() { |
| 130 |
return mPermissionGroupName; |
| 131 |
} |
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
@DataClass.Generated.Member |
| 137 |
public boolean isActive() { |
| 138 |
return mActive; |
| 139 |
} |
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
@DataClass.Generated.Member |
| 145 |
public boolean isPhoneCall() { |
| 146 |
return mPhoneCall; |
| 147 |
} |
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
@DataClass.Generated.Member |
| 153 |
public @Nullable CharSequence getAttributionTag() { |
| 154 |
return mAttributionTag; |
| 155 |
} |
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
@DataClass.Generated.Member |
| 161 |
public @Nullable CharSequence getAttributionLabel() { |
| 162 |
return mAttributionLabel; |
| 163 |
} |
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
@DataClass.Generated.Member |
| 169 |
public @Nullable CharSequence getProxyLabel() { |
| 170 |
return mProxyLabel; |
| 171 |
} |
| 172 |
|
| 173 |
@Override |
| 174 |
@DataClass.Generated.Member |
| 175 |
public String toString() { |
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
return "PermissionGroupUsage { " + |
| 180 |
"packageName = " + mPackageName + ", " + |
| 181 |
"uid = " + mUid + ", " + |
| 182 |
"lastAccessTimeMillis = " + mLastAccessTimeMillis + ", " + |
| 183 |
"permissionGroupName = " + mPermissionGroupName + ", " + |
| 184 |
"active = " + mActive + ", " + |
| 185 |
"phoneCall = " + mPhoneCall + ", " + |
| 186 |
"attributionTag = " + mAttributionTag + ", " + |
| 187 |
"attributionLabel = " + mAttributionLabel + ", " + |
| 188 |
"proxyLabel = " + mProxyLabel + |
| 189 |
" }"; |
| 190 |
} |
| 191 |
|
| 192 |
@Override |
| 193 |
@DataClass.Generated.Member |
| 194 |
public boolean equals(@Nullable Object o) { |
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
if (this == o) return true; |
| 200 |
if (o == null || getClass() != o.getClass()) return false; |
| 201 |
@SuppressWarnings("unchecked") |
| 202 |
PermissionGroupUsage that = (PermissionGroupUsage) o; |
| 203 |
|
| 204 |
return true |
| 205 |
&& java.util.Objects.equals(mPackageName, that.mPackageName) |
| 206 |
&& mUid == that.mUid |
| 207 |
&& mLastAccessTimeMillis == that.mLastAccessTimeMillis |
| 208 |
&& java.util.Objects.equals(mPermissionGroupName, that.mPermissionGroupName) |
| 209 |
&& mActive == that.mActive |
| 210 |
&& mPhoneCall == that.mPhoneCall |
| 211 |
&& java.util.Objects.equals(mAttributionTag, that.mAttributionTag) |
| 212 |
&& java.util.Objects.equals(mAttributionLabel, that.mAttributionLabel) |
| 213 |
&& java.util.Objects.equals(mProxyLabel, that.mProxyLabel); |
| 214 |
} |
| 215 |
|
| 216 |
@Override |
| 217 |
@DataClass.Generated.Member |
| 218 |
public int hashCode() { |
| 219 |
|
| 220 |
|
| 221 |
|
| 222 |
int _hash = 1; |
| 223 |
_hash = 31 * _hash + java.util.Objects.hashCode(mPackageName); |
| 224 |
_hash = 31 * _hash + mUid; |
| 225 |
_hash = 31 * _hash + Long.hashCode(mLastAccessTimeMillis); |
| 226 |
_hash = 31 * _hash + java.util.Objects.hashCode(mPermissionGroupName); |
| 227 |
_hash = 31 * _hash + Boolean.hashCode(mActive); |
| 228 |
_hash = 31 * _hash + Boolean.hashCode(mPhoneCall); |
| 229 |
_hash = 31 * _hash + java.util.Objects.hashCode(mAttributionTag); |
| 230 |
_hash = 31 * _hash + java.util.Objects.hashCode(mAttributionLabel); |
| 231 |
_hash = 31 * _hash + java.util.Objects.hashCode(mProxyLabel); |
| 232 |
return _hash; |
| 233 |
} |
| 234 |
|
| 235 |
@Override |
| 236 |
@DataClass.Generated.Member |
| 237 |
public void writeToParcel(@NonNull android.os.Parcel dest, int flags) { |
| 238 |
|
| 239 |
|
| 240 |
|
| 241 |
int flg = 0; |
| 242 |
if (mActive) flg |= 0x10; |
| 243 |
if (mPhoneCall) flg |= 0x20; |
| 244 |
if (mAttributionTag != null) flg |= 0x40; |
| 245 |
if (mAttributionLabel != null) flg |= 0x80; |
| 246 |
if (mProxyLabel != null) flg |= 0x100; |
| 247 |
dest.writeInt(flg); |
| 248 |
dest.writeString(mPackageName); |
| 249 |
dest.writeInt(mUid); |
| 250 |
dest.writeLong(mLastAccessTimeMillis); |
| 251 |
dest.writeString(mPermissionGroupName); |
| 252 |
if (mAttributionTag != null) dest.writeCharSequence(mAttributionTag); |
| 253 |
if (mAttributionLabel != null) dest.writeCharSequence(mAttributionLabel); |
| 254 |
if (mProxyLabel != null) dest.writeCharSequence(mProxyLabel); |
| 255 |
} |
| 256 |
|
| 257 |
@Override |
| 258 |
@DataClass.Generated.Member |
| 259 |
public int describeContents() { return 0; } |
| 260 |
|
| 261 |
|
| 262 |
@SuppressWarnings({"unchecked", "RedundantCast"}) |
| 263 |
@DataClass.Generated.Member |
| 264 |
PermissionGroupUsage(@NonNull android.os.Parcel in) { |
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
int flg = in.readInt(); |
| 269 |
boolean active = (flg & 0x10) != 0; |
| 270 |
boolean phoneCall = (flg & 0x20) != 0; |
| 271 |
String packageName = in.readString(); |
| 272 |
int uid = in.readInt(); |
| 273 |
long lastAccessTimeMillis = in.readLong(); |
| 274 |
String permissionGroupName = in.readString(); |
| 275 |
CharSequence attributionTag = (flg & 0x40) == 0 ? null : (CharSequence) in.readCharSequence(); |
| 276 |
CharSequence attributionLabel = (flg & 0x80) == 0 ? null : (CharSequence) in.readCharSequence(); |
| 277 |
CharSequence proxyLabel = (flg & 0x100) == 0 ? null : (CharSequence) in.readCharSequence(); |
| 278 |
|
| 279 |
this.mPackageName = packageName; |
| 280 |
com.android.internal.util.AnnotationValidations.validate( |
| 281 |
NonNull.class, null, mPackageName); |
| 282 |
this.mUid = uid; |
| 283 |
this.mLastAccessTimeMillis = lastAccessTimeMillis; |
| 284 |
this.mPermissionGroupName = permissionGroupName; |
| 285 |
com.android.internal.util.AnnotationValidations.validate( |
| 286 |
NonNull.class, null, mPermissionGroupName); |
| 287 |
this.mActive = active; |
| 288 |
this.mPhoneCall = phoneCall; |
| 289 |
this.mAttributionTag = attributionTag; |
| 290 |
this.mAttributionLabel = attributionLabel; |
| 291 |
this.mProxyLabel = proxyLabel; |
| 292 |
|
| 293 |
|
| 294 |
} |
| 295 |
|
| 296 |
@DataClass.Generated.Member |
| 297 |
public static final @NonNull Parcelable.Creator<PermissionGroupUsage> CREATOR |
| 298 |
= new Parcelable.Creator<PermissionGroupUsage>() { |
| 299 |
@Override |
| 300 |
public PermissionGroupUsage[] newArray(int size) { |
| 301 |
return new PermissionGroupUsage[size]; |
| 302 |
} |
| 303 |
|
| 304 |
@Override |
| 305 |
public PermissionGroupUsage createFromParcel(@NonNull android.os.Parcel in) { |
| 306 |
return new PermissionGroupUsage(in); |
| 307 |
} |
| 308 |
}; |
| 309 |
|
| 310 |
@DataClass.Generated( |
| 311 |
time = 1645067417023L, |
| 312 |
codegenVersion = "1.0.23", |
| 313 |
sourceFile = "frameworks/base/core/java/android/permission/PermissionGroupUsage.java", |
| 314 |
inputSignatures = "private final @android.annotation.NonNull java.lang.String mPackageName\nprivate final int mUid\nprivate final long mLastAccessTimeMillis\nprivate final @android.annotation.NonNull java.lang.String mPermissionGroupName\nprivate final boolean mActive\nprivate final boolean mPhoneCall\nprivate final @android.annotation.Nullable java.lang.CharSequence mAttributionTag\nprivate final @android.annotation.Nullable java.lang.CharSequence mAttributionLabel\nprivate final @android.annotation.Nullable java.lang.CharSequence mProxyLabel\nclass PermissionGroupUsage extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genHiddenConstructor=true, genEqualsHashCode=true, genToString=true)") |
| 315 |
@Deprecated |
| 316 |
private void __metadata() {} |
| 317 |
|
| 318 |
|
| 319 |
|
| 320 |
|
| 321 |
|
| 322 |
} |