Fix code styles

This commit is contained in:
Mygod
2018-04-21 13:16:39 -07:00
parent 958b1ec350
commit 4d58c81a30
3 changed files with 4 additions and 2 deletions

View File

@@ -104,7 +104,7 @@ class TetheringFragment : Fragment(), ServiceConnection {
VIEW_TYPE_WIFI -> R.string.tethering_manage_wifi VIEW_TYPE_WIFI -> R.string.tethering_manage_wifi
VIEW_TYPE_WIFI_LEGACY -> R.string.tethering_manage_wifi_legacy VIEW_TYPE_WIFI_LEGACY -> R.string.tethering_manage_wifi_legacy
VIEW_TYPE_BLUETOOTH -> R.string.tethering_manage_bluetooth VIEW_TYPE_BLUETOOTH -> R.string.tethering_manage_bluetooth
else -> throw IllegalStateException() else -> throw IllegalStateException("Unexpected view type")
}) })
binding.tetherListener = tetherListener binding.tetherListener = tetherListener
binding.type = tetherType binding.type = tetherType
@@ -155,7 +155,7 @@ class TetheringFragment : Fragment(), ServiceConnection {
override fun onTetheringStarted() = tetherListener.notifyPropertyChanged(BR.enabledTypes) override fun onTetheringStarted() = tetherListener.notifyPropertyChanged(BR.enabledTypes)
override fun onTetheringFailed() { override fun onTetheringFailed() {
app.handler.post { app.handler.post {
Toast.makeText(requireContext(), "Android system has failed to start tethering.", Toast.LENGTH_SHORT).show() Toast.makeText(requireContext(), R.string.tethering_manage_failed, Toast.LENGTH_SHORT).show()
} }
} }
} }

View File

@@ -45,6 +45,7 @@
<string name="tethering_manage_wifi">WLAN 热点</string> <string name="tethering_manage_wifi">WLAN 热点</string>
<string name="tethering_manage_wifi_legacy">WLAN 热点 (旧 API)</string> <string name="tethering_manage_wifi_legacy">WLAN 热点 (旧 API)</string>
<string name="tethering_manage_bluetooth">蓝牙网络共享</string> <string name="tethering_manage_bluetooth">蓝牙网络共享</string>
<string name="tethering_manage_failed">Android 系统无法打开网络共享。</string>
<string name="connected_devices">已连接设备</string> <string name="connected_devices">已连接设备</string>
<string name="connected_state_incomplete">%s (正在连接)</string> <string name="connected_state_incomplete">%s (正在连接)</string>

View File

@@ -47,6 +47,7 @@
<string name="tethering_manage_wifi">Wi\u2011Fi hotspot</string> <string name="tethering_manage_wifi">Wi\u2011Fi hotspot</string>
<string name="tethering_manage_wifi_legacy">Wi\u2011Fi hotspot (legacy)</string> <string name="tethering_manage_wifi_legacy">Wi\u2011Fi hotspot (legacy)</string>
<string name="tethering_manage_bluetooth">Bluetooth tethering</string> <string name="tethering_manage_bluetooth">Bluetooth tethering</string>
<string name="tethering_manage_failed">Android system has failed to start tethering.</string>
<string name="connected_devices">Connected devices</string> <string name="connected_devices">Connected devices</string>
<string name="connected_state_incomplete">%s (connecting)</string> <string name="connected_state_incomplete">%s (connecting)</string>