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

Commit 836db75e authored by Bryce Lee's avatar Bryce Lee Committed by Android (Google) Code Review
Browse files

Merge "Remove communal support from SystemUI." into tm-dev

parents 2222f486 eb5fbdc9
Loading
Loading
Loading
Loading
+0 −23
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 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.
  -->

<!-- This is a view that shows general status information in Keyguard. -->
<com.android.systemui.communal.CommunalHostView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/communal_host"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>
 No newline at end of file
+0 −3
Original line number Diff line number Diff line
@@ -26,9 +26,6 @@
    android:layout_height="match_parent"
    android:background="@android:color/transparent">

    <include layout="@layout/communal_host_view"
             android:visibility="gone"/>

    <ViewStub
        android:id="@+id/keyguard_qs_user_switch_stub"
        android:layout="@layout/keyguard_qs_user_switch"
+2 −5
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ import android.graphics.Rect;
import android.util.Slog;

import com.android.keyguard.KeyguardClockSwitch.ClockSize;
import com.android.systemui.communal.CommunalStateController;
import com.android.systemui.keyguard.KeyguardUnlockAnimationController;
import com.android.systemui.statusbar.notification.AnimatableProperty;
import com.android.systemui.statusbar.notification.PropertyAnimator;
@@ -63,7 +62,6 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
            KeyguardClockSwitchController keyguardClockSwitchController,
            KeyguardStateController keyguardStateController,
            KeyguardUpdateMonitor keyguardUpdateMonitor,
            CommunalStateController communalStateController,
            ConfigurationController configurationController,
            DozeParameters dozeParameters,
            KeyguardUnlockAnimationController keyguardUnlockAnimationController,
@@ -75,9 +73,8 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
        mConfigurationController = configurationController;
        mDozeParameters = dozeParameters;
        mKeyguardStateController = keyguardStateController;
        mKeyguardVisibilityHelper = new KeyguardVisibilityHelper(mView, communalStateController,
                keyguardStateController, dozeParameters, screenOffAnimationController,
                /* animateYPos= */ true, /* visibleOnCommunal= */ false);
        mKeyguardVisibilityHelper = new KeyguardVisibilityHelper(mView, keyguardStateController,
                dozeParameters, screenOffAnimationController, /* animateYPos= */ true);
        mKeyguardUnlockAnimationController = keyguardUnlockAnimationController;
    }

+1 −15
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ import android.view.View;
import android.view.ViewPropertyAnimator;

import com.android.systemui.animation.Interpolators;
import com.android.systemui.communal.CommunalStateController;
import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.notification.AnimatableProperty;
import com.android.systemui.statusbar.notification.PropertyAnimator;
@@ -39,30 +38,24 @@ import com.android.systemui.statusbar.policy.KeyguardStateController;
public class KeyguardVisibilityHelper {

    private View mView;
    private final CommunalStateController mCommunalStateController;
    private final KeyguardStateController mKeyguardStateController;
    private final DozeParameters mDozeParameters;
    private final ScreenOffAnimationController mScreenOffAnimationController;
    private final boolean mVisibleOnCommunal;
    private boolean mAnimateYPos;
    private boolean mKeyguardViewVisibilityAnimating;
    private boolean mLastOccludedState = false;
    private final AnimationProperties mAnimationProperties = new AnimationProperties();

    public KeyguardVisibilityHelper(View view,
            CommunalStateController communalStateController,
            KeyguardStateController keyguardStateController,
            DozeParameters dozeParameters,
            ScreenOffAnimationController screenOffAnimationController,
            boolean animateYPos,
            boolean visibleOnCommunal) {
            boolean animateYPos) {
        mView = view;
        mCommunalStateController = communalStateController;
        mKeyguardStateController = keyguardStateController;
        mDozeParameters = dozeParameters;
        mScreenOffAnimationController = screenOffAnimationController;
        mAnimateYPos = animateYPos;
        mVisibleOnCommunal = visibleOnCommunal;
    }

    public boolean isVisibilityAnimating() {
@@ -81,13 +74,6 @@ public class KeyguardVisibilityHelper {
        boolean isOccluded = mKeyguardStateController.isOccluded();
        mKeyguardViewVisibilityAnimating = false;

        // If the communal view is showing, hide immediately
        if (!mVisibleOnCommunal && mCommunalStateController.getCommunalViewShowing()) {
            mView.setVisibility(View.GONE);
            mView.setAlpha(1f);
            return;
        }

        if ((!keyguardFadingAway && oldStatusBarState == KEYGUARD
                && statusBarState != KEYGUARD) || goingToFullShade) {
            mKeyguardViewVisibilityAnimating = true;
+0 −45
Original line number Diff line number Diff line
/*
 * Copyright (C) 2021 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.systemui.communal;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.FrameLayout;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

/**
 * Container for communal presentation. Containing communal-related view to this parent view allows
 * for aggregate measurement/layout adjustments and capturing said values before the communal views
 * might be available.
 */
public class CommunalHostView extends FrameLayout {
    public CommunalHostView(@NonNull Context context) {
        this(context, null, 0);
    }

    public CommunalHostView(@NonNull Context context,
            @Nullable AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public CommunalHostView(@NonNull Context context, @Nullable AttributeSet attrs,
            int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }
}
Loading