OSDN Git Service

Get rid of spurious gear icon in BT details page
authorAntony Sargent <asargent@google.com>
Fri, 7 Jul 2017 18:09:24 +0000 (11:09 -0700)
committerAntony Sargent <asargent@google.com>
Fri, 7 Jul 2017 18:31:43 +0000 (11:31 -0700)
The problem is that we were calling done() on the EntityHeaderController
and passing false for whether to rebind the action buttons, which means
we were getting the default behavior including a visible gear
icon. Passing true to request rebinding causes that icon to be hidden.

Bug: 63405635
Test: make RunSettingsRoboTests
Change-Id: I031f4a2d176ff3be025cc2675d7026a679936b03

src/com/android/settings/bluetooth/BluetoothDetailsHeaderController.java
tests/robotests/src/com/android/settings/bluetooth/BluetoothDetailsHeaderControllerTest.java

index 74f95fe..2a5da3a 100644 (file)
@@ -64,7 +64,7 @@ public class BluetoothDetailsHeaderController extends BluetoothDetailsController
     @Override
     protected void refresh() {
         setHeaderProperties();
-        mHeaderController.done(mFragment.getActivity(), false);
+        mHeaderController.done(mFragment.getActivity(), true /* rebindActions */);
     }
 
     @Override
index 7e9a0b6..a50f8bf 100644 (file)
@@ -81,7 +81,7 @@ public class BluetoothDetailsHeaderControllerTest extends BluetoothDetailsContro
         verify(mHeaderController).setIcon(any(Drawable.class));
         verify(mHeaderController).setIconContentDescription(any(String.class));
         verify(mHeaderController).setSummary(any(String.class));
-        verify(mHeaderController).done(mActivity, false);
+        verify(mHeaderController).done(mActivity, true);
     }
 
     @Test