Skip to content

Commit

Permalink
Fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSluffy authored and Goooler committed Jan 8, 2024
1 parent 3269857 commit 32922a2
Show file tree
Hide file tree
Showing 25 changed files with 39 additions and 358 deletions.
2 changes: 1 addition & 1 deletion lawnchair/res/layout/empty_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<com.android.launcher3.taskbar.allapps.TaskbarAllAppsSlideInView
<View
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="0dp" />
129 changes: 2 additions & 127 deletions quickstep/res/layout-sw600dp-land/gesture_tutorial_step_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<FrameLayout
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
Expand Down Expand Up @@ -58,133 +58,8 @@
android:text="@string/home_gesture_tutorial_title"

app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/guideline"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/gesture_tutorial_menu_back_button">

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/gesture_tutorial_home_step_shape"
android:scaleType="fitXY"
android:adjustViewBounds="true"

app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>

<TextView
style="@style/TextAppearance.GestureTutorial.MenuButton.Home"
android:id="@+id/gesture_tutorial_menu_home_button_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/home_gesture_tutorial_title"

app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/gesture_tutorial_menu_back_button"
android:layout_width="0dp"
android:layout_height="@dimen/gesture_tutorial_menu_button_height"
android:layout_marginEnd="@dimen/gesture_tutorial_menu_button_spacing"
android:layout_marginBottom="24dp"
android:background="@drawable/gesture_tutorial_menu_back_button_background"
android:clipToOutline="true"

app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/guideline"
app:layout_constraintStart_toEndOf="@id/gesture_tutorial_menu_home_button"
app:layout_constraintEnd_toStartOf="@id/gesture_tutorial_menu_overview_button">

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/gesture_tutorial_back_step_shape"
android:layout_marginBottom="@dimen/gesture_tutorial_menu_back_shape_bottom_margin"
android:scaleType="fitXY"
android:adjustViewBounds="true"

app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"/>

<TextView
style="@style/TextAppearance.GestureTutorial.MenuButton.Back"
android:id="@+id/gesture_tutorial_menu_back_button_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/back_gesture_tutorial_title"

app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/gesture_tutorial_menu_overview_button"
android:layout_width="0dp"
android:layout_height="@dimen/gesture_tutorial_menu_button_height"
android:layout_marginBottom="24dp"
android:background="@drawable/gesture_tutorial_menu_overview_button_background"
android:clipToOutline="true"

app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/guideline"
app:layout_constraintStart_toEndOf="@id/gesture_tutorial_menu_back_button"
app:layout_constraintEnd_toEndOf="parent">

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/gesture_tutorial_overview_step_shape"
android:scaleType="fitXY"
android:adjustViewBounds="true"

app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>

<TextView
style="@style/TextAppearance.GestureTutorial.MenuButton.Overview"
android:id="@+id/gesture_tutorial_menu_overview_button_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/overview_gesture_tutorial_title"

app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>

<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"

app:layout_constraintGuide_end="@dimen/gesture_tutorial_menu_done_button_spacing"/>

<Button
style="@style/TextAppearance.GestureTutorial.ButtonLabel"
android:id="@+id/gesture_tutorial_menu_done_button"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_marginVertical="16dp"
android:text="@string/gesture_tutorial_action_button_label"
android:background="@drawable/gesture_tutorial_action_button_background"
android:backgroundTint="?androidprv:attr/materialColorPrimary"
android:stateListAnimator="@null"

app:layout_constraintTop_toBottomOf="@id/guideline"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,6 @@ protected void onInvalidSurface() {
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
57 changes: 0 additions & 57 deletions quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
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;
Expand Down Expand Up @@ -759,14 +760,13 @@ protected void registerBackDispatcher() {

@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
Expand All @@ -775,11 +775,11 @@ public void onBackInvoked() {
// 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
Expand All @@ -797,8 +797,8 @@ public void onBackCancelled() {
&& mActiveOnBackPressedHandler == null) {
return;
}
mActiveOnBackAnimationCallback.onBackCancelled();
mActiveOnBackAnimationCallback = null;
mActiveOnBackPressedHandler.onBackCancelled();
mActiveOnBackPressedHandler = null;
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,6 @@ private TISBinder(TouchInteractionService tis) {
mTis = new WeakReference<>(tis);
}

private TISBinder(TouchInteractionService tis) {
mTis = new WeakReference<>(tis);
}

@BinderThread
public void onInitialize(Bundle bundle) {
ISystemUiProxy proxy = ISystemUiProxy.Stub.asInterface(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,48 +293,4 @@ private void markAsRun() {
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;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,11 @@ public void initialize(Task task) {
}
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);
}
});

Expand Down
4 changes: 1 addition & 3 deletions src/com/android/launcher3/AbstractFloatingView.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
*/
@TargetApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
public abstract class AbstractFloatingView extends LinearLayout implements TouchController,
OnBackAnimationCallback {
OnBackPressedHandler {

@IntDef(flag = true, value = {
TYPE_COMPOSE_VIEW,
Expand Down Expand Up @@ -141,8 +141,6 @@ public abstract class AbstractFloatingView extends LinearLayout implements Touch
public static final int TYPE_TASKBAR_OVERLAYS =
TYPE_TASKBAR_ALL_APPS | TYPE_TASKBAR_EDUCATION_DIALOG;

public static final int TYPE_ALL_EXCEPT_ON_BOARD_POPUP = TYPE_ALL & ~TYPE_ON_BOARD_POPUP;

protected boolean mIsOpen;

public AbstractFloatingView(Context context, AttributeSet attrs) {
Expand Down
1 change: 0 additions & 1 deletion src/com/android/launcher3/BaseDraggingActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ protected void onDestroy() {
super.onDestroy();
WallpaperManagerCompat.INSTANCE.get(this).removeOnChangeListener(this);
DisplayController.INSTANCE.get(this).removeChangeListener(this);
WallpaperColorHints.get(this).unregisterOnColorsChangedListener(this);
}

public void runOnceOnStart(Runnable action) {
Expand Down
Loading

0 comments on commit 32922a2

Please sign in to comment.