Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8de9e549 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Merge branch 'epic234-a16-qpr2' into 'main'

Guard against missing SystemUpdateManager instance

See merge request !208
parents 50a0e7ad 9d18b406
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -596,6 +596,10 @@ public class Utils {

    public static void updateSystemUpdaterService(Context context, int status, String version) {
        final SystemUpdateManager updateManager = context.getSystemService(SystemUpdateManager.class);
        if (updateManager == null) {
            Log.w(TAG, "SystemUpdateManager not available on this device");
            return;
        }

        final Bundle oldInfo = updateManager.retrieveSystemUpdateInfo();
        final int oldStatus = oldInfo.getInt(SystemUpdateManager.KEY_STATUS);