File tree Expand file tree Collapse file tree 3 files changed +17
-4
lines changed
java/org/wordpress/android/ui Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 2828 <uses-permission android : name =" android.permission.READ_MEDIA_IMAGES" />
2929 <uses-permission android : name =" android.permission.READ_MEDIA_VIDEO" />
3030 <uses-permission android : name =" android.permission.READ_MEDIA_AUDIO" />
31+ <uses-permission android : name =" android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
3132
3233 <!-- GCM all build types configuration -->
3334 <uses-permission android : name =" com.google.android.c2dm.permission.RECEIVE" />
828829 <!-- Services -->
829830 <service
830831 android : name =" .ui.uploads.UploadService"
831- android : label =" Upload Service" />
832+ android : label =" Upload Service"
833+ android : foregroundServiceType =" dataSync" />
832834 <service
833835 android : name =" .ui.media.services.MediaDeleteService"
834836 android : label =" Media Delete Service"
835837 android : exported =" false"
838+ android : foregroundServiceType =" dataSync"
836839 />
837840
838841 <service
10531056
10541057 <service
10551058 android : name =" .push.GCMMessageService"
1056- android : exported =" false" >
1059+ android : exported =" false" >
10571060 <intent-filter >
10581061 <action android : name =" com.google.firebase.MESSAGING_EVENT" />
10591062 </intent-filter >
Original file line number Diff line number Diff line change 99import android .content .ClipData ;
1010import android .content .ClipboardManager ;
1111import android .content .Context ;
12+ import android .content .ContextWrapper ;
1213import android .content .Intent ;
1314import android .content .IntentFilter ;
1415import android .database .Cursor ;
1516import android .graphics .Bitmap ;
1617import android .graphics .drawable .Drawable ;
1718import android .net .Uri ;
1819import android .os .Build ;
20+ import android .os .Build .VERSION_CODES ;
1921import android .os .Bundle ;
2022import android .os .Environment ;
2123import android .os .Handler ;
@@ -467,7 +469,15 @@ protected void onSaveInstanceState(@NonNull Bundle outState) {
467469 @ SuppressLint ("UnspecifiedRegisterReceiverFlag" )
468470 public void onStart () {
469471 super .onStart ();
470- registerReceiver (mDownloadReceiver , new IntentFilter (DownloadManager .ACTION_DOWNLOAD_COMPLETE ));
472+ if (Build .VERSION .SDK_INT >= VERSION_CODES .UPSIDE_DOWN_CAKE ) {
473+ registerReceiver (
474+ mDownloadReceiver ,
475+ new IntentFilter (DownloadManager .ACTION_DOWNLOAD_COMPLETE ),
476+ ContextWrapper .RECEIVER_NOT_EXPORTED
477+ );
478+ } else {
479+ registerReceiver (mDownloadReceiver , new IntentFilter (DownloadManager .ACTION_DOWNLOAD_COMPLETE ));
480+ }
471481 mDispatcher .register (this );
472482
473483 // we only register with EventBus the first time - necessary since we don't unregister in onStop()
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ class DeviceListBuilder(
6969 // This item sets the threshold for the visible items in all the list
7070 val lastShownTimestamp = results.fold(0L ) { timestamp, (_, result) ->
7171 val nextTimestamp = result?.nextTimestamp
72- if (nextTimestamp != null && nextTimestamp > timestamp) {
72+ if (result?.items?.isNotEmpty() == true && nextTimestamp != null && nextTimestamp > timestamp) {
7373 nextTimestamp
7474 } else {
7575 timestamp
You can’t perform that action at this time.
0 commit comments