Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d6f8aab authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Merging ub-launcher3-master, build 5338033

Test: Manual

Bug: 111926330 n Bug: 114136250 n Bug: 115854326 n Bug: 118891218 n Bug: 119290867 n Bug: 120550382 n Bug: 123539954 n Bug: 123541334 n Bug: 123900446 n Bug: 123915937 n Bug: 124252507 n Bug: 124255113 n Bug: 124392764 n Bug: 124451190 n Bug: 124741358 n Bug: 125795067 n
Change-Id: I4fa280443b9d79cb75e0a809d5da846459c907b0
parents 9615cce5 b04dabf7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -20,6 +20,6 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
    <string name="couldnt_launch" msgid="7873588052226763866">"நடவடிக்கையைத் துவக்க இயலவில்லை"</string>
    <string name="add_app_shortcut" msgid="2756755330707509435">"ஆப்ஸ் குறுக்குவழியைச் சேர்"</string>
    <string name="add_app_shortcut" msgid="2756755330707509435">"ஆப்ஸ் ஷார்ட்கட்டைச் சேர்"</string>
    <string name="set_wallpaper" msgid="6475195450505435904">"வால்பேப்பரை அமை"</string>
</resources>
+30 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
     Copyright (C) 2019 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<com.android.quickstep.fallback.GoRecentsActivityRootView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/drag_layer"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true">

    <include
        android:id="@+id/overview_panel"
        layout="@layout/overview_panel"
        android:clipChildren="false"
        android:clipToPadding="false"
        android:outlineProvider="none"
        android:theme="@style/HomeScreenElementTheme" />
</com.android.quickstep.fallback.GoRecentsActivityRootView>
+0 −12
Original line number Diff line number Diff line
@@ -28,18 +28,6 @@ public final class GoLauncherAppTransitionManagerImpl extends QuickstepAppTransi
        return mLauncher.getStateManager().getState().overviewUi;
    }

    @Override
    protected boolean isQuickSwitchInProgress() {
        // Go does not support quick scrub.
        return false;
    }

    @Override
    protected ActivityOptions getQuickSwitchActivityOptions() {
        // Go does not support quick scrub.
        return null;
    }

    @Override
    protected void composeRecentsLaunchAnimator(AnimatorSet anim, View v,
            RemoteAnimationTargetCompat[] targets, boolean launcherClosing) {
+0 −5
Original line number Diff line number Diff line
@@ -49,11 +49,6 @@ public class OverviewState extends LauncherState {
        return new float[] {1f, 0f};
    }

    @Override
    public void onStateDisabled(Launcher launcher) {
        RecentsModel.INSTANCE.get(launcher).resetAssistCache();
    }

    @Override
    public PageAlphaProvider getWorkspacePageAlphaProvider(Launcher launcher) {
        return new PageAlphaProvider(DEACCEL_2) {
+88 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2019 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.android.quickstep;

import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN;

import android.animation.AnimatorSet;
import android.animation.ValueAnimator;
import android.util.Log;

import com.android.launcher3.BaseDraggingActivity;
import com.android.quickstep.util.RemoteAnimationProvider;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;

/**
 * Provider for the atomic remote window animation from the app to the overview.
 *
 * @param <T> activity that contains the overview
 */
final class AppToOverviewAnimationProvider<T extends BaseDraggingActivity> implements
        RemoteAnimationProvider {

    private static final long RECENTS_LAUNCH_DURATION = 250;
    private static final String TAG = "AppToOverviewAnimationProvider";

    private final ActivityControlHelper<T> mHelper;

    AppToOverviewAnimationProvider(ActivityControlHelper<T> helper, int targetTaskId) {
        mHelper = helper;
    }

    /**
     * Callback for when the activity is ready/initialized.
     *
     * @param activity the activity that is ready
     * @param wasVisible true if it was visible before
     */
    boolean onActivityReady(T activity, Boolean wasVisible) {
        ActivityControlHelper.AnimationFactory factory =
                mHelper.prepareRecentsUI(activity, wasVisible,
                        false /* animate activity */, (controller) -> {
                            controller.dispatchOnStart();
                            ValueAnimator anim = controller.getAnimationPlayer()
                                    .setDuration(RECENTS_LAUNCH_DURATION);
                            anim.setInterpolator(FAST_OUT_SLOW_IN);
                            anim.start();
                        });
        factory.onRemoteAnimationReceived(null);
        factory.createActivityController(RECENTS_LAUNCH_DURATION);
        return false;
    }

    /**
     * Create remote window animation from the currently running app to the overview panel.
     *
     * @param targetCompats the target apps
     * @return animation from app to overview
     */
    @Override
    public AnimatorSet createWindowAnimation(RemoteAnimationTargetCompat[] targetCompats) {
        //TODO: Implement the overview to app window animation for Go.
        AnimatorSet anim = new AnimatorSet();
        anim.play(ValueAnimator.ofInt(0, 1).setDuration(RECENTS_LAUNCH_DURATION));
        return anim;
    }

    /**
     * Get duration of animation from app to overview.
     *
     * @return duration of animation
     */
    long getRecentsLaunchDuration() {
        return RECENTS_LAUNCH_DURATION;
    }
}
Loading