Status Update
Comments
al...@google.com <al...@google.com> #2
Not technically blocking, but with
al...@google.com <al...@google.com> #3
Lint failures:
> Task :browser:browser:lintDebug FAILED
/media/workspace/android/androidx-platform-dev/frameworks/support/browser/browser/src/main/java/androidx/browser/trusted/TrustedWebActivityService.java:279: Error: When targeting Android 13 or higher, posting a permission requires holding the POST_NOTIFICATIONS permission [NotificationPermission]
mNotificationManager.notify(platformTag, platformId, notification);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Explanation for issues of type "NotificationPermission":
When targeting Android 13 and higher, posting permissions requires holding
the runtime permission android.permission.POST_NOTIFICATIONS.
> Task :core:core:lintDebug FAILED
/media/workspace/android/androidx-platform-dev/frameworks/support/core/core/src/main/java/androidx/core/app/NotificationManagerCompat.java:223: Error: When targeting Android 13 or higher, posting a permission requires holding the POST_NOTIFICATIONS permission [NotificationPermission]
mNotificationManager.notify(tag, id, notification);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Explanation for issues of type "NotificationPermission":
When targeting Android 13 and higher, posting permissions requires holding
the runtime permission android.permission.POST_NOTIFICATIONS.
> Task :wear:wear-ongoing:lintDebug FAILED
/media/workspace/android/androidx-platform-dev/frameworks/support/wear/wear-ongoing/src/main/java/androidx/wear/ongoing/OngoingActivity.java:494: Error: When targeting Android 13 or higher, posting a permission requires holding the POST_NOTIFICATIONS permission [NotificationPermission]
manager.notify(mNotificationId, notification);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/media/workspace/android/androidx-platform-dev/frameworks/support/wear/wear-ongoing/src/main/java/androidx/wear/ongoing/OngoingActivity.java:496: Error: When targeting Android 13 or higher, posting a permission requires holding the POST_NOTIFICATIONS permission [NotificationPermission]
manager.notify(mTag, mNotificationId, notification);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Explanation for issues of type "NotificationPermission":
When targeting Android 13 and higher, posting permissions requires holding
the runtime permission android.permission.POST_NOTIFICATIONS.
> Task :work:work-runtime:lintDebug FAILED
/media/workspace/android/androidx-platform-dev/frameworks/support/work/work-runtime/src/main/java/androidx/work/impl/foreground/SystemForegroundService.java:141: Error: When targeting Android 13 or higher, posting a permission requires holding the POST_NOTIFICATIONS permission [NotificationPermission]
mNotificationManager.notify(notificationId, notification);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Explanation for issues of type "NotificationPermission":
When targeting Android 13 and higher, posting permissions requires holding
the runtime permission android.permission.POST_NOTIFICATIONS.
> Task :navigation:navigation-integration-tests:testapp:lintDebug FAILED
/media/workspace/android/androidx-platform-dev/frameworks/support/navigation/integration-tests/testapp/src/main/java/androidx/navigation/testapp/AndroidFragment.kt:79: Error: When targeting Android 13 or higher, posting a permission requires holding the POST_NOTIFICATIONS permission [NotificationPermission]
notificationManager.notify(0, builder.build())
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Explanation for issues of type "NotificationPermission":
When targeting Android 13 and higher, posting permissions requires holding
the runtime permission android.permission.POST_NOTIFICATIONS.
> Task :work:integration-tests:testapp:lintDebug FAILED
/media/workspace/android/androidx-platform-dev/frameworks/support/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/ForegroundWorker.kt:52: Error: When targeting Android 13 or higher, posting a permission requires holding the POST_NOTIFICATIONS permission [NotificationPermission]
notificationManager.notify(
^
Explanation for issues of type "NotificationPermission":
When targeting Android 13 and higher, posting permissions requires holding
the runtime permission android.permission.POST_NOTIFICATIONS.
> Task :car:app:app-samples:navigation-common:lintDebug FAILED
/media/workspace/android/androidx-platform-dev/frameworks/support/car/app/app-samples/navigation/common/src/main/java/androidx/car/app/sample/navigation/common/nav/NavigationService.java:254: Error: When targeting Android 13 or higher, posting a permission requires holding the POST_NOTIFICATIONS permission [NotificationPermission]
mNotificationManager.notify(
^
/media/workspace/android/androidx-platform-dev/frameworks/support/car/app/app-samples/navigation/common/src/main/java/androidx/car/app/sample/navigation/common/nav/NavigationService.java:357: Error: When targeting Android 13 or higher, posting a permission requires holding the POST_NOTIFICATIONS permission [NotificationPermission]
mNotificationManager.notify(
^
Explanation for issues of type "NotificationPermission":
When targeting Android 13 and higher, posting permissions requires holding
the runtime permission android.permission.POST_NOTIFICATIONS.
> Task :compose:ui:ui-text:ui-text-benchmark:lintDebug FAILED
/media/workspace/android/androidx-platform-dev/frameworks/support/compose/ui/ui-text/benchmark/src/main/java/androidx/compose/ui/text/benchmark/TextBenchmarkTestRule.kt:79: Error: Reflective access to freeTextLayoutCaches will throw an exception when targeting API 33 and above [SoonBlockedPrivateApi]
val freeCaches = Canvas::class.java.getDeclaredMethod("freeTextLayoutCaches")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Explanation for issues of type "SoonBlockedPrivateApi":
Usage of restricted non-SDK interface will throw an exception at runtime.
Accessing non-SDK methods or fields through reflection has a high
likelihood to break your app between versions, and is being restricted to
facilitate future app compatibility.
https://developer.android.com/preview/restrictions-non-sdk-interfaces
We also get lint failures for every library that depends on leakcanary
or robolectric
since those wrap the platform notify()
API. Those can be safely baselined.
al...@google.com <al...@google.com> #4
The big one is that every usage of notify
in a library needs to be wrapped with either a permission check or annotated with @RequiresPermission
. My current plan is to add the annotation. Hopefully these usages are close enough to public API surfaces that it works out cleanly.
The usages in integration tests will probably cause failures, but I'm not going to fix those myself. The SoonBlockedPrivateApi
will need to be fixed by the benchmark owner. Again, not gonna fix that.
al...@google.com <al...@google.com>
na...@google.com <na...@google.com> #5
This bug was linked in a change in the following release(s):
androidx.car.app:app-testing:1.3.0-beta01
Description
We need targetSdk to be 33 before we move forward with upstreaming, otherwise we are releasing potentially broken code in betas.