Merge "NfcTile: Update style to match current UI" am: 2c4007641b

Change-Id: Ia971357809197ca87e20e26cf8cb1c03edbfc657
This commit is contained in:
Automerger Merge Worker
2020-03-11 20:22:52 +00:00
3 changed files with 5 additions and 35 deletions

View File

@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:width="48dp"
android:height="48dp"
android:viewportWidth="24"
android:viewportHeight="24">

View File

@@ -1,31 +0,0 @@
<!--
Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M4 20h16V4H4v16z" />
<path
android:fillColor="#4DFFFFFF"
android:pathData="M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1 .9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0
18H4V4h16v16zM18 6h-5c-1.1 0-2 .9-2 2v2.28c-.6 .35 -1 .98-1 1.72 0 1.1 .9 2 2
2s2-.9 2-2c0-.74-.4-1.38-1-1.72V8h3v8H8V8h2V6H6v12h12V6z" />
<path
android:pathData="M0 0h24v24H0z" />
</vector>

View File

@@ -38,6 +38,8 @@ import javax.inject.Inject;
/** Quick settings tile: Enable/Disable NFC **/
public class NfcTile extends QSTileImpl<BooleanState> {
private final Icon mIcon = ResourceIcon.get(R.drawable.ic_qs_nfc);
private NfcAdapter mAdapter;
private boolean mListening;
@@ -105,8 +107,7 @@ public class NfcTile extends QSTileImpl<BooleanState> {
state.state = getAdapter() == null
? Tile.STATE_UNAVAILABLE
: state.value ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE;
state.icon = ResourceIcon.get(
state.value ? R.drawable.ic_qs_nfc_enabled : R.drawable.ic_qs_nfc_disabled);
state.icon = mIcon;
state.label = mContext.getString(R.string.quick_settings_nfc_label);
state.expandedAccessibilityClassName = Switch.class.getName();
state.contentDescription = state.label;