diff options
author | Xin Li <delphij@google.com> | 2024-01-17 22:14:18 -0800 |
---|---|---|
committer | Xin Li <delphij@google.com> | 2024-01-17 22:14:18 -0800 |
commit | 9c1df7c5e05084db1ec6905b2f591e43aa71cc38 (patch) | |
tree | 1b7f4d125385de806a0f0e3f7a65c3faa8bd2c37 /src/com/android/systemui/car/systembar/CarSystemBarButton.java | |
parent | b23abcfd5fb50e8f1ef216f9242ce21c0244f347 (diff) | |
parent | fce271ecc889073fcae7a7352ad11c8273c00b99 (diff) | |
download | SystemUI-9c1df7c5e05084db1ec6905b2f591e43aa71cc38.tar.gz |
Merge Android 24Q1 Release (ab/11220357)temp_319669529
Bug: 319669529
Merged-In: I607934bed6772c768c202dadd3eecd8d703404f9
Change-Id: I5e274fb7c443e96b9dcb0365e047395324dd76cc
Diffstat (limited to 'src/com/android/systemui/car/systembar/CarSystemBarButton.java')
-rw-r--r-- | src/com/android/systemui/car/systembar/CarSystemBarButton.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/com/android/systemui/car/systembar/CarSystemBarButton.java b/src/com/android/systemui/car/systembar/CarSystemBarButton.java index ff163bc9..02bf886c 100644 --- a/src/com/android/systemui/car/systembar/CarSystemBarButton.java +++ b/src/com/android/systemui/car/systembar/CarSystemBarButton.java @@ -42,6 +42,7 @@ import androidx.annotation.Nullable; import com.android.internal.annotations.VisibleForTesting; import com.android.systemui.R; +import com.android.systemui.car.window.OverlayViewController; import com.android.systemui.settings.UserTracker; import com.android.systemui.statusbar.AlphaOptimizedImageView; @@ -52,7 +53,8 @@ import java.net.URISyntaxException; * xml file level. This allows for more control via overlays instead of having to update * code. */ -public class CarSystemBarButton extends LinearLayout { +public class CarSystemBarButton extends LinearLayout implements + OverlayViewController.OverlayViewStateListener { private static final String TAG = "CarSystemBarButton"; private static final String BUTTON_FILTER_DELIMITER = ";"; @@ -227,6 +229,11 @@ public class CarSystemBarButton extends LinearLayout { return mComponentNames; } + @Override + public void onVisibilityChanged(boolean isVisible) { + setSelected(isVisible); + } + /** * Subclasses should override this method to return the {@link RoleManager} role associated * with this button. @@ -440,4 +447,9 @@ public class CarSystemBarButton extends LinearLayout { icon.setAlpha(mHighlightWhenSelected && mSelected ? mSelectedAlpha : mUnselectedAlpha); } } + + @Nullable + protected UserTracker getUserTracker() { + return mUserTracker; + } } |