diff --git a/res/values/strings.xml b/res/values/strings.xml
index c005ade..94e74a4 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -50,6 +50,7 @@
Tap to check for updates
Notification settings
Modify notification channel settings
+ An update was previously downloaded and is ready to install, so it is not possible to download another update. Please reboot to install the pending update.
Receive security preview releases
Use alternate release channels receiving security patches still under an embargo for source code and details
Don\'t use alternate release channels receiving security patches still under an embargo for source code and details
diff --git a/src/app/seamlessupdate/client/Settings.java b/src/app/seamlessupdate/client/Settings.java
index fb4af67..0e6937f 100644
--- a/src/app/seamlessupdate/client/Settings.java
+++ b/src/app/seamlessupdate/client/Settings.java
@@ -9,6 +9,7 @@
import android.os.UserManager;
import android.util.Log;
import android.view.MenuItem;
+import android.app.AlertDialog;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -104,6 +105,13 @@ public static class SettingsFragment extends PreferenceFragmentCompat
implements SharedPreferences.OnSharedPreferenceChangeListener {
private static String TAG = "SettingsFragment";
+ private void showAlertDialogForPendingReboot(final Context context) {
+ new AlertDialog.Builder(context)
+ .setTitle(android.R.string.dialog_alert_title)
+ .setMessage(R.string.alert_pending_reboot)
+ .show();
+ }
+
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
getPreferenceManager().setStorageDeviceProtected();
@@ -121,6 +129,8 @@ public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
intent.putExtra(Service.INTENT_EXTRA_IS_USER_INITIATED, true);
intent.putExtra(Service.INTENT_EXTRA_NETWORK, network);
context.startForegroundService(intent);
+ } else {
+ showAlertDialogForPendingReboot(context);
}
return true;
});