diff --git a/library/src/main/AndroidManifest.xml b/library/src/main/AndroidManifest.xml index 90b5b3d..dd0b718 100644 --- a/library/src/main/AndroidManifest.xml +++ b/library/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ + package="mejust.frame"> @@ -14,13 +14,13 @@ + android:name="android.support.v4.content.FileProvider" + android:authorities="${applicationId}.versionProvider" + android:exported="false" + android:grantUriPermissions="true"> + android:name="android.support.FILE_PROVIDER_PATHS" + android:resource="@xml/version_upgrade_file_path"/> diff --git a/library/src/main/java/mejust/frame/common/upgrade/NotificationProgress.java b/library/src/main/java/mejust/frame/common/upgrade/NotificationProgress.java index 25b500d..288b444 100644 --- a/library/src/main/java/mejust/frame/common/upgrade/NotificationProgress.java +++ b/library/src/main/java/mejust/frame/common/upgrade/NotificationProgress.java @@ -31,7 +31,7 @@ public NotificationProgress(Context context, ProgressMessageBuilder progressMess String name = "应用更新"; String description = "Prompt to say that you received the offer"; NotificationChannel channel = - new NotificationChannel(CHANNEL, name, NotificationManager.IMPORTANCE_DEFAULT); + new NotificationChannel(CHANNEL, name, NotificationManager.IMPORTANCE_LOW); channel.setDescription(description); NotificationManager notificationManager = (NotificationManager) context.getSystemService(NOTIFICATION_SERVICE); @@ -51,14 +51,16 @@ public NotificationProgress(Context context, ProgressMessageBuilder progressMess @Override public void updateProgress(int progress) { notificationBuilder.setProgress(100, progress, false) - .setContentText(Utils.getApp().getResources().getString(R.string.download_ing_frame)); + .setContentText( + Utils.getApp().getResources().getString(R.string.download_ing_frame)); notificationManager.notify(NOTIFICATION_ID, notificationBuilder.build()); } @Override public void downloadSuccess() { notificationBuilder.setProgress(0, 0, false) - .setContentText(Utils.getApp().getResources().getString(R.string.download_success_frame)); + .setContentText( + Utils.getApp().getResources().getString(R.string.download_success_frame)); notificationManager.notify(NOTIFICATION_ID, notificationBuilder.build()); notificationManager.cancel(NOTIFICATION_ID); } @@ -66,7 +68,8 @@ public void downloadSuccess() { @Override public void downloadFail() { notificationBuilder.setProgress(0, 0, false) - .setContentText(Utils.getApp().getResources().getString(R.string.download_fail_frame)); + .setContentText( + Utils.getApp().getResources().getString(R.string.download_fail_frame)); notificationManager.notify(NOTIFICATION_ID, notificationBuilder.build()); notificationManager.cancel(NOTIFICATION_ID); }