Allow for the lock screen to have a different set of nav buttons

Bug:74446022

Test: Manually. Test by switching users that have PINs set

Change-Id: Id956b0cfe76eba82235b82080c755489bdf67938
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/car/CarNavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/car/CarNavigationBarView.java
index b2cef16..9ed0929 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/car/CarNavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/car/CarNavigationBarView.java
@@ -36,10 +36,11 @@
  * in a linear layout.
  */
 class CarNavigationBarView extends LinearLayout {
-    private LinearLayout mNavButtons;
+    private View mNavButtons;
     private AlphaOptimizedImageButton mNotificationsButton;
     private CarStatusBar mCarStatusBar;
     private Context mContext;
+    private View mLockScreenButtons;
 
     public CarNavigationBarView(Context context, AttributeSet attrs) {
         super(context, attrs);
@@ -49,6 +50,7 @@
     @Override
     public void onFinishInflate() {
         mNavButtons = findViewById(R.id.nav_buttons);
+        mLockScreenButtons = findViewById(R.id.lock_screen_nav_buttons);
 
         mNotificationsButton = findViewById(R.id.notifications);
         if (mNotificationsButton != null) {
@@ -74,4 +76,28 @@
     protected void onNotificationsClick(View v) {
         mCarStatusBar.togglePanel();
     }
+
+    /**
+     * If there are buttons declared in the layout they will be shown and the normal
+     * Nav buttons will be hidden.
+     */
+    public void showKeyguardButtons() {
+        if (mLockScreenButtons == null) {
+            return;
+        }
+        mLockScreenButtons.setVisibility(View.VISIBLE);
+        mNavButtons.setVisibility(View.GONE);
+    }
+
+    /**
+     * If there are buttons declared in the layout they will be hidden and the normal
+     * Nav buttons will be shown.
+     */
+    public void hideKeyguardButtons() {
+        if (mLockScreenButtons == null) {
+            return;
+        }
+        mNavButtons.setVisibility(View.VISIBLE);
+        mLockScreenButtons.setVisibility(View.GONE);
+    }
 }