mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Merge "Check NPE and log error condition for enableTransientTaskbar in test harness." into tm-qpr-dev
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.android.quickstep;
|
||||
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.NPE_TRANSIENT_TASKBAR;
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
|
||||
import android.app.Activity;
|
||||
@@ -7,6 +8,7 @@ import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
@@ -184,9 +186,15 @@ public class QuickstepTestInformationHandler extends TestInformationHandler {
|
||||
|
||||
private void enableTransientTaskbar(
|
||||
TouchInteractionService.TISBinder tisBinder, boolean enable) {
|
||||
// Allow null-pointer to catch illegal states.
|
||||
TaskbarActivityContext context = tisBinder.getTaskbarManager().getCurrentActivityContext();
|
||||
DisplayController.INSTANCE.get(context).enableTransientTaskbarForTests(enable);
|
||||
if (context == null) {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(NPE_TRANSIENT_TASKBAR, "enableTransientTaskbar: enable=" + enable,
|
||||
new Exception());
|
||||
}
|
||||
} else {
|
||||
DisplayController.INSTANCE.get(context).enableTransientTaskbarForTests(enable);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -148,6 +148,7 @@ public final class TestProtocol {
|
||||
public static final String MISSING_PROMISE_ICON = "b/202985412";
|
||||
public static final String TASKBAR_IN_APP_STATE = "b/227657604";
|
||||
public static final String INCORRECT_INFO_UPDATED = "b/239465630";
|
||||
public static final String NPE_TRANSIENT_TASKBAR = "b/257549303";
|
||||
|
||||
public static final String REQUEST_EMULATE_DISPLAY = "emulate-display";
|
||||
public static final String REQUEST_STOP_EMULATE_DISPLAY = "stop-emulate-display";
|
||||
|
||||
Reference in New Issue
Block a user