[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Improve properness of launching SavedPageSyncService on API 26.

2017-10-26 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386665 )

Change subject: Improve properness of launching SavedPageSyncService on API 26.
..

Improve properness of launching SavedPageSyncService on API 26.

Android Oreo (API 26) is much more harsh on apps that run in the
background, and requires us to enqueue background services in a more
delicate way.  For example, if an app is in the background, and it tries
to start a Service, it will actually crash.

This patch incorporates the new JobIntentService introduced in the Support
library v26.0, which correctly launches the service for API 26 and lower
APIs.

One of the side-effects of this patch is that we'll need to include the
WAKE_LOCK permission in the app from now on.

Change-Id: I216b1243cd6c74c64788cb5e8d45aa43e081b0b2
---
M app/src/main/AndroidManifest.xml
M app/src/main/java/org/wikipedia/readinglist/sync/ReadingListSynchronizer.java
M app/src/main/java/org/wikipedia/savedpages/SavedPageSyncService.java
3 files changed, 19 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/65/386665/1

diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 14b56aa..694c38b 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -39,6 +39,9 @@
 
 
 
+
+
+
 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Improve properness of launching SavedPageSyncService on API 26.

2017-10-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/386665 )

Change subject: Improve properness of launching SavedPageSyncService on API 26.
..


Improve properness of launching SavedPageSyncService on API 26.

Android Oreo (API 26) is much more harsh on apps that run in the
background, and requires us to enqueue background services in a more
delicate way.  For example, if an app is in the background, and it tries
to start a Service, it will actually crash.

This patch incorporates the new JobIntentService introduced in the Support
library v26.0, which correctly launches the service for API 26 and lower
APIs.

One of the side-effects of this patch is that we'll need to include the
WAKE_LOCK permission in the app from now on.

Change-Id: I216b1243cd6c74c64788cb5e8d45aa43e081b0b2
---
M app/src/main/AndroidManifest.xml
M app/src/main/java/org/wikipedia/readinglist/sync/ReadingListSynchronizer.java
M app/src/main/java/org/wikipedia/savedpages/SavedPageSyncService.java
3 files changed, 19 insertions(+), 7 deletions(-)

Approvals:
  jenkins-bot: Verified
  Cooltey: Looks good to me, approved



diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 14b56aa..694c38b 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -39,6 +39,9 @@
 
 
 
+
+
+