mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-18 18:28:20 +00:00
Fix taskbar instrumentation crash
This was crashing when there were no views in the taskbar. Now, we're using getDragLayer, that will be always there. Bug: 245690391 Test: TaskbarExpandCollapse Change-Id: I4475adb0c6c425fca54af02bb071ed3e5f42d927
This commit is contained in:
@@ -49,8 +49,6 @@ import com.android.quickstep.AnimatedFloat;
|
||||
import com.android.quickstep.SystemUiProxy;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.util.Arrays;
|
||||
import java.util.Optional;
|
||||
import java.util.StringJoiner;
|
||||
import java.util.function.IntPredicate;
|
||||
|
||||
@@ -546,13 +544,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
|
||||
}
|
||||
|
||||
private void addJankMonitorListener(AnimatorSet animator, boolean expanding) {
|
||||
Optional<View> optionalView =
|
||||
Arrays.stream(mControllers.taskbarViewController.getIconViews()).findFirst();
|
||||
if (optionalView.isEmpty()) {
|
||||
Log.wtf(TAG, "No views to start Interaction jank monitor with.", new Exception());
|
||||
return;
|
||||
}
|
||||
View v = optionalView.get();
|
||||
View v = mControllers.taskbarActivityContext.getDragLayer();
|
||||
int action = expanding ? InteractionJankMonitor.CUJ_TASKBAR_EXPAND :
|
||||
InteractionJankMonitor.CUJ_TASKBAR_COLLAPSE;
|
||||
animator.addListener(new AnimatorListenerAdapter() {
|
||||
|
||||
Reference in New Issue
Block a user