Selaa lähdekoodia

Fix empty notification

Signed-off-by: Mario Danic <mario@lovelyhq.com>
Mario Danic 7 vuotta sitten
vanhempi
commit
913e8659a9

+ 1 - 0
src/main/java/com/owncloud/android/files/services/FileDownloader.java

@@ -129,6 +129,7 @@ public class FileDownloader extends Service
 
         mNotification = new NotificationCompat.Builder(this).setContentTitle(getApplicationContext().
                 getResources().getString(R.string.app_name))
+                .setContentText(getApplicationContext().getResources().getString(R.string.foreground_service_download))
                 .setSmallIcon(R.drawable.notification_icon)
                 .setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.notification_icon))
                 .setColor(ThemeUtils.primaryColor())

+ 1 - 0
src/main/java/com/owncloud/android/files/services/FileUploader.java

@@ -420,6 +420,7 @@ public class FileUploader extends Service
 
         mNotification = new NotificationCompat.Builder(this).setContentTitle(getApplicationContext().
                 getResources().getString(R.string.app_name))
+                .setContentText(getApplicationContext().getResources().getString(R.string.foreground_service_upload))
                 .setSmallIcon(R.drawable.notification_icon)
                 .setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.notification_icon))
                 .setColor(ThemeUtils.primaryColor())

+ 3 - 0
src/main/res/values/strings.xml

@@ -695,4 +695,7 @@
     <string name="whats_new_fingerprint_content">Use your fingerprint to unlock the app</string>
     <string name="fallback_weblogin_back">BACK</string>
     <string name="fallback_weblogin_text">Go back to old login method</string>
+
+    <string name="foreground_service_upload">Uploading files...</string>
+    <string name="foreground_service_download">Downloading files...</string>
 </resources>