Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/beaven' into dev
Browse files Browse the repository at this point in the history
# Conflicts:
#	library/src/main/AndroidManifest.xml
  • Loading branch information
beaven11 committed Jun 21, 2018
2 parents 59a7970 + 0fd4bf6 commit e8af2b2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
14 changes: 7 additions & 7 deletions library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="mejust.frame">
package="mejust.frame">

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
Expand All @@ -14,13 +14,13 @@

</service>
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="${applicationId}.versionProvider"
android:exported="false"
android:grantUriPermissions="true">
android:name="android.support.v4.content.FileProvider"
android:authorities="${applicationId}.versionProvider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/version_upgrade_file_path" />
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/version_upgrade_file_path"/>
</provider>
</application>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -51,22 +51,25 @@ 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);
}

@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);
}
Expand Down

0 comments on commit e8af2b2

Please sign in to comment.