Skip to content

Update to targetSdkVersion 28#10142

Merged
planarvoid merged 5 commits intodevelopfrom
issue/update-to-targetsdk-28
Jul 4, 2019
Merged

Update to targetSdkVersion 28#10142
planarvoid merged 5 commits intodevelopfrom
issue/update-to-targetsdk-28

Conversation

@maxme
Copy link
Copy Markdown
Contributor

@maxme maxme commented Jul 3, 2019

Migration documentation

I checked the migration and the what changed in Android 9 documentation. A few things that must done in wpandroid:

To continue using the Apache HTTP client, apps that target Android 9 and above can add the following to their AndroidManifest.xml:

Done in ad8be63

Apps wanting to use foreground services must now request the FOREGROUND_SERVICE permission first. This is a normal permission, so the system automatically grants it to the requesting app. Starting a foreground service without the permission throws a SecurityException.

Done in 72fb4f5

Got a crash in the Login screen due to an outdated Lottie version

Stumbled on an error from Lottie.

2019-07-03 12:21:13.032 29195-29195/org.wordpress.android.beta E/AndroidRuntime: FATAL EXCEPTION: main
    Process: org.wordpress.android.beta, PID: 29195
    java.lang.IllegalArgumentException: Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed
        at android.graphics.Canvas.checkValidClipOp(Canvas.java:843)
        at android.graphics.Canvas.clipRect(Canvas.java:890)
        at com.airbnb.lottie.CompositionLayer.drawLayer(CompositionLayer.java:79)
        at com.airbnb.lottie.BaseLayer.draw(BaseLayer.java:162)
        at com.airbnb.lottie.LottieDrawable.draw(LottieDrawable.java:283)

I updated the dependency to the latest version in 57f8f4d.

Lint error: Using left/right instead of start/end attributes

I had to bump minimum sdk version for the login flow from 16 to 17 (API <= 16 requires left/right attributes and start/end, which is incompatible with the changes in API 28).

Done in 5a61c0a764

Bumped to latest FluxC version in 56e200c

Note: only one line changed in FluxC between current and updated versions

# in WordPress-FluxC-Android/
$ git diff f07192bb7b8bf9aa7c5f8717988d9f17590a0db3 2c38f70f8a45ec12f12ebac1de1c646ea9e49b7f | cat
diff --git a/fluxc/build.gradle b/fluxc/build.gradle
index 447fc256f..0f797000d 100644
--- a/fluxc/build.gradle
+++ b/fluxc/build.gradle
@@ -28,7 +28,7 @@ android {
         versionCode 4
         versionName "0.1"
         minSdkVersion 15
-        targetSdkVersion 26
+        targetSdkVersion 28
     }
     buildTypes {
         release {

Tests

  • Tested on a device with API 28 and an emulator on API 21.
  • Tested Stetho was working as expected.

@maxme maxme added the Core label Jul 3, 2019
@maxme maxme added this to the 12.9 milestone Jul 3, 2019
@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Jul 3, 2019

Messages
📖

This PR contains changes in the subtree libs/login/. It is your responsibility to ensure these changes are merged back into WordPress-Login-Flow-Android. Follow these handy steps!
WARNING: Make sure your git version is 2.19.x or lower - there is currently a bug in later versions that will corrupt the subtree history!

  1. cd WordPress-Android
  2. git checkout issue/update-to-targetsdk-28
  3. git subtree push --prefix=libs/login/ https://github.com/wordpress-mobile/WordPress-Login-Flow-Android.git merge/WordPress-Android/10142
  4. Browse to https://github.com/wordpress-mobile/WordPress-Login-Flow-Android/pull/new/merge/WordPress-Android/10142 and open a new PR.

Generated by 🚫 dangerJS

@maxme maxme force-pushed the issue/update-to-targetsdk-28 branch from 5a61c0a to 36a5b41 Compare July 3, 2019 12:51
@maxme maxme requested a review from planarvoid July 4, 2019 07:33
@maxme maxme marked this pull request as ready for review July 4, 2019 07:33
Copy link
Copy Markdown
Contributor

@planarvoid planarvoid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good, works as expected 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants