mirror of
https://github.com/whyorean/AuroraStore.git
synced 2026-06-19 04:58:47 -04:00
Notification : Show ongoing notifications
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -195,6 +195,7 @@
|
||||
|
||||
<string name="flagging_title">Flag as inappropriate</string>
|
||||
|
||||
<string name="installer_status_ongoing">Installing</string>
|
||||
<string name="installer_status_failure">Installation failed</string>
|
||||
<string name="installer_status_failure_aborted">Installation cancelled</string>
|
||||
<string name="installer_status_failure_blocked">Installation was blocked</string>
|
||||
|
||||
Reference in New Issue
Block a user