am 12c32b4d
: Merge "Make quick settings show the standard media router icon." into klp-dev
* commit '12c32b4d484cc7cc2278a76c6e0fc2304a74b593': Make quick settings show the standard media router icon.
@ -710,6 +710,7 @@ public class ImageView extends View {
|
||||
}
|
||||
d.setLevel(mLevel);
|
||||
d.setLayoutDirection(getLayoutDirection());
|
||||
d.setVisible(getVisibility() == VISIBLE, true);
|
||||
mDrawableWidth = d.getIntrinsicWidth();
|
||||
mDrawableHeight = d.getIntrinsicHeight();
|
||||
applyColorMod();
|
||||
|
@ -1096,6 +1096,8 @@
|
||||
<java-symbol type="drawable" name="notification_template_icon_bg" />
|
||||
<java-symbol type="drawable" name="notification_template_icon_low_bg" />
|
||||
<java-symbol type="drawable" name="ic_media_route_on_holo_dark" />
|
||||
<java-symbol type="drawable" name="ic_media_route_off_holo_dark" />
|
||||
<java-symbol type="drawable" name="ic_media_route_connecting_holo_dark" />
|
||||
<java-symbol type="drawable" name="ic_media_route_disabled_holo_dark" />
|
||||
<java-symbol type="drawable" name="cling_button" />
|
||||
<java-symbol type="drawable" name="cling_arrow_up" />
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 846 B |
Before Width: | Height: | Size: 806 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.5 KiB |
@ -673,7 +673,6 @@ class QuickSettings {
|
||||
// Remote Display
|
||||
QuickSettingsBasicTile remoteDisplayTile
|
||||
= new QuickSettingsBasicTile(mContext);
|
||||
remoteDisplayTile.setImageResource(R.drawable.ic_qs_remote_display);
|
||||
remoteDisplayTile.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
@ -686,8 +686,12 @@ class QuickSettingsModel implements BluetoothStateChangeCallback,
|
||||
MediaRouter.ROUTE_TYPE_REMOTE_DISPLAY);
|
||||
boolean enabled = connectedRoute != null && (connectedRoute.getSupportedTypes()
|
||||
& MediaRouter.ROUTE_TYPE_REMOTE_DISPLAY) != 0;
|
||||
if (!enabled) {
|
||||
boolean connecting;
|
||||
if (enabled) {
|
||||
connecting = connectedRoute.isConnecting();
|
||||
} else {
|
||||
connectedRoute = null;
|
||||
connecting = false;
|
||||
final int count = mMediaRouter.getRouteCount();
|
||||
for (int i = 0; i < count; i++) {
|
||||
MediaRouter.RouteInfo route = mMediaRouter.getRouteAt(i);
|
||||
@ -701,11 +705,14 @@ class QuickSettingsModel implements BluetoothStateChangeCallback,
|
||||
mRemoteDisplayState.enabled = enabled;
|
||||
if (connectedRoute != null) {
|
||||
mRemoteDisplayState.label = connectedRoute.getName().toString();
|
||||
mRemoteDisplayState.iconId = R.drawable.ic_qs_remote_display_connected;
|
||||
mRemoteDisplayState.iconId = connecting ?
|
||||
com.android.internal.R.drawable.ic_media_route_connecting_holo_dark :
|
||||
com.android.internal.R.drawable.ic_media_route_on_holo_dark;
|
||||
} else {
|
||||
mRemoteDisplayState.label = mContext.getString(
|
||||
R.string.quick_settings_remote_display_no_connection_label);
|
||||
mRemoteDisplayState.iconId = R.drawable.ic_qs_remote_display;
|
||||
mRemoteDisplayState.iconId =
|
||||
com.android.internal.R.drawable.ic_media_route_off_holo_dark;
|
||||
}
|
||||
mRemoteDisplayCallback.refreshView(mRemoteDisplayTile, mRemoteDisplayState);
|
||||
}
|
||||
|