Fix bug where hotseat disappears
Fix: 336096469
Bug: 339700174
Flag: NONE
Test: n/a
Change-Id: Ie567c08445d7743281f501c782a8fd51a75ad9bc
(cherry picked from commit cf10603ed3)
This commit is contained in:
@@ -29,6 +29,7 @@ import android.animation.Animator;
|
||||
import android.animation.AnimatorSet;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.content.ComponentName;
|
||||
import android.util.Log;
|
||||
import android.view.HapticFeedbackConstants;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -80,6 +81,7 @@ public class HotseatPredictionController implements DragController.DragListener,
|
||||
SystemShortcut.Factory<QuickstepLauncher>, DeviceProfile.OnDeviceProfileChangeListener,
|
||||
DragSource, ViewGroup.OnHierarchyChangeListener {
|
||||
|
||||
private static final String TAG = "HotseatPredictionController";
|
||||
private static final int FLAG_UPDATE_PAUSED = 1 << 0;
|
||||
private static final int FLAG_DRAG_IN_PROGRESS = 1 << 1;
|
||||
private static final int FLAG_FILL_IN_PROGRESS = 1 << 2;
|
||||
@@ -291,6 +293,16 @@ public class HotseatPredictionController implements DragController.DragListener,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that if the flag FLAG_UPDATE_PAUSED is active we set it to false.
|
||||
*/
|
||||
public void verifyUIUpdateNotPaused() {
|
||||
if ((mPauseFlags & FLAG_UPDATE_PAUSED) != 0) {
|
||||
setPauseUIUpdate(false);
|
||||
Log.e(TAG, "FLAG_UPDATE_PAUSED should not be set to true (see b/339700174)");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets or updates the predicted items
|
||||
*/
|
||||
|
||||
@@ -389,6 +389,12 @@ public class QuickstepLauncher extends Launcher {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startBinding() {
|
||||
super.startBinding();
|
||||
mHotseatPredictionController.verifyUIUpdateNotPaused();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityFlagsChanged(int changeBits) {
|
||||
if ((changeBits & ACTIVITY_STATE_STARTED) != 0) {
|
||||
|
||||
Reference in New Issue
Block a user