Update dependencies
This commit is contained in:
@@ -18,7 +18,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "com.android.tools.build:gradle:$androidPluginVersion"
|
classpath "com.android.tools.build:gradle:$androidPluginVersion"
|
||||||
classpath 'com.github.ben-manes:gradle-versions-plugin:0.18.0'
|
classpath 'com.github.ben-manes:gradle-versions-plugin:0.20.0'
|
||||||
classpath 'com.google.gms:google-services:4.0.1'
|
classpath 'com.google.gms:google-services:4.0.1'
|
||||||
classpath 'io.fabric.tools:gradle:1.25.4'
|
classpath 'io.fabric.tools:gradle:1.25.4'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
||||||
|
|||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-all.zip
|
||||||
|
|||||||
@@ -74,10 +74,10 @@ class RepeaterService : Service(), WifiP2pManager.ChannelListener, SharedPrefere
|
|||||||
fun requestGroupUpdate() {
|
fun requestGroupUpdate() {
|
||||||
group = null
|
group = null
|
||||||
try {
|
try {
|
||||||
p2pManager.requestPersistentGroupInfo(channel, {
|
p2pManager.requestPersistentGroupInfo(channel) {
|
||||||
groups = it
|
groups = it
|
||||||
if (it.size == 1) group = it.single()
|
if (it.size == 1) group = it.single()
|
||||||
})
|
}
|
||||||
} catch (e: ReflectiveOperationException) {
|
} catch (e: ReflectiveOperationException) {
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
Crashlytics.logException(e)
|
Crashlytics.logException(e)
|
||||||
@@ -186,7 +186,7 @@ class RepeaterService : Service(), WifiP2pManager.ChannelListener, SharedPrefere
|
|||||||
registerReceiver(receiver, intentFilter(WifiP2pManager.WIFI_P2P_STATE_CHANGED_ACTION,
|
registerReceiver(receiver, intentFilter(WifiP2pManager.WIFI_P2P_STATE_CHANGED_ACTION,
|
||||||
WifiP2pManager.WIFI_P2P_CONNECTION_CHANGED_ACTION))
|
WifiP2pManager.WIFI_P2P_CONNECTION_CHANGED_ACTION))
|
||||||
receiverRegistered = true
|
receiverRegistered = true
|
||||||
p2pManager.requestGroupInfo(channel, {
|
p2pManager.requestGroupInfo(channel) {
|
||||||
when {
|
when {
|
||||||
it == null -> doStart()
|
it == null -> doStart()
|
||||||
it.isGroupOwner -> if (routingManager == null) doStart(it)
|
it.isGroupOwner -> if (routingManager == null) doStart(it)
|
||||||
@@ -202,7 +202,7 @@ class RepeaterService : Service(), WifiP2pManager.ChannelListener, SharedPrefere
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
else -> startFailure(getString(R.string.repeater_p2p_unavailable))
|
else -> startFailure(getString(R.string.repeater_p2p_unavailable))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,10 +89,12 @@ class RepeaterManager(private val parent: TetheringFragment) : Manager(), Servic
|
|||||||
val dialog = AlertDialog.Builder(parent.requireContext())
|
val dialog = AlertDialog.Builder(parent.requireContext())
|
||||||
.setTitle(R.string.repeater_wps_dialog_title)
|
.setTitle(R.string.repeater_wps_dialog_title)
|
||||||
.setView(R.layout.dialog_wps)
|
.setView(R.layout.dialog_wps)
|
||||||
.setPositiveButton(android.R.string.ok, { dialog, _ -> binder?.startWps((dialog as AppCompatDialog)
|
.setPositiveButton(android.R.string.ok) { dialog, _ ->
|
||||||
.findViewById<EditText>(android.R.id.edit)!!.text.toString()) })
|
binder?.startWps((dialog as AppCompatDialog)
|
||||||
|
.findViewById<EditText>(android.R.id.edit)!!.text.toString())
|
||||||
|
}
|
||||||
.setNegativeButton(android.R.string.cancel, null)
|
.setNegativeButton(android.R.string.cancel, null)
|
||||||
.setNeutralButton(R.string.repeater_wps_dialog_pbc, { _, _ -> binder?.startWps(null) })
|
.setNeutralButton(R.string.repeater_wps_dialog_pbc) { _, _ -> binder?.startWps(null) }
|
||||||
.create()
|
.create()
|
||||||
dialog.window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE)
|
dialog.window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE)
|
||||||
dialog.show()
|
dialog.show()
|
||||||
|
|||||||
@@ -105,16 +105,16 @@ object WifiP2pManagerHelper {
|
|||||||
fun WifiP2pManager.requestPersistentGroupInfo(c: WifiP2pManager.Channel,
|
fun WifiP2pManager.requestPersistentGroupInfo(c: WifiP2pManager.Channel,
|
||||||
listener: (Collection<WifiP2pGroup>) -> Unit) {
|
listener: (Collection<WifiP2pGroup>) -> Unit) {
|
||||||
val proxy = Proxy.newProxyInstance(interfacePersistentGroupInfoListener.classLoader,
|
val proxy = Proxy.newProxyInstance(interfacePersistentGroupInfoListener.classLoader,
|
||||||
arrayOf(interfacePersistentGroupInfoListener), { proxy, method, args ->
|
arrayOf(interfacePersistentGroupInfoListener)) { proxy, method, args ->
|
||||||
if (method.name == "onPersistentGroupInfoAvailable") {
|
if (method.name == "onPersistentGroupInfoAvailable") {
|
||||||
if (args.size != 1) Crashlytics.log(Log.WARN, TAG, "Unexpected args: $args")
|
if (args.size != 1) Crashlytics.log(Log.WARN, TAG, "Unexpected args: $args")
|
||||||
listener(getGroupList.invoke(args[0]) as Collection<WifiP2pGroup>)
|
listener(getGroupList.invoke(args[0]) as Collection<WifiP2pGroup>)
|
||||||
null
|
null
|
||||||
} else {
|
} else {
|
||||||
Crashlytics.log(Log.WARN, TAG, "Unexpected method, calling super: $method")
|
Crashlytics.log(Log.WARN, TAG, "Unexpected method, calling super: $method")
|
||||||
ProxyBuilder.callSuper(proxy, method, args)
|
ProxyBuilder.callSuper(proxy, method, args)
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
requestPersistentGroupInfo.invoke(this, c, proxy)
|
requestPersistentGroupInfo.invoke(this, c, proxy)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:inputType="number"
|
android:inputType="number"
|
||||||
|
android:importantForAutofill="no"
|
||||||
tools:text="12345678">
|
tools:text="12345678">
|
||||||
<requestFocus/>
|
<requestFocus/>
|
||||||
</EditText>
|
</EditText>
|
||||||
|
|||||||
Reference in New Issue
Block a user