Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -601,6 +601,7 @@ java_library {
    errorprone: {
        javacflags: [
            "-Xep:AndroidFrameworkCompatChange:ERROR",
            "-Xep:AndroidFrameworkUid:ERROR",
        ],
    },
}
+1 −1
Original line number Diff line number Diff line
@@ -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);
+1 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ java_defaults {
    errorprone: {
        javacflags: [
            "-Xep:AndroidFrameworkCompatChange:ERROR",
            "-Xep:AndroidFrameworkUid:ERROR",
        ],
    },
}