Move the Android API level checks to runtime
ClosedPublic

Authored by vkrause on Jan 14 2019, 9:08 PM.

Details

Summary

This doesn't make notifications on API level < 23 work yet, but it allows
us to build against lower API levels and have something that still works
when run on higher API levels.

Tested on API level 21 and 27.

This should also enable building the Android support on the CI.

Diff Detail

Repository
R289 KNotifications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
vkrause created this revision.Jan 14 2019, 9:08 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptJan 14 2019, 9:08 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
vkrause requested review of this revision.Jan 14 2019, 9:08 PM
apol accepted this revision.Jan 15 2019, 12:49 AM
apol added a subscriber: apol.

Maybe we could print something for adb logcat that says that notifications won't be working?

This revision is now accepted and ready to land.Jan 15 2019, 12:49 AM
In D18253#393283, @apol wrote:

Maybe we could print something for adb logcat that says that notifications won't be working?

Android itself is already doing that. And support for older API levels is hopefully not too far away either :)

This revision was automatically updated to reflect the committed changes.