Merge "Make quick settings show the standard media router icon." into klp-dev
@@ -710,6 +710,7 @@ public class ImageView extends View {
|
|||||||
}
|
}
|
||||||
d.setLevel(mLevel);
|
d.setLevel(mLevel);
|
||||||
d.setLayoutDirection(getLayoutDirection());
|
d.setLayoutDirection(getLayoutDirection());
|
||||||
|
d.setVisible(getVisibility() == VISIBLE, true);
|
||||||
mDrawableWidth = d.getIntrinsicWidth();
|
mDrawableWidth = d.getIntrinsicWidth();
|
||||||
mDrawableHeight = d.getIntrinsicHeight();
|
mDrawableHeight = d.getIntrinsicHeight();
|
||||||
applyColorMod();
|
applyColorMod();
|
||||||
|
|||||||
@@ -1096,6 +1096,8 @@
|
|||||||
<java-symbol type="drawable" name="notification_template_icon_bg" />
|
<java-symbol type="drawable" name="notification_template_icon_bg" />
|
||||||
<java-symbol type="drawable" name="notification_template_icon_low_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_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="ic_media_route_disabled_holo_dark" />
|
||||||
<java-symbol type="drawable" name="cling_button" />
|
<java-symbol type="drawable" name="cling_button" />
|
||||||
<java-symbol type="drawable" name="cling_arrow_up" />
|
<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
|
// Remote Display
|
||||||
QuickSettingsBasicTile remoteDisplayTile
|
QuickSettingsBasicTile remoteDisplayTile
|
||||||
= new QuickSettingsBasicTile(mContext);
|
= new QuickSettingsBasicTile(mContext);
|
||||||
remoteDisplayTile.setImageResource(R.drawable.ic_qs_remote_display);
|
|
||||||
remoteDisplayTile.setOnClickListener(new View.OnClickListener() {
|
remoteDisplayTile.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
|||||||
@@ -686,8 +686,12 @@ class QuickSettingsModel implements BluetoothStateChangeCallback,
|
|||||||
MediaRouter.ROUTE_TYPE_REMOTE_DISPLAY);
|
MediaRouter.ROUTE_TYPE_REMOTE_DISPLAY);
|
||||||
boolean enabled = connectedRoute != null && (connectedRoute.getSupportedTypes()
|
boolean enabled = connectedRoute != null && (connectedRoute.getSupportedTypes()
|
||||||
& MediaRouter.ROUTE_TYPE_REMOTE_DISPLAY) != 0;
|
& MediaRouter.ROUTE_TYPE_REMOTE_DISPLAY) != 0;
|
||||||
if (!enabled) {
|
boolean connecting;
|
||||||
|
if (enabled) {
|
||||||
|
connecting = connectedRoute.isConnecting();
|
||||||
|
} else {
|
||||||
connectedRoute = null;
|
connectedRoute = null;
|
||||||
|
connecting = false;
|
||||||
final int count = mMediaRouter.getRouteCount();
|
final int count = mMediaRouter.getRouteCount();
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
MediaRouter.RouteInfo route = mMediaRouter.getRouteAt(i);
|
MediaRouter.RouteInfo route = mMediaRouter.getRouteAt(i);
|
||||||
@@ -701,11 +705,14 @@ class QuickSettingsModel implements BluetoothStateChangeCallback,
|
|||||||
mRemoteDisplayState.enabled = enabled;
|
mRemoteDisplayState.enabled = enabled;
|
||||||
if (connectedRoute != null) {
|
if (connectedRoute != null) {
|
||||||
mRemoteDisplayState.label = connectedRoute.getName().toString();
|
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 {
|
} else {
|
||||||
mRemoteDisplayState.label = mContext.getString(
|
mRemoteDisplayState.label = mContext.getString(
|
||||||
R.string.quick_settings_remote_display_no_connection_label);
|
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);
|
mRemoteDisplayCallback.refreshView(mRemoteDisplayTile, mRemoteDisplayState);
|
||||||
}
|
}
|
||||||
|
|||||||