diff --git a/app/src/main/java/com/aurora/store/fragment/details/ActionButton.java b/app/src/main/java/com/aurora/store/fragment/details/ActionButton.java index 7b7ae0bba..ac7fb373f 100644 --- a/app/src/main/java/com/aurora/store/fragment/details/ActionButton.java +++ b/app/src/main/java/com/aurora/store/fragment/details/ActionButton.java @@ -187,6 +187,7 @@ public class ActionButton extends AbstractHelper { return v -> { btnPositive.setText(R.string.details_installing); btnPositive.setEnabled(false); + notification.notifyInstalling(); AuroraApplication.getInstaller().install(app); }; } @@ -395,6 +396,7 @@ public class ActionButton extends AbstractHelper { btnPositive.setText(R.string.details_installing); btnPositive.setEnabled(false); }); + notification.notifyInstalling(); //Call the installer AuroraApplication.getInstaller().install(app); } diff --git a/app/src/main/java/com/aurora/store/notification/GeneralNotification.java b/app/src/main/java/com/aurora/store/notification/GeneralNotification.java index b17b5ef25..ec71b9fba 100644 --- a/app/src/main/java/com/aurora/store/notification/GeneralNotification.java +++ b/app/src/main/java/com/aurora/store/notification/GeneralNotification.java @@ -107,6 +107,12 @@ public class GeneralNotification extends NotificationBase { show(); } + public void notifyInstalling() { + builder.mActions.clear(); + builder.setContentText(context.getString(R.string.installer_status_ongoing)); + show(); + } + public void notifyExtractionProgress() { builder.mActions.clear(); builder.setContentText(context.getString(R.string.download_extraction)); diff --git a/app/src/main/java/com/aurora/store/task/LiveUpdate.java b/app/src/main/java/com/aurora/store/task/LiveUpdate.java index ea46e350d..5bb62a20e 100644 --- a/app/src/main/java/com/aurora/store/task/LiveUpdate.java +++ b/app/src/main/java/com/aurora/store/task/LiveUpdate.java @@ -106,8 +106,10 @@ public class LiveUpdate extends BaseTask { public void onCompleted(int groupId, @NotNull Download download, @NotNull FetchGroup fetchGroup) { if (groupId == hashCode && fetchGroup.getGroupDownloadProgress() == 100) { notification.notifyCompleted(); - if (Util.shouldAutoInstallApk(context)) + if (Util.shouldAutoInstallApk(context)) { + notification.notifyInstalling(); AuroraApplication.getInstaller().install(app); + } if (fetchListener != null) { fetch.removeListener(fetchListener); fetchListener = null; diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6db888c6d..404c941a9 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -195,6 +195,7 @@ Flag as inappropriate + Installing Installation failed Installation cancelled Installation was blocked