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

Commit 1494f867 authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Fixing issue with broadcast being sent before boot completed." into lmp-preview-dev

parents 0ead890d 5abdceb6
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -61,6 +61,11 @@ public class Recents extends SystemUI implements RecentsComponent {


    @Override
    @Override
    protected void onBootCompleted() {
    protected void onBootCompleted() {
        if (mUseAlternateRecents) {
            if (mAlternateRecents != null) {
                mAlternateRecents.onBootCompleted();
            }
        }
        mBootCompleted = true;
        mBootCompleted = true;
    }
    }


+7 −2
Original line number Original line Diff line number Diff line
@@ -153,6 +153,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta
    Messenger mService = null;
    Messenger mService = null;
    Messenger mMessenger;
    Messenger mMessenger;
    RecentsMessageHandler mHandler;
    RecentsMessageHandler mHandler;
    boolean mBootCompleted = false;
    boolean mServiceIsBound = false;
    boolean mServiceIsBound = false;
    boolean mToggleRecentsUponServiceBound;
    boolean mToggleRecentsUponServiceBound;
    RecentsServiceConnection mConnection = new RecentsServiceConnection();
    RecentsServiceConnection mConnection = new RecentsServiceConnection();
@@ -182,6 +183,10 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta
        bindToRecentsService(false);
        bindToRecentsService(false);
    }
    }


    public void onBootCompleted() {
        mBootCompleted = true;
    }

    /** Shows the recents */
    /** Shows the recents */
    public void onShowRecents(boolean triggeredFromAltTab, View statusBarView) {
    public void onShowRecents(boolean triggeredFromAltTab, View statusBarView) {
        if (Console.Enabled) {
        if (Console.Enabled) {
@@ -208,7 +213,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta
        if (Console.Enabled) {
        if (Console.Enabled) {
            Console.log(Constants.Log.App.RecentsComponent, "[RecentsComponent|hideRecents]");
            Console.log(Constants.Log.App.RecentsComponent, "[RecentsComponent|hideRecents]");
        }
        }
        if (mServiceIsBound) {
        if (mServiceIsBound && mBootCompleted) {
            // Notify recents to close it
            // Notify recents to close it
            try {
            try {
                Bundle data = new Bundle();
                Bundle data = new Bundle();
@@ -278,7 +283,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta


    /** Updates each of the task animation rects. */
    /** Updates each of the task animation rects. */
    void updateAnimationRects() {
    void updateAnimationRects() {
        if (mServiceIsBound) {
        if (mServiceIsBound && mBootCompleted) {
            Resources res = mContext.getResources();
            Resources res = mContext.getResources();
            int statusBarHeight = res.getDimensionPixelSize(
            int statusBarHeight = res.getDimensionPixelSize(
                    com.android.internal.R.dimen.status_bar_height);
                    com.android.internal.R.dimen.status_bar_height);