Update doc for Android Q
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
<uses-permission android:name="android.permission.WRITE_SETTINGS"
|
||||
tools:ignore="ProtectedPermissions"/>
|
||||
<uses-permission-sdk-23 android:name="android.permission.ACCESS_COARSE_LOCATION"/>
|
||||
<!-- Required since Android Q -->
|
||||
<!-- Required since API 29 -->
|
||||
<uses-permission-sdk-23 android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
||||
|
||||
<application
|
||||
|
||||
@@ -53,7 +53,7 @@ class RepeaterService : Service(), WifiP2pManager.ChannelListener, SharedPrefere
|
||||
}
|
||||
}
|
||||
val supported get() = p2pManager != null
|
||||
@Deprecated("Not initialized and no use at all since Android Q")
|
||||
@Deprecated("Not initialized and no use at all since API 29")
|
||||
var persistentSupported = false
|
||||
|
||||
var networkName: String?
|
||||
@@ -87,7 +87,7 @@ class RepeaterService : Service(), WifiP2pManager.ChannelListener, SharedPrefere
|
||||
groupChanged(value)
|
||||
}
|
||||
val groupChanged = StickyEvent1 { group }
|
||||
@Deprecated("Not initialized and no use at all since Android Q")
|
||||
@Deprecated("Not initialized and no use at all since API 29")
|
||||
var thisDevice: WifiP2pDevice? = null
|
||||
|
||||
fun startWps(pin: String? = null) {
|
||||
@@ -127,7 +127,7 @@ class RepeaterService : Service(), WifiP2pManager.ChannelListener, SharedPrefere
|
||||
intent.getParcelableExtra(WifiP2pManager.EXTRA_WIFI_P2P_GROUP)!!)
|
||||
}
|
||||
}
|
||||
@Deprecated("No longer used since Android Q")
|
||||
@Deprecated("No longer used since API 29")
|
||||
@Suppress("DEPRECATION")
|
||||
private val deviceListener = broadcastReceiver { _, intent ->
|
||||
when (intent.action) {
|
||||
@@ -169,7 +169,7 @@ class RepeaterService : Service(), WifiP2pManager.ChannelListener, SharedPrefere
|
||||
|
||||
override fun onBind(intent: Intent) = binder
|
||||
|
||||
@Deprecated("No longer used since Android Q")
|
||||
@Deprecated("No longer used since API 29")
|
||||
@Suppress("DEPRECATION")
|
||||
private fun setOperatingChannel(oc: Int = operatingChannel) = try {
|
||||
val channel = channel
|
||||
@@ -200,13 +200,13 @@ class RepeaterService : Service(), WifiP2pManager.ChannelListener, SharedPrefere
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated("No longer used since Android Q")
|
||||
@Deprecated("No longer used since API 29")
|
||||
@Suppress("DEPRECATION")
|
||||
override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?) {
|
||||
if (key == KEY_OPERATING_CHANNEL) setOperatingChannel()
|
||||
}
|
||||
|
||||
@Deprecated("No longer used since Android Q")
|
||||
@Deprecated("No longer used since API 29")
|
||||
@Suppress("DEPRECATION")
|
||||
private fun onPersistentGroupsChanged() {
|
||||
val channel = channel ?: return
|
||||
|
||||
@@ -119,7 +119,7 @@ class RepeaterManager(private val parent: TetheringFragment) : Manager(), Servic
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated("No longer used since Android Q")
|
||||
@Deprecated("No longer used since API 29")
|
||||
@Suppress("DEPRECATION")
|
||||
class ConfigHolder : ViewModel() {
|
||||
var config: P2pSupplicantConfiguration? = null
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.lang.reflect.Proxy
|
||||
|
||||
object WifiP2pManagerHelper {
|
||||
const val UNSUPPORTED = -2
|
||||
@Deprecated("No longer used since Android Q")
|
||||
@Deprecated("No longer used since API 29")
|
||||
const val WIFI_P2P_PERSISTENT_GROUPS_CHANGED_ACTION = "android.net.wifi.p2p.PERSISTENT_GROUPS_CHANGED"
|
||||
|
||||
/**
|
||||
@@ -25,7 +25,7 @@ object WifiP2pManagerHelper {
|
||||
WifiP2pManager::class.java.getDeclaredMethod("setWifiP2pChannels", WifiP2pManager.Channel::class.java,
|
||||
Int::class.java, Int::class.java, WifiP2pManager.ActionListener::class.java)
|
||||
}
|
||||
@Deprecated("No longer used since Android Q")
|
||||
@Deprecated("No longer used since API 29")
|
||||
fun WifiP2pManager.setWifiP2pChannels(c: WifiP2pManager.Channel, lc: Int, oc: Int,
|
||||
listener: WifiP2pManager.ActionListener) {
|
||||
try {
|
||||
@@ -64,7 +64,7 @@ object WifiP2pManagerHelper {
|
||||
WifiP2pManager::class.java.getDeclaredMethod("deletePersistentGroup",
|
||||
WifiP2pManager.Channel::class.java, Int::class.java, WifiP2pManager.ActionListener::class.java)
|
||||
}
|
||||
@Deprecated("No longer used since Android Q")
|
||||
@Deprecated("No longer used since API 29")
|
||||
fun WifiP2pManager.deletePersistentGroup(c: WifiP2pManager.Channel, netId: Int,
|
||||
listener: WifiP2pManager.ActionListener) {
|
||||
try {
|
||||
@@ -91,7 +91,7 @@ object WifiP2pManagerHelper {
|
||||
* @param c is the channel created at {@link #initialize}
|
||||
* @param listener for callback when persistent group info list is available. Can be null.
|
||||
*/
|
||||
@Deprecated("No longer used since Android Q")
|
||||
@Deprecated("No longer used since API 29")
|
||||
fun WifiP2pManager.requestPersistentGroupInfo(c: WifiP2pManager.Channel,
|
||||
listener: (Collection<WifiP2pGroup>) -> Unit) {
|
||||
val proxy = Proxy.newProxyInstance(interfacePersistentGroupInfoListener.classLoader,
|
||||
@@ -114,6 +114,6 @@ object WifiP2pManagerHelper {
|
||||
* Source: https://android.googlesource.com/platform/frameworks/base/+/android-4.2_r1/wifi/java/android/net/wifi/p2p/WifiP2pGroup.java#253
|
||||
*/
|
||||
private val getNetworkId by lazy { WifiP2pGroup::class.java.getDeclaredMethod("getNetworkId") }
|
||||
@Deprecated("No longer used since Android Q")
|
||||
@Deprecated("No longer used since API 29")
|
||||
val WifiP2pGroup.netId get() = getNetworkId.invoke(this) as Int
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.lang.IllegalStateException
|
||||
* https://android.googlesource.com/platform/external/wpa_supplicant_8/+/d2986c2/wpa_supplicant/config.c#488
|
||||
* https://android.googlesource.com/platform/external/wpa_supplicant_8/+/6fa46df/wpa_supplicant/config_file.c#182
|
||||
*/
|
||||
@Deprecated("No longer used since Android Q")
|
||||
@Deprecated("No longer used since API 29")
|
||||
class P2pSupplicantConfiguration(private val group: WifiP2pGroup, ownerAddress: String?) {
|
||||
companion object {
|
||||
private const val TAG = "P2pSupplicantConfiguration"
|
||||
|
||||
Reference in New Issue
Block a user