Upgrade AndroidFrameworkUid to be fatal error.
We've fixed the one remaining example of code that accidentally crosses UID with userId, so this change upgrades the check to become a fatal build error to prevent future bugs. Bug: 155703208 Test: atest error_prone_android_framework_test Change-Id: I3bc46f8039a88b5f3d5f89dc9b5fda785d5c654f
This commit is contained in:
parent
6c8ffbca51
commit
9af4aea0c3
@ -601,6 +601,7 @@ java_library {
|
||||
errorprone: {
|
||||
javacflags: [
|
||||
"-Xep:AndroidFrameworkCompatChange:ERROR",
|
||||
"-Xep:AndroidFrameworkUid:ERROR",
|
||||
],
|
||||
},
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ public final class SelectableTargetInfo implements ChooserTargetInfo {
|
||||
|
||||
// Now fetch app icon and raster with no badging even in work profile
|
||||
Bitmap appIcon = mSelectableTargetInfoCommunicator.makePresentationGetter(info)
|
||||
.getIconBitmap(UserHandle.getUserHandleForUid(UserHandle.myUserId()));
|
||||
.getIconBitmap(android.os.Process.myUserHandle());
|
||||
|
||||
// Raster target drawable with appIcon as a badge
|
||||
SimpleIconFactory sif = SimpleIconFactory.obtain(mContext);
|
||||
|
@ -6,6 +6,7 @@ java_defaults {
|
||||
errorprone: {
|
||||
javacflags: [
|
||||
"-Xep:AndroidFrameworkCompatChange:ERROR",
|
||||
"-Xep:AndroidFrameworkUid:ERROR",
|
||||
],
|
||||
},
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user