Unregister wallpaper visibility listener when nav bar view is destroyed

- The wallpaper visibility listener is only registered but never
  unregistered, and the RemoteCallbackList isn't enough to manage this
  since all instances belong to the same instance of the SysUI process.

Fixes: 79181718
Test: Change configuration to recreate the nav bar and ensure the old
      nav bar transition wallpaper visibility listener is unregistered
      first

Change-Id: I08e1600a016f1ddff51fc2f67eb4ddced42963b6
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
index 10b019d..66486ce 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
@@ -307,7 +307,10 @@
     @Override
     public void onDestroyView() {
         super.onDestroyView();
-        mNavigationBarView.getLightTransitionsController().destroy(getContext());
+        if (mNavigationBarView != null) {
+            mNavigationBarView.getBarTransitions().destroy();
+            mNavigationBarView.getLightTransitionsController().destroy(getContext());
+        }
         mOverviewProxyService.removeCallback(mOverviewProxyListener);
         getContext().unregisterReceiver(mBroadcastReceiver);
     }