Merge "Fix NPE when leaving kids mode" into tm-qpr-dev
This commit is contained in:
@@ -316,12 +316,14 @@ public class KidsModeTaskOrganizer extends ShellTaskOrganizer {
|
|||||||
true /* onTop */);
|
true /* onTop */);
|
||||||
wct.reorder(rootToken, mEnabled /* onTop */);
|
wct.reorder(rootToken, mEnabled /* onTop */);
|
||||||
mSyncQueue.queue(wct);
|
mSyncQueue.queue(wct);
|
||||||
|
if (mEnabled) {
|
||||||
final SurfaceControl rootLeash = mLaunchRootLeash;
|
final SurfaceControl rootLeash = mLaunchRootLeash;
|
||||||
mSyncQueue.runInSync(t -> {
|
mSyncQueue.runInSync(t -> {
|
||||||
t.setPosition(rootLeash, taskBounds.left, taskBounds.top);
|
t.setPosition(rootLeash, taskBounds.left, taskBounds.top);
|
||||||
t.setWindowCrop(rootLeash, taskBounds.width(), taskBounds.height());
|
t.setWindowCrop(rootLeash, taskBounds.width(), taskBounds.height());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private Rect calculateBounds() {
|
private Rect calculateBounds() {
|
||||||
final Rect bounds = new Rect(0, 0, mDisplayWidth, mDisplayHeight);
|
final Rect bounds = new Rect(0, 0, mDisplayWidth, mDisplayHeight);
|
||||||
|
|||||||
Reference in New Issue
Block a user