mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 23:36:47 +00:00
Fix conflicts
This commit is contained in:
@@ -173,12 +173,6 @@ public class DepthController extends BaseDepthController implements StateHandler
|
||||
mLauncher.getDragLayer().getViewTreeObserver().addOnDrawListener(mOnDrawListener);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onInvalidSurface() {
|
||||
// Lets wait for surface to become valid again
|
||||
mLauncher.getDragLayer().getViewTreeObserver().addOnDrawListener(mOnDrawListener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMultiWindowModeChanged(boolean isInMultiWindowMode) {
|
||||
mIgnoreStateChangesDuringMultiWindowAnimation = true;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package com.android.launcher3.taskbar
|
||||
|
||||
import android.inputmethodservice.InputMethodService.ENABLE_HIDE_IME_CAPTION_BAR
|
||||
import android.graphics.Insets
|
||||
import android.graphics.Region
|
||||
import android.os.Binder
|
||||
|
||||
@@ -154,63 +154,6 @@ public class TaskbarManager {
|
||||
}
|
||||
};
|
||||
|
||||
private final ActivityLifecycleCallbacksAdapter mLifecycleCallbacks = new ActivityLifecycleCallbacksAdapter() {
|
||||
@Override
|
||||
public void onActivityDestroyed(Activity activity) {
|
||||
if (mActivity != activity)
|
||||
return;
|
||||
if (mActivity != null) {
|
||||
mActivity.removeOnDeviceProfileChangeListener(
|
||||
mDebugActivityDeviceProfileChanged);
|
||||
Log.d(TASKBAR_NOT_DESTROYED_TAG,
|
||||
"unregistering activity lifecycle callbacks from "
|
||||
+ "onActivityDestroyed.");
|
||||
mActivity.unregisterActivityLifecycleCallbacks(this);
|
||||
}
|
||||
mActivity = null;
|
||||
debugWhyTaskbarNotDestroyed("clearActivity");
|
||||
if (mTaskbarActivityContext != null) {
|
||||
mTaskbarActivityContext.setUIController(TaskbarUIController.DEFAULT);
|
||||
}
|
||||
mUnfoldProgressProvider.setSourceProvider(null);
|
||||
}
|
||||
};
|
||||
|
||||
UnfoldTransitionProgressProvider.TransitionProgressListener mUnfoldTransitionProgressListener = new UnfoldTransitionProgressProvider.TransitionProgressListener() {
|
||||
@Override
|
||||
public void onTransitionStarted() {
|
||||
Log.d(TASKBAR_NOT_DESTROYED_TAG,
|
||||
"fold/unfold transition started getting called.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTransitionProgress(float progress) {
|
||||
Log.d(TASKBAR_NOT_DESTROYED_TAG,
|
||||
"fold/unfold transition progress : " + progress);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTransitionFinishing() {
|
||||
Log.d(TASKBAR_NOT_DESTROYED_TAG,
|
||||
"fold/unfold transition finishing getting called.");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTransitionFinished() {
|
||||
Log.d(TASKBAR_NOT_DESTROYED_TAG,
|
||||
"fold/unfold transition finished getting called.");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
private final SharedPreferences.OnSharedPreferenceChangeListener
|
||||
mTaskbarPinningPreferenceChangeListener = (sharedPreferences, key) -> {
|
||||
if (TASKBAR_PINNING_KEY.equals(key)) {
|
||||
recreateTaskbar();
|
||||
}
|
||||
};
|
||||
|
||||
private final ActivityLifecycleCallbacksAdapter mLifecycleCallbacks =
|
||||
new ActivityLifecycleCallbacksAdapter() {
|
||||
@Override
|
||||
|
||||
@@ -93,6 +93,7 @@ import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.LauncherSettings.Favorites;
|
||||
import com.android.launcher3.LauncherState;
|
||||
import com.android.launcher3.OnBackPressedHandler;
|
||||
import com.android.launcher3.QuickstepAccessibilityDelegate;
|
||||
import com.android.launcher3.QuickstepTransitionManager;
|
||||
import com.android.launcher3.R;
|
||||
@@ -759,14 +760,13 @@ public class QuickstepLauncher extends Launcher {
|
||||
|
||||
@Override
|
||||
public void onBackStarted(@NonNull BackEvent backEvent) {
|
||||
if (mActiveOnBackAnimationCallback != null) {
|
||||
mActiveOnBackAnimationCallback.onBackCancelled();
|
||||
if (mActiveOnBackPressedHandler != null) {
|
||||
mActiveOnBackPressedHandler.onBackCancelled();
|
||||
}
|
||||
mActiveOnBackAnimationCallback = getOnBackAnimationCallback();
|
||||
mActiveOnBackAnimationCallback.onBackStarted(backEvent);
|
||||
mActiveOnBackPressedHandler = getOnBackPressedHandler();
|
||||
mActiveOnBackPressedHandler.onBackStarted();
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
|
||||
@Override
|
||||
public void onBackInvoked() {
|
||||
// Recreate mActiveOnBackPressedHandler if necessary to avoid NPE
|
||||
@@ -775,11 +775,11 @@ public class QuickstepLauncher extends Launcher {
|
||||
// called on ACTION_DOWN before onBackInvoked() is called in ACTION_UP.
|
||||
// 2. Launcher#onBackPressed() will call onBackInvoked() without calling
|
||||
// onBackInvoked() beforehand.
|
||||
if (mActiveOnBackAnimationCallback == null) {
|
||||
mActiveOnBackAnimationCallback = getOnBackAnimationCallback();
|
||||
if (mActiveOnBackPressedHandler == null) {
|
||||
mActiveOnBackPressedHandler = getOnBackPressedHandler();
|
||||
}
|
||||
mActiveOnBackAnimationCallback.onBackInvoked();
|
||||
mActiveOnBackAnimationCallback = null;
|
||||
mActiveOnBackPressedHandler.onBackInvoked();
|
||||
mActiveOnBackPressedHandler = null;
|
||||
TestLogging.recordEvent(TestProtocol.SEQUENCE_MAIN, "onBackInvoked");
|
||||
}
|
||||
@Override
|
||||
@@ -797,8 +797,8 @@ public class QuickstepLauncher extends Launcher {
|
||||
&& mActiveOnBackPressedHandler == null) {
|
||||
return;
|
||||
}
|
||||
mActiveOnBackAnimationCallback.onBackCancelled();
|
||||
mActiveOnBackAnimationCallback = null;
|
||||
mActiveOnBackPressedHandler.onBackCancelled();
|
||||
mActiveOnBackPressedHandler = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -178,10 +178,6 @@ public class TouchInteractionService extends Service {
|
||||
mTis = new WeakReference<>(tis);
|
||||
}
|
||||
|
||||
private TISBinder(TouchInteractionService tis) {
|
||||
mTis = new WeakReference<>(tis);
|
||||
}
|
||||
|
||||
@BinderThread
|
||||
public void onInitialize(Bundle bundle) {
|
||||
ISystemUiProxy proxy = ISystemUiProxy.Stub.asInterface(
|
||||
|
||||
@@ -293,48 +293,4 @@ public class LauncherUnfoldAnimationController implements OnDeviceProfileChangeL
|
||||
mHasRun = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Class to track the current status of the external transition provider (the events are coming
|
||||
* from the SystemUI side through IPC), it allows to check if the transition has already
|
||||
* finished or currently running on the SystemUI side since last unfold.
|
||||
*/
|
||||
private static class TransitionStatusProvider implements TransitionProgressListener {
|
||||
|
||||
private boolean mHasRun = false;
|
||||
|
||||
@Override
|
||||
public void onTransitionStarted() {
|
||||
markAsRun();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTransitionProgress(float progress) {
|
||||
markAsRun();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTransitionFinished() {
|
||||
markAsRun();
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the device is folded, so we can reset the status of the animation
|
||||
*/
|
||||
public void onFolded() {
|
||||
mHasRun = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if there was an animation already (or it is currently running) after
|
||||
* unfolding the device
|
||||
*/
|
||||
public boolean hasRun() {
|
||||
return mHasRun;
|
||||
}
|
||||
|
||||
private void markAsRun() {
|
||||
mHasRun = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,7 +157,11 @@ public final class DigitalWellBeingToast {
|
||||
}
|
||||
final long appUsageLimitTimeMs = usageLimit != null ? usageLimit.getTotalUsageLimit() : -1;
|
||||
final long appRemainingTimeMs = usageLimit != null ? usageLimit.getUsageRemaining() : -1;
|
||||
|
||||
mTaskView.post(() -> {
|
||||
if (appUsageLimitTimeMs < 0 || appRemainingTimeMs < 0) {
|
||||
setNoLimit();
|
||||
} else {
|
||||
setLimit(appUsageLimitTimeMs, appRemainingTimeMs);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user