MediaRouter: drop the control section if there is no media metadata and playback control

This change implements the "No media or controls available" state in the spec doc.

Bug: 23363578
Change-Id: I7aa8a1dbb06cbe1696af4950f7615ac6583685ad
diff --git a/v7/mediarouter/src/android/support/v7/app/MediaRouteControllerDialog.java b/v7/mediarouter/src/android/support/v7/app/MediaRouteControllerDialog.java
index 7bdafe3..75c49fa 100644
--- a/v7/mediarouter/src/android/support/v7/app/MediaRouteControllerDialog.java
+++ b/v7/mediarouter/src/android/support/v7/app/MediaRouteControllerDialog.java
@@ -600,11 +600,12 @@
                     mItemViews.remove(mVolumeControl);
                     notifyDataSetChanged();
                 }
+                mControlView.setVisibility(mItemViews.isEmpty() ? View.GONE : View.VISIBLE);
             }
         }
 
         public void updatePlaybackControl() {
-            if (mCustomControlView == null) {
+            if (mCustomControlView == null && (mDescription != null || mState != null)) {
                 if (!mItemViews.contains(mPlaybackControl)) {
                     mItemViews.add(0, mPlaybackControl);
                     notifyDataSetChanged();
@@ -654,6 +655,7 @@
                 mItemViews.remove(mPlaybackControl);
                 notifyDataSetChanged();
             }
+            mControlView.setVisibility(mItemViews.isEmpty() ? View.GONE : View.VISIBLE);
         }
     }