mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 01:46:49 +00:00
Merge "Prevent taskbar on phone from crashing" into udc-dev
This commit is contained in:
@@ -77,6 +77,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.annotation.UiThread;
|
||||
|
||||
import com.android.launcher3.BaseDraggingActivity;
|
||||
import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.LauncherPrefs;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.Utilities;
|
||||
@@ -839,12 +840,18 @@ public class TouchInteractionService extends Service
|
||||
|
||||
// If Taskbar is present, we listen for long press to unstash it.
|
||||
TaskbarActivityContext tac = mTaskbarManager.getCurrentActivityContext();
|
||||
if (tac != null && canStartSystemGesture) {
|
||||
reasonString.append(NEWLINE_PREFIX)
|
||||
.append(reasonPrefix)
|
||||
.append(SUBSTRING_PREFIX)
|
||||
.append("TaskbarActivityContext != null, using TaskbarStashInputConsumer");
|
||||
base = new TaskbarStashInputConsumer(this, base, mInputMonitorCompat, tac);
|
||||
if (tac != null) {
|
||||
// Present always on large screen or on small screen w/ flag
|
||||
DeviceProfile dp = tac.getDeviceProfile();
|
||||
boolean useTaskbarConsumer = dp.isTaskbarPresent && !TaskbarManager.isPhoneMode(dp);
|
||||
if (canStartSystemGesture && useTaskbarConsumer) {
|
||||
reasonString.append(NEWLINE_PREFIX)
|
||||
.append(reasonPrefix)
|
||||
.append(SUBSTRING_PREFIX)
|
||||
.append("TaskbarActivityContext != null, "
|
||||
+ "using TaskbarStashInputConsumer");
|
||||
base = new TaskbarStashInputConsumer(this, base, mInputMonitorCompat, tac);
|
||||
}
|
||||
}
|
||||
|
||||
if (mDeviceState.isBubblesExpanded()) {
|
||||
|
||||
Reference in New Issue
Block a user