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

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

Merge "Add CommunalHostView to NotificationsQuickSettingsContainer."

parents f81dca4b 2b8f817e
Loading
Loading
Loading
Loading
+26 −0
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"
    xmlns:systemui="http://schemas.android.com/apk/res-auto"
    android:id="@+id/communal_host"
    android:orientation="vertical"
    systemui:layout_constraintEnd_toEndOf="parent"
    android:layout_width="0dp"
    android:layout_height="0dp"/>
 No newline at end of file
+3 −0
Original line number Diff line number Diff line
@@ -106,6 +106,9 @@
            systemui:layout_constraintEnd_toEndOf="parent"
        />

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

        <include layout="@layout/ambient_indication"
            android:id="@+id/ambient_indication_container" />

+20 −0
Original line number Diff line number Diff line
@@ -18,12 +18,22 @@ package com.android.systemui.communal;

import android.view.View;

import com.android.systemui.statusbar.notification.AnimatableProperty;
import com.android.systemui.statusbar.notification.PropertyAnimator;
import com.android.systemui.statusbar.notification.stack.AnimationProperties;
import com.android.systemui.statusbar.notification.stack.StackStateAnimator;
import com.android.systemui.util.ViewController;

import javax.inject.Inject;

/**
 * Injectable controller for {@link CommunalHostView}.
 */
public class CommunalHostViewController extends ViewController<CommunalHostView> {
    private static final AnimationProperties ANIMATION_PROPERTIES =
            new AnimationProperties().setDuration(StackStateAnimator.ANIMATION_DURATION_STANDARD);

    @Inject
    protected CommunalHostViewController(CommunalHostView view) {
        super(view);
    }
@@ -44,4 +54,14 @@ public class CommunalHostViewController extends ViewController<CommunalHostView>
    public void show(boolean visible) {
        mView.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
    }

    /**
     * Sets the Y position of the {@link CommunalHostView}
     *
     * @param y       Offset from parent top.
     * @param animate Whether the change should be animated.
     */
    public void updatePositionY(int y, boolean animate) {
        PropertyAnimator.setProperty(mView, AnimatableProperty.Y, y, ANIMATION_PROPERTIES, animate);
    }
}
+0 −2
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ import com.android.systemui.SystemUI;
import com.android.systemui.accessibility.SystemActions;
import com.android.systemui.accessibility.WindowMagnification;
import com.android.systemui.biometrics.AuthController;
import com.android.systemui.communal.dagger.CommunalModule;
import com.android.systemui.globalactions.GlobalActionsComponent;
import com.android.systemui.keyguard.KeyguardViewMediator;
import com.android.systemui.keyguard.dagger.KeyguardModule;
@@ -56,7 +55,6 @@ import dagger.multibindings.IntoMap;
        RecentsModule.class,
        StatusBarModule.class,
        KeyguardModule.class,
        CommunalModule.class,
})
public abstract class SystemUIBinder {
    /** Inject into AuthController. */
+2 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import com.android.systemui.appops.dagger.AppOpsModule;
import com.android.systemui.assist.AssistModule;
import com.android.systemui.biometrics.UdfpsHbmProvider;
import com.android.systemui.classifier.FalsingModule;
import com.android.systemui.communal.dagger.CommunalModule;
import com.android.systemui.controls.dagger.ControlsModule;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.demomode.dagger.DemoModeModule;
@@ -97,6 +98,7 @@ import dagger.Provides;
            AppOpsModule.class,
            AssistModule.class,
            ClockModule.class,
            CommunalModule.class,
            ControlsModule.class,
            DemoModeModule.class,
            FalsingModule.class,
Loading