diff --git a/packages/CarSystemUI/res/layout/car_qs_footer.xml b/packages/CarSystemUI/res/layout/car_qs_footer.xml
deleted file mode 100644
index bf96c00e3f0d6..0000000000000
--- a/packages/CarSystemUI/res/layout/car_qs_footer.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/packages/CarSystemUI/res/layout/car_qs_panel.xml b/packages/CarSystemUI/res/layout/car_qs_panel.xml
deleted file mode 100644
index 0c6f322ca2611..0000000000000
--- a/packages/CarSystemUI/res/layout/car_qs_panel.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/packages/CarSystemUI/res/layout/car_status_bar_header.xml b/packages/CarSystemUI/res/layout/car_status_bar_header.xml
index 81c7108a4cb27..12c9f11b30647 100644
--- a/packages/CarSystemUI/res/layout/car_status_bar_header.xml
+++ b/packages/CarSystemUI/res/layout/car_status_bar_header.xml
@@ -15,7 +15,7 @@
~ limitations under the License
-->
-
-
+
diff --git a/packages/CarSystemUI/res/values/colors_car.xml b/packages/CarSystemUI/res/values/colors_car.xml
index 5f33f8f94a9a7..6d3e440a6467f 100644
--- a/packages/CarSystemUI/res/values/colors_car.xml
+++ b/packages/CarSystemUI/res/values/colors_car.xml
@@ -17,9 +17,6 @@
*/
-->
- #263238
- @*android:color/car_grey_50
-
@*android:color/car_card_dark
@*android:color/car_body1_light
diff --git a/packages/CarSystemUI/res/values/dimens.xml b/packages/CarSystemUI/res/values/dimens.xml
index f68d0349e6a02..c45fbdf11bbbf 100644
--- a/packages/CarSystemUI/res/values/dimens.xml
+++ b/packages/CarSystemUI/res/values/dimens.xml
@@ -22,7 +22,6 @@
36dp
36dp
- 96dp
- 1.75
diff --git a/packages/CarSystemUI/res/values/dimens_car.xml b/packages/CarSystemUI/res/values/dimens_car.xml
index e7ecf7fafc9ff..d349b9693d24b 100644
--- a/packages/CarSystemUI/res/values/dimens_car.xml
+++ b/packages/CarSystemUI/res/values/dimens_car.xml
@@ -28,17 +28,6 @@
96dp
96dp
- 112dp
- 16dp
- 16dp
- 46dp
- 46dp
- 56dp
- 56dp
- 5dp
- 36dp
- @*android:dimen/car_body2_size
-
420dp
-420dp
diff --git a/packages/CarSystemUI/src/com/android/systemui/qs/car/CarStatusBarHeader.java b/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/CarStatusBarHeader.java
similarity index 95%
rename from packages/CarSystemUI/src/com/android/systemui/qs/car/CarStatusBarHeader.java
rename to packages/CarSystemUI/src/com/android/systemui/car/userswitcher/CarStatusBarHeader.java
index 4ef926fae816f..bab67154e75d8 100644
--- a/packages/CarSystemUI/src/com/android/systemui/qs/car/CarStatusBarHeader.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/CarStatusBarHeader.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018 The Android Open Source Project
+ * 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.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.systemui.qs.car;
+package com.android.systemui.car.userswitcher;
import android.content.Context;
import android.graphics.Color;
diff --git a/packages/CarSystemUI/src/com/android/systemui/qs/car/CarQSFooter.java b/packages/CarSystemUI/src/com/android/systemui/qs/car/CarQSFooter.java
deleted file mode 100644
index b74f1998bf9e5..0000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/qs/car/CarQSFooter.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (C) 2018 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.qs.car;
-
-import android.content.Context;
-import android.content.Intent;
-import android.graphics.drawable.Drawable;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.widget.ImageView;
-import android.widget.RelativeLayout;
-import android.widget.TextView;
-
-import androidx.annotation.Nullable;
-
-import com.android.systemui.Dependency;
-import com.android.systemui.R;
-import com.android.systemui.plugins.ActivityStarter;
-import com.android.systemui.qs.QSFooter;
-import com.android.systemui.qs.QSPanel;
-import com.android.systemui.statusbar.phone.MultiUserSwitch;
-import com.android.systemui.statusbar.policy.DeviceProvisionedController;
-import com.android.systemui.statusbar.policy.UserInfoController;
-
-/**
- * The footer view that displays below the status bar in the auto use-case. This view shows the
- * user switcher and access to settings.
- */
-public class CarQSFooter extends RelativeLayout implements QSFooter,
- UserInfoController.OnUserInfoChangedListener {
- private static final String TAG = "CarQSFooter";
-
- private UserInfoController mUserInfoController;
-
- private MultiUserSwitch mMultiUserSwitch;
- private TextView mUserName;
- private ImageView mMultiUserAvatar;
- private CarQSFragment.UserSwitchCallback mUserSwitchCallback;
-
- public CarQSFooter(Context context, AttributeSet attrs) {
- super(context, attrs);
- }
-
- @Override
- protected void onFinishInflate() {
- super.onFinishInflate();
- mMultiUserSwitch = findViewById(R.id.multi_user_switch);
- mMultiUserAvatar = mMultiUserSwitch.findViewById(R.id.multi_user_avatar);
- mUserName = findViewById(R.id.user_name);
-
- mUserInfoController = Dependency.get(UserInfoController.class);
-
- mMultiUserSwitch.setOnClickListener(v -> {
- if (mUserSwitchCallback == null) {
- Log.e(TAG, "CarQSFooter not properly set up; cannot display user switcher.");
- return;
- }
-
- if (!mUserSwitchCallback.isShowing()) {
- mUserSwitchCallback.show();
- } else {
- mUserSwitchCallback.hide();
- }
- });
-
- findViewById(R.id.settings_button).setOnClickListener(v -> {
- ActivityStarter activityStarter = Dependency.get(ActivityStarter.class);
-
- if (!Dependency.get(DeviceProvisionedController.class).isCurrentUserSetup()) {
- // If user isn't setup just unlock the device and dump them back at SUW.
- activityStarter.postQSRunnableDismissingKeyguard(() -> { });
- return;
- }
-
- activityStarter.startActivity(new Intent(android.provider.Settings.ACTION_SETTINGS),
- true /* dismissShade */);
- });
- }
-
- @Override
- public void onUserInfoChanged(String name, Drawable picture, String userAccount) {
- mMultiUserAvatar.setImageDrawable(picture);
- mUserName.setText(name);
- }
-
- @Override
- public void setQSPanel(@Nullable QSPanel panel) {
- if (panel != null) {
- mMultiUserSwitch.setQsPanel(panel);
- }
- }
-
- public void setUserSwitchCallback(CarQSFragment.UserSwitchCallback callback) {
- mUserSwitchCallback = callback;
- }
-
- @Override
- public void setListening(boolean listening) {
- if (listening) {
- mUserInfoController.addCallback(this);
- } else {
- mUserInfoController.removeCallback(this);
- }
- }
-
- @Override
- public void setExpandClickListener(OnClickListener onClickListener) {
- // No view that should expand/collapse the quick settings.
- }
-
- @Override
- public void setExpanded(boolean expanded) {
- // Do nothing because the quick settings cannot be expanded.
- }
-
- @Override
- public void setExpansion(float expansion) {
- // Do nothing because the quick settings cannot be expanded.
- }
-
- @Override
- public void setKeyguardShowing(boolean keyguardShowing) {
- // Do nothing because the footer will not be shown when the keyguard is up.
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/qs/car/CarQSFragment.java b/packages/CarSystemUI/src/com/android/systemui/qs/car/CarQSFragment.java
deleted file mode 100644
index 31965c5fc0220..0000000000000
--- a/packages/CarSystemUI/src/com/android/systemui/qs/car/CarQSFragment.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * Copyright (C) 2018 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.qs.car;
-
-import android.animation.Animator;
-import android.animation.AnimatorInflater;
-import android.animation.AnimatorListenerAdapter;
-import android.animation.AnimatorSet;
-import android.animation.ObjectAnimator;
-import android.animation.ValueAnimator;
-import android.app.Fragment;
-import android.content.Context;
-import android.os.Bundle;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.view.ViewGroup;
-
-import androidx.annotation.Nullable;
-import androidx.annotation.VisibleForTesting;
-import androidx.recyclerview.widget.GridLayoutManager;
-
-import com.android.systemui.R;
-import com.android.systemui.car.userswitcher.UserGridRecyclerView;
-import com.android.systemui.plugins.qs.QS;
-import com.android.systemui.qs.QSFooter;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * A quick settings fragment for the car. For auto, there is no row for quick settings or ability
- * to expand the quick settings panel. Instead, the only thing is that displayed is the
- * status bar, and a static row with access to the user switcher and settings.
- */
-public class CarQSFragment extends Fragment implements QS {
- private View mHeader;
- private View mUserSwitcherContainer;
- private CarQSFooter mFooter;
- private View mFooterUserName;
- private View mFooterExpandIcon;
- private UserGridRecyclerView mUserGridView;
- private AnimatorSet mAnimatorSet;
- private UserSwitchCallback mUserSwitchCallback;
-
- @Override
- public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
- Bundle savedInstanceState) {
- return inflater.inflate(R.layout.car_qs_panel, container, false);
- }
-
- @Override
- public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
- super.onViewCreated(view, savedInstanceState);
- mHeader = view.findViewById(R.id.header);
- mFooter = view.findViewById(R.id.qs_footer);
- mFooterUserName = mFooter.findViewById(R.id.user_name);
- mFooterExpandIcon = mFooter.findViewById(R.id.user_switch_expand_icon);
-
- mUserSwitcherContainer = view.findViewById(R.id.user_switcher_container);
-
- updateUserSwitcherHeight(0);
-
- Context context = getContext();
- mUserGridView = mUserSwitcherContainer.findViewById(R.id.user_grid);
- GridLayoutManager layoutManager = new GridLayoutManager(context,
- context.getResources().getInteger(R.integer.user_fullscreen_switcher_num_col));
- mUserGridView.setLayoutManager(layoutManager);
- mUserGridView.buildAdapter();
-
- mUserSwitchCallback = new UserSwitchCallback();
- mFooter.setUserSwitchCallback(mUserSwitchCallback);
- }
-
- @Override
- public void hideImmediately() {
- getView().setVisibility(View.INVISIBLE);
- }
-
- @Override
- public void setQsExpansion(float qsExpansionFraction, float headerTranslation) {
- // If the header is to be completed translated down, then set it to be visible.
- getView().setVisibility(headerTranslation == 0 ? View.VISIBLE : View.INVISIBLE);
- }
-
- @Override
- public View getHeader() {
- return mHeader;
- }
-
- @VisibleForTesting
- QSFooter getFooter() {
- return mFooter;
- }
-
- @Override
- public void setHeaderListening(boolean listening) {
- mFooter.setListening(listening);
- }
-
- @Override
- public void setListening(boolean listening) {
- mFooter.setListening(listening);
- }
-
- @Override
- public int getQsMinExpansionHeight() {
- return getView().getHeight();
- }
-
- @Override
- public int getDesiredHeight() {
- return getView().getHeight();
- }
-
- @Override
- public void setPanelView(HeightListener notificationPanelView) {
- // No quick settings panel.
- }
-
- @Override
- public void setHeightOverride(int desiredHeight) {
- // No ability to expand quick settings.
- }
-
- @Override
- public void setHeaderClickable(boolean qsExpansionEnabled) {
- // Usually this sets the expand button to be clickable, but there is no quick settings to
- // expand.
- }
-
- @Override
- public boolean isCustomizing() {
- // No ability to customize the quick settings.
- return false;
- }
-
- @Override
- public void setOverscrolling(boolean overscrolling) {
- // No overscrolling to reveal quick settings.
- }
-
- @Override
- public void setExpanded(boolean qsExpanded) {
- // No quick settings to expand
- }
-
- @Override
- public boolean isShowingDetail() {
- // No detail panel to close.
- return false;
- }
-
- @Override
- public void closeDetail() {
- // No detail panel to close.
- }
-
- @Override
- public void animateHeaderSlidingIn(long delay) {
- // No header to animate.
- }
-
- @Override
- public void animateHeaderSlidingOut() {
- // No header to animate.
- }
-
- @Override
- public void notifyCustomizeChanged() {
- // There is no ability to customize quick settings.
- }
-
- @Override
- public void setContainer(ViewGroup container) {
- // No quick settings, so no container to set.
- }
-
- @Override
- public void setExpandClickListener(OnClickListener onClickListener) {
- // No ability to expand the quick settings.
- }
-
- public class UserSwitchCallback {
- private boolean mShowing;
-
- public boolean isShowing() {
- return mShowing;
- }
-
- public void show() {
- mShowing = true;
- animateHeightChange(true /* opening */);
- }
-
- public void hide() {
- mShowing = false;
- animateHeightChange(false /* opening */);
- }
- }
-
- private void updateUserSwitcherHeight(int height) {
- ViewGroup.LayoutParams layoutParams = mUserSwitcherContainer.getLayoutParams();
- layoutParams.height = height;
- mUserSwitcherContainer.requestLayout();
- }
-
- private void animateHeightChange(boolean opening) {
- // Animation in progress; cancel it to avoid contention.
- if (mAnimatorSet != null) {
- mAnimatorSet.cancel();
- }
-
- List allAnimators = new ArrayList<>();
- ValueAnimator heightAnimator = (ValueAnimator) AnimatorInflater.loadAnimator(getContext(),
- opening ? R.anim.car_user_switcher_open_animation
- : R.anim.car_user_switcher_close_animation);
- heightAnimator.addUpdateListener(valueAnimator -> {
- updateUserSwitcherHeight((Integer) valueAnimator.getAnimatedValue());
- });
- allAnimators.add(heightAnimator);
-
- Animator nameAnimator = AnimatorInflater.loadAnimator(getContext(),
- opening ? R.anim.car_user_switcher_open_name_animation
- : R.anim.car_user_switcher_close_name_animation);
- nameAnimator.setTarget(mFooterUserName);
- allAnimators.add(nameAnimator);
-
- Animator iconAnimator = AnimatorInflater.loadAnimator(getContext(),
- opening ? R.anim.car_user_switcher_open_icon_animation
- : R.anim.car_user_switcher_close_icon_animation);
- iconAnimator.setTarget(mFooterExpandIcon);
- allAnimators.add(iconAnimator);
-
- mAnimatorSet = new AnimatorSet();
- mAnimatorSet.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- mAnimatorSet = null;
- }
- });
- mAnimatorSet.playTogether(allAnimators.toArray(new Animator[0]));
-
- // Setup all values to the start values in the animations, since there are delays, but need
- // to have all values start at the beginning.
- setupInitialValues(mAnimatorSet);
-
- mAnimatorSet.start();
- }
-
- private void setupInitialValues(Animator anim) {
- if (anim instanceof AnimatorSet) {
- for (Animator a : ((AnimatorSet) anim).getChildAnimations()) {
- setupInitialValues(a);
- }
- } else if (anim instanceof ObjectAnimator) {
- ((ObjectAnimator) anim).setCurrentFraction(0.0f);
- }
- }
-}
diff --git a/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java b/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java
index d8111d04348b6..ec1dabc1bd720 100644
--- a/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java
+++ b/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java
@@ -54,7 +54,6 @@ import com.android.systemui.plugins.DarkIconDispatcher;
import com.android.systemui.plugins.FalsingManager;
import com.android.systemui.plugins.PluginDependencyProvider;
import com.android.systemui.plugins.qs.QS;
-import com.android.systemui.qs.car.CarQSFragment;
import com.android.systemui.recents.Recents;
import com.android.systemui.recents.ScreenPinningRequest;
import com.android.systemui.shared.plugins.PluginManager;
@@ -407,7 +406,7 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt
@Override
protected QS createDefaultQSFragment() {
- return new CarQSFragment();
+ return null;
}
private BatteryController createBatteryController() {