Skip to content
Snippets Groups Projects
Commit 9af4aea0 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

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
parent 6c8ffbca
No related branches found
No related tags found
No related merge requests found
......@@ -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",
],
},
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment