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

Commit f41c28a1 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "QuickBoot: add execption restore mechanism"

parents f8d1dfac 8466e76f
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ import android.app.IActivityManager;
import android.app.StatusBarManager;
import android.app.admin.DevicePolicyManager;
import android.animation.ValueAnimator;
import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -87,6 +88,7 @@ import android.os.StrictMode;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.Trace;
import android.os.UserHandle;
import android.os.WorkSource;
import android.provider.Settings;
import android.util.DisplayMetrics;
@@ -5380,12 +5382,25 @@ public class WindowManagerService extends IWindowManager.Stub
            mInputMonitor.setEventDispatchingLw(mEventDispatchingEnabled);
        }

        // start QuickBoot to check if need restore from exception
        if (SystemProperties.getBoolean("persist.sys.quickboot_ongoing", false))
            checkQuickBootException();

        mPolicy.enableScreenAfterBoot();

        // Make sure the last requested orientation has been applied.
        updateRotationUnchecked(false, false);
    }

    private void checkQuickBootException() {
        Intent intent = new Intent("qualcomm.intent.action.QUICKBOOT");
        intent.putExtra("mode", 2);
        try {
            mContext.startActivityAsUser(intent,UserHandle.CURRENT);
        } catch (ActivityNotFoundException e) {
        }
    }

    public void showBootMessage(final CharSequence msg, final boolean always) {
        boolean first = false;
        synchronized(mWindowMap) {