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

Commit 8687bc21 authored by Winson Chung's avatar Winson Chung
Browse files

Initial changes to support blur

- Add a new controller to update the background blur on either the
  launcher or app surfaces based on state or transition

Bug: 149792636

Change-Id: I6103cd3d53a00c8025558dd49bb73137e2980014
parent f67ab6c6
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2020 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.
-->
<resources>
    <color name="chip_hint_foreground_color">#fff</color>

+21 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2020 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.
-->
<resources>
    <integer name="app_background_blur_radius">150</integer>
    <integer name="allapps_background_blur_radius">90</integer>
    <integer name="overview_background_blur_radius">50</integer>
    <integer name="folder_background_blur_radius_adjustment">20</integer>
</resources>
 No newline at end of file
+14 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2020 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.
-->
<resources>
    <dimen name="chip_hint_border_width">1dp</dimen>
    <dimen name="chip_hint_corner_radius">20dp</dimen>
+3 −2
Original line number Diff line number Diff line
@@ -91,8 +91,9 @@ public final class LauncherAppTransitionManagerImpl extends QuickstepAppTransiti

        AppWindowAnimationHelper helper =
            new AppWindowAnimationHelper(recentsView.getPagedViewOrientedState(), mLauncher);
        anim.play(getRecentsWindowAnimator(taskView, skipLauncherChanges, appTargets,
                wallpaperTargets, helper).setDuration(RECENTS_LAUNCH_DURATION));
        Animator recentsAnimator = getRecentsWindowAnimator(taskView, skipLauncherChanges,
                appTargets, wallpaperTargets, mLauncher.getBackgroundBlurController(), helper);
        anim.play(recentsAnimator.setDuration(RECENTS_LAUNCH_DURATION));

        Animator childStateAnimation = null;
        // Found a visible recents task that matches the opening app, lets launch the app from there
+8 −0
Original line number Diff line number Diff line
@@ -15,8 +15,11 @@
 */
package com.android.launcher3.uioverrides.states;

import android.content.Context;

import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.Launcher;
import com.android.launcher3.R;
import com.android.launcher3.allapps.AllAppsTransitionController;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.quickstep.util.LayoutUtils;
@@ -102,4 +105,9 @@ public class BackgroundAppState extends OverviewState {
        }
        return super.getHotseatScaleAndTranslation(launcher);
    }

    @Override
    public int getBackgroundBlurRadius(Context context) {
        return context.getResources().getInteger(R.integer.app_background_blur_radius);
    }
}
Loading