fix various lint warnings

pull/250/head
Kevin Hester 2021-02-21 11:34:43 +08:00
rodzic 09fb7f220d
commit 4a90bb2fc0
27 zmienionych plików z 89 dodań i 89 usunięć

Wyświetl plik

@ -413,7 +413,7 @@ class MainActivity : AppCompatActivity(), Logging,
// pager.offscreenPageLimit = 0 // Don't keep any offscreen pages around, because we want to make sure our bluetooth scanning stops
TabLayoutMediator(binding.tabLayout, binding.pager) { tab, position ->
// tab.text = tabInfos[position].text // I think it looks better with icons only
tab.icon = getDrawable(tabInfos[position].icon)
tab.icon = ContextCompat.getDrawable(this, tabInfos[position].icon)
}.attach()
model.isConnected.observe(this, Observer { connected ->

Wyświetl plik

@ -5,6 +5,7 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.core.content.ContextCompat
import androidx.fragment.app.activityViewModels
import androidx.lifecycle.Observer
import com.geeksville.android.GeeksvilleApplication
@ -157,7 +158,7 @@ class MapFragment : ScreenFragment("Map"), Logging {
if (view != null) { // it might have gone away by now
// val markerIcon = BitmapFactory.decodeResource(context.resources, R.drawable.ic_twotone_person_pin_24)
val markerIcon =
requireActivity().getDrawable(R.drawable.ic_twotone_person_pin_24)!!
ContextCompat.getDrawable(requireActivity(), R.drawable.ic_twotone_person_pin_24)!!
map.setStyle(Style.OUTDOORS) { style ->
style.addSource(nodePositions)

Wyświetl plik

@ -107,7 +107,7 @@ private fun requestBonding(
class BTScanModel(app: Application) : AndroidViewModel(app), Logging {
private val context = getApplication<Application>().applicationContext
private val context: Context get() = getApplication<Application>().applicationContext
init {
debug("BTScanModel created")

Wyświetl plik

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 690 B

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 690 B

Wyświetl plik

@ -1,63 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/packets_recyclerview"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="8dp"
android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbars="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/clearButton"
tools:itemCount="8"
tools:listitem="@layout/adapter_packet_layout" />
<Button
android:id="@+id/clearButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:text="@string/clear_last_messages"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.button.MaterialButton
android:id="@+id/closeButton"
style="@style/Widget.MaterialComponents.Button.Icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:insetLeft="0dp"
android:insetTop="0dp"
android:insetRight="0dp"
android:insetBottom="0dp"
app:backgroundTint="#D1D1D1"
app:icon="@android:drawable/ic_menu_close_clear_cancel"
app:iconPadding="0dp"
app:iconSize="24dp"
app:iconTint="#000000"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:shapeAppearanceOverlay="@style/Meshtastic.Button.Rounded" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/debug_last_messages"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/packets_recyclerview"
app:layout_constraintEnd_toStartOf="@+id/clearButton"
app:layout_constraintStart_toEndOf="@+id/closeButton"
app:layout_constraintTop_toTopOf="parent" />
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/packets_recyclerview"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="8dp"
android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbars="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/clearButton"
tools:itemCount="8"
tools:listitem="@layout/adapter_packet_layout" />
<Button
android:id="@+id/clearButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:text="@string/clear_last_messages"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.button.MaterialButton
android:id="@+id/closeButton"
style="@style/Widget.MaterialComponents.Button.Icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:insetLeft="0dp"
android:insetTop="0dp"
android:insetRight="0dp"
android:insetBottom="0dp"
app:backgroundTint="#D1D1D1"
app:icon="@android:drawable/ic_menu_close_clear_cancel"
app:iconPadding="0dp"
app:iconSize="24dp"
app:iconTint="#000000"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:shapeAppearanceOverlay="@style/Meshtastic.Button.Rounded" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/debug_last_messages"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/packets_recyclerview"
app:layout_constraintEnd_toStartOf="@+id/clearButton"
app:layout_constraintStart_toEndOf="@+id/closeButton"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

Wyświetl plik

@ -6,7 +6,7 @@
android:layout_height="match_parent"
android:id="@+id/mapFrame"> <!-- tab layout requires a unique ID -->
<com.mapbox.mapboxsdk.maps.MapView xmlns:android="http://schemas.android.com/apk/res/android"
<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
android:layout_width="match_parent"
android:layout_height="match_parent"

Wyświetl plik

@ -8,8 +8,7 @@
android:fillViewport="true"
tools:context=".MainActivity">
<androidx.constraintlayout.widget.ConstraintLayout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

Wyświetl plik

@ -16,7 +16,7 @@
<string name="username_unset">Benutzername nicht gesetzt</string>
<string name="your_name">Dein Name</string>
<string name="analytics_okay">Anonyme Nutzungsstatistiken und Absturzberichte.</string>
<string name="looking_for_meshtastic_devices">Suche nach Meshtastic Geräten...</string>
<string name="looking_for_meshtastic_devices">Suche nach Meshtastic Geräten</string>
<string name="requires_bluetooth">Diese Anwendung erfordert Bluetooth-Zugang. Bitte gewähren Sie Zugriff in den Android-Einstellungen.</string>
<string name="error_bluetooth">Fehler - dieses Programm erfordert Bluetooth!</string>
<string name="starting_pairing">Pairing beginnen</string>

Wyświetl plik

@ -18,7 +18,7 @@
<string name="username_unset">Nombre de usuario sin configurar</string>
<string name="your_name">Tu nombre</string>
<string name="analytics_okay">Estadísticas de uso anónimo e informes de fallos.</string>
<string name="looking_for_meshtastic_devices">Buscando dispositivos Meshtastic...</string>
<string name="looking_for_meshtastic_devices">Buscando dispositivos Meshtastic</string>
<string name="test__devname1" translatable="false">Meshtastic_ac23</string>
<string name="test_devname2" translatable="false">Meshtastic_1267</string>
<string name="requires_bluetooth">Esta aplicación requiere acceso a bluetooth. Por favor conceda acceso en la configuración de Android.</string>

Wyświetl plik

@ -16,7 +16,7 @@
<string name="username_unset">Käyttäjänimi asettamatta</string>
<string name="your_name">Nimesi</string>
<string name="analytics_okay">Nimettömät käyttötilastot ja kaatumisraportit.</string>
<string name="looking_for_meshtastic_devices">Etsii Meshtastic laiteita...</string>
<string name="looking_for_meshtastic_devices">Etsii Meshtastic laiteita</string>
<string name="requires_bluetooth">Tämä sovellus edellyttää Bluetoothin sallimista. Salli lupa Androidin asetuksista.</string>
<string name="error_bluetooth">Virhe - tämä sovellus edellyttää Bluetoothia</string>
<string name="starting_pairing">Yhdistää laitteeseen</string>

Wyświetl plik

@ -16,7 +16,7 @@
<string name="username_unset">Ainm úsáideora díshocraithe</string>
<string name="your_name">D\'ainm</string>
<string name="analytics_okay">Staitisticí úsáide gan ainm agus tuairiscí tuairteála.</string>
<string name="looking_for_meshtastic_devices">Ag lorg gléasanna Meshtastic ...</string>
<string name="looking_for_meshtastic_devices">Ag lorg gléasanna Meshtastic </string>
<string name="requires_bluetooth">Éilíonn an feidhmchlár seo rochtain bluetooth. Tabhair rochtain i suíomhanna android le do thoil.</string>
<string name="error_bluetooth">Earráid - éilíonn an aip seo bluetooth</string>
<string name="starting_pairing">Ag tosú ag péireáil</string>

Wyświetl plik

@ -16,7 +16,7 @@
<string name="username_unset">Non itilizatè a pa konfigire</string>
<string name="your_name">Non Ou</string>
<string name="analytics_okay">Statistik itilizasyon anonim ak rapò aksidantèl.</string>
<string name="looking_for_meshtastic_devices">Ap chache pou aparèy Meshtastic...</string>
<string name="looking_for_meshtastic_devices">Ap chache pou aparèy Meshtastic</string>
<string name="requires_bluetooth">Aplikasyon sa a mande pou aksè Bloutouf. Tanpri bay aksè nan paramèt android.</string>
<string name="error_bluetooth">Erè - aplikasyon sa a mande pou Bloutouf</string>
<string name="starting_pairing">Kòmanse koneksyon</string>

Wyświetl plik

@ -16,7 +16,7 @@
<string name="username_unset">Nome utente non impostato</string>
<string name="your_name">Il tuo nome</string>
<string name="analytics_okay">Le statistiche di utilizzo e i rapporti sugli arresti anomali sono anonimi</string>
<string name="looking_for_meshtastic_devices">Ricerca di dispositivi Meshtastic...</string>
<string name="looking_for_meshtastic_devices">Ricerca di dispositivi Meshtastic</string>
<string name="requires_bluetooth">Questa applicazione richiede l\'accesso Bluetooth, si prega di dare l\'accesso nelle impostazioni android.</string>
<string name="error_bluetooth">Errore - questa applicazione richiede il bluetooth</string>
<string name="starting_pairing">Inizio abbinamento</string>

Wyświetl plik

@ -16,7 +16,7 @@
<string name="username_unset">ユーザー名削除</string>
<string name="your_name">ユーザー名</string>
<string name="analytics_okay">匿名の診断情報と不具合報告</string>
<string name="looking_for_meshtastic_devices">Meshtasticデバイスを検索中...</string>
<string name="looking_for_meshtastic_devices">Meshtasticデバイスを検索中</string>
<string name="requires_bluetooth">このアプリはBluetooth通信が必要です。無線とネットワーク設定によりBluetoothをオンにしてください。</string>
<string name="error_bluetooth">エラー - このアプリはBluetooth通信が必要です。</string>
<string name="starting_pairing">ペアとして設定中</string>

Wyświetl plik

@ -16,7 +16,7 @@
<string name="username_unset">사용자 이름 해제</string>
<string name="your_name">이름</string>
<string name="analytics_okay">익며의 사용 통계와 충돌 보고서</string>
<string name="looking_for_meshtastic_devices">Meshtastic 장치 찾는 중...</string>
<string name="looking_for_meshtastic_devices">Meshtastic 장치 찾는 중</string>
<string name="requires_bluetooth">본 앱은 블루투스에 대한 접근 권한이 필요합니다. 안드로이드 설정에서 권한을 부여하세요.</string>
<string name="error_bluetooth">에러 - 본 앱은 블루투스를 필요로 합니다.</string>
<string name="starting_pairing">페어링 시작</string>

Wyświetl plik

@ -16,7 +16,7 @@
<string name="username_unset">Gebruikersnaam terugzetten</string>
<string name="your_name">Je Naam</string>
<string name="analytics_okay">Anonieme gebruikersnaam en foutrapporten.</string>
<string name="looking_for_meshtastic_devices">Zoekt Meshtastic apparaten...</string>
<string name="looking_for_meshtastic_devices">Zoekt Meshtastic apparaten</string>
<string name="requires_bluetooth">Deze applicatie vereist bluetooth toegang. Geef toegang in android settings.</string>
<string name="error_bluetooth">Fout - deze app vereist bluetooth</string>
<string name="starting_pairing">Start koppeling</string>

Wyświetl plik

@ -16,7 +16,7 @@
<string name="username_unset">Brukernavn ikke satt</string>
<string name="your_name">Ditt Navn</string>
<string name="analytics_okay">Anonym brukerstatistikk og kræsjrapporter.</string>
<string name="looking_for_meshtastic_devices">Ser etter Meshtastic enheter...</string>
<string name="looking_for_meshtastic_devices">Ser etter Meshtastic enheter</string>
<string name="test__devname1" translatable="false">Meshtastic_ac23</string>
<string name="test_devname2" translatable="false">Meshtastic_1267</string>
<string name="requires_bluetooth">Denne applikasjonen krever blåtann tilgang.Vennligst gi tilgang i android instillinger.</string>

Wyświetl plik

@ -17,7 +17,7 @@
<string name="username_unset">Nome indefinido</string>
<string name="your_name">O seu Nome</string>
<string name="analytics_okay">Estatísticas de uso anônimas e relatórios de falhas.</string>
<string name="looking_for_meshtastic_devices">A procurar dispositivos Meshtastic...</string>
<string name="looking_for_meshtastic_devices">A procurar dispositivos Meshtastic</string>
<string name="test__devname1" translatable="false">Meshtastic_ac23</string>
<string name="test_devname2" translatable="false">Meshtastic_1267</string>
<string name="requires_bluetooth">Esta aplicação requer acesso ao Bluetooth. Por favor conceda acesso nas opções do android.</string>

Wyświetl plik

@ -16,7 +16,7 @@
<string name="username_unset">Username nesetat</string>
<string name="your_name">Numele tău</string>
<string name="analytics_okay">Trimite în mod anonim statistici de utilizare și reporturi de crash.</string>
<string name="looking_for_meshtastic_devices">Caut dispozitive Meshtastic...</string>
<string name="looking_for_meshtastic_devices">Caut dispozitive Meshtastic</string>
<string name="requires_bluetooth">Această aplicație necesită access la bluetooth. Te rog acordă accesul în setările telefonului.</string>
<string name="error_bluetooth">Eroare - această aplicație necesită bluetooth</string>
<string name="starting_pairing">Încep să mă conectez</string>

Wyświetl plik

@ -16,7 +16,7 @@
<string name="username_unset">Имя пользователя не установлено</string>
<string name="your_name">Ваше имя</string>
<string name="analytics_okay">Анонимная статистика использования и отчеты о сбоях.</string>
<string name="looking_for_meshtastic_devices">Поиск устройств Meshtastic...</string>
<string name="looking_for_meshtastic_devices">Поиск устройств Meshtastic</string>
<string name="requires_bluetooth">Это приложение требует доступа к Bluetooth. Пожалуйста, предоставьте доступ в настройках Android.</string>
<string name="error_bluetooth">Ошибка - для работы приложения требуется bluetooth</string>
<string name="starting_pairing">Сопряжение</string>

Wyświetl plik

@ -16,7 +16,7 @@
<string name="username_unset">Uporabnik ni nastavljen</string>
<string name="your_name">Tvoje ime</string>
<string name="analytics_okay">Anonimna statistika uporabe in poročila o zrušitvah.</string>
<string name="looking_for_meshtastic_devices">Iščem Meshtastic naprave...</string>
<string name="looking_for_meshtastic_devices">Iščem Meshtastic naprave</string>
<string name="requires_bluetooth">Ta aplikacija zahteva dostop do bluetooth. Dovolite dostop v nastavitvah za Android.</string>
<string name="error_bluetooth">Napaka - aplikacija potrebuje Bluetooth povezavo</string>
<string name="starting_pairing">Začetek seznanjanja naprav</string>

Wyświetl plik

@ -16,7 +16,7 @@
<string name="username_unset">Emri i përdoruesit është i pa konfiguruar</string>
<string name="your_name">Emri juaj</string>
<string name="analytics_okay">Statistikat e përdorimit dhe raportet e keq funksionimit mblidhen në mënyre krejtësisht anonime</string>
<string name="looking_for_meshtastic_devices">Në kërkim për paisje Meshtastic...</string>
<string name="looking_for_meshtastic_devices">Në kërkim për paisje Meshtastic</string>
<string name="requires_bluetooth">Ky aplikacion kërkon leje për ndezjen e Bluetooth, ju lutem jepni të drejten e aksesit tek menuja e konfigurimit të android.</string>
<string name="error_bluetooth">Errore - Ky aplikacion kërkon paisjen Bluetooth</string>
<string name="starting_pairing">Duke filluar lidhjen</string>

Wyświetl plik

@ -16,7 +16,7 @@
<string name="username_unset">Användarnamn inte tillgänglig</string>
<string name="your_name">Ditt Namn</string>
<string name="analytics_okay">Anonym användningsstatistik och kraschrapporter.</string>
<string name="looking_for_meshtastic_devices">Letar efter Meshtastic-enheter...</string>
<string name="looking_for_meshtastic_devices">Letar efter Meshtastic-enheter</string>
<string name="requires_bluetooth">Denna applikation kräver Bluetooth-åtkomst. Vänligen ge åtkomst i Android-inställningar.</string>
<string name="error_bluetooth">Fel - den här appen kräver Bluetooth</string>
<string name="starting_pairing">Börjar para ihop</string>

Wyświetl plik

@ -16,7 +16,7 @@
<string name="username_unset">Kullanıcı adını kaldır</string>
<string name="your_name">Adınız</string>
<string name="analytics_okay">Anonim kullanim istatistikleri ve hata raporları.</string>
<string name="looking_for_meshtastic_devices">Meshtastic cihazları aranıyor...</string>
<string name="looking_for_meshtastic_devices">Meshtastic cihazları aranıyor</string>
<string name="requires_bluetooth">Bu cihaz bluetooth erişimi gerektiriyor. Lütfen Android ayarlarından izin veriniz.</string>
<string name="error_bluetooth">Hata - bu uygulama bluetooth gerektiriyor</string>
<string name="starting_pairing">Eşleşme başlatılıyor</string>

Wyświetl plik

@ -17,7 +17,7 @@
<string name="username_unset">用户名未设置</string>
<string name="your_name">用户名</string>
<string name="analytics_okay">匿名上传崩溃报告.</string>
<string name="looking_for_meshtastic_devices">Mesh设备扫描中...</string>
<string name="looking_for_meshtastic_devices">Mesh设备扫描中</string>
<string name="test__devname1" translatable="false">Meshtastic_ac23</string>
<string name="test_devname2" translatable="false">Meshtastic_1267</string>
<string name="requires_bluetooth">此应用程序需要蓝牙权限.请在Android设置中授予权限.</string>

Wyświetl plik

@ -17,7 +17,7 @@
<string name="username_unset">Username unset</string>
<string name="your_name">Your Name</string>
<string name="analytics_okay">Anonymous usage statistics and crash reports.</string>
<string name="looking_for_meshtastic_devices">Looking for Meshtastic devices...</string>
<string name="looking_for_meshtastic_devices">Looking for Meshtastic devices</string>
<string name="test__devname1" translatable="false">Meshtastic_ac23</string>
<string name="test_devname2" translatable="false">Meshtastic_1267</string>
<string name="requires_bluetooth">This application requires bluetooth access. Please grant access in android settings.</string>
@ -76,7 +76,7 @@
<string name="debug_panel">Debug Panel</string>
<string name="debug_last_messages">500 last messages</string>
<string name="clear_last_messages">Clear</string>
<string name="updating_firmware">Updating firmware, wait up to eight minutes...</string>
<string name="updating_firmware">Updating firmware, wait up to eight minutes</string>
<string name="update_successful">Update successful</string>
<string name="update_failed">Update failed</string>
<string name="message_reception_time">message reception time</string>

Wyświetl plik

@ -42,7 +42,7 @@
product-id="29987" />
<!-- CDC driver -->
<usb-device vendor-id="9025" /> <!-- 0x2341 / ......: Arduino -->
<usb-device vendor-id="9025" /> <!-- 0x2341 / ……: Arduino -->
<usb-device
vendor-id="5824"
product-id="1155" /> <!-- 0x16C0 / 0x0483: Teensyduino -->