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

Commit e87a8a9e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Creating new user correctly connects to the system OverviewProxy"

parents b9774cbe 1b1d346b
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import android.view.SurfaceControl;
import com.android.systemui.OverviewProxyService.OverviewProxyListener;
import com.android.systemui.recents.events.EventBus;
import com.android.systemui.recents.events.activity.DockedFirstAnimationFrameEvent;
import com.android.systemui.recents.misc.SystemServicesProxy;
import com.android.systemui.shared.recents.IOverviewProxy;
import com.android.systemui.shared.recents.ISystemUiProxy;
import com.android.systemui.shared.system.GraphicBufferCompat;
@@ -201,9 +202,11 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
        mConnectionBackoffAttempts = 0;
        mLauncherComponentName = ComponentName
                .unflattenFromString(context.getString(R.string.config_overviewServiceComponent));
        mDeviceProvisionedController.addCallback(mDeviceProvisionedCallback);

        // Listen for the package update changes.
        if (SystemServicesProxy.getInstance(context)
                .isSystemUser(mDeviceProvisionedController.getCurrentUser())) {
            mDeviceProvisionedController.addCallback(mDeviceProvisionedCallback);
            IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED);
            filter.addDataScheme("package");
            filter.addDataSchemeSpecificPart(mLauncherComponentName.getPackageName(),
@@ -211,6 +214,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
            filter.addAction(Intent.ACTION_PACKAGE_CHANGED);
            mContext.registerReceiver(mLauncherAddedReceiver, filter);
        }
    }

    public void startConnectionToCurrentUser() {
        if (mHandler.getLooper() != Looper.myLooper()) {