Merge "Fixing issue with screen pinning screen not showing for secondary users." into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
9a75ed7ab5
@@ -30,6 +30,7 @@ import com.android.systemui.recents.events.EventBus;
|
|||||||
import com.android.systemui.recents.events.activity.DockedTopTaskEvent;
|
import com.android.systemui.recents.events.activity.DockedTopTaskEvent;
|
||||||
import com.android.systemui.recents.events.activity.RecentsActivityStartingEvent;
|
import com.android.systemui.recents.events.activity.RecentsActivityStartingEvent;
|
||||||
import com.android.systemui.recents.events.ui.RecentsDrawnEvent;
|
import com.android.systemui.recents.events.ui.RecentsDrawnEvent;
|
||||||
|
import com.android.systemui.recents.misc.ForegroundThread;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An implementation of the system user's Recents interface to be called remotely by secondary
|
* An implementation of the system user's Recents interface to be called remotely by secondary
|
||||||
@@ -78,12 +79,16 @@ public class RecentsSystemUser extends IRecentsSystemUserCallbacks.Stub {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateRecentsVisibility(boolean visible) {
|
public void updateRecentsVisibility(boolean visible) {
|
||||||
mImpl.onVisibilityChanged(mContext, visible);
|
ForegroundThread.getHandler().post(() -> {
|
||||||
|
mImpl.onVisibilityChanged(mContext, visible);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void startScreenPinning(int taskId) {
|
public void startScreenPinning(int taskId) {
|
||||||
mImpl.onStartScreenPinning(mContext, taskId);
|
ForegroundThread.getHandler().post(() -> {
|
||||||
|
mImpl.onStartScreenPinning(mContext, taskId);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -72,7 +72,12 @@ public class ScreenPinningRequest implements View.OnClickListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void showPrompt(int taskId, boolean allowCancel) {
|
public void showPrompt(int taskId, boolean allowCancel) {
|
||||||
clearPrompt();
|
try {
|
||||||
|
clearPrompt();
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
// If the call to show the prompt fails due to the request window not already being
|
||||||
|
// attached, then just ignore the error since we will be re-adding it below.
|
||||||
|
}
|
||||||
|
|
||||||
this.taskId = taskId;
|
this.taskId = taskId;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user