Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f27ff68d authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

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

Change-Id: Ia971357809197ca87e20e26cf8cb1c03edbfc657
parents bd96ea25 2c400764
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -14,8 +14,8 @@
     limitations under the License.
     limitations under the License.
-->
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:width="48dp"
    android:height="24dp"
    android:height="48dp"
    android:viewportWidth="24"
    android:viewportWidth="24"
    android:viewportHeight="24">
    android:viewportHeight="24">


+0 −31
Original line number Original line Diff line number Diff line
<!--
     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>
+3 −2
Original line number Original line Diff line number Diff line
@@ -38,6 +38,8 @@ import javax.inject.Inject;
/** Quick settings tile: Enable/Disable NFC **/
/** Quick settings tile: Enable/Disable NFC **/
public class NfcTile extends QSTileImpl<BooleanState> {
public class NfcTile extends QSTileImpl<BooleanState> {


    private final Icon mIcon = ResourceIcon.get(R.drawable.ic_qs_nfc);

    private NfcAdapter mAdapter;
    private NfcAdapter mAdapter;


    private boolean mListening;
    private boolean mListening;
@@ -105,8 +107,7 @@ public class NfcTile extends QSTileImpl<BooleanState> {
        state.state = getAdapter() == null
        state.state = getAdapter() == null
                ? Tile.STATE_UNAVAILABLE
                ? Tile.STATE_UNAVAILABLE
                : state.value ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE;
                : state.value ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE;
        state.icon = ResourceIcon.get(
        state.icon = mIcon;
                state.value ? R.drawable.ic_qs_nfc_enabled : R.drawable.ic_qs_nfc_disabled);
        state.label = mContext.getString(R.string.quick_settings_nfc_label);
        state.label = mContext.getString(R.string.quick_settings_nfc_label);
        state.expandedAccessibilityClassName = Switch.class.getName();
        state.expandedAccessibilityClassName = Switch.class.getName();
        state.contentDescription = state.label;
        state.contentDescription = state.label;