Redmi K40S 当前需求要求打开手机热点并获取ssid跟password, 使用 wifiManager.startLocalOnlyHotspot(localOnlyHotspotCallback, new Handler());方法,可以在系统回调中获取ssid跟password,但是手机热点无法打开。 对应的权限如下
也动态让用户去打开了系统设置开关。 华为手机上是正常的,小米真的是一堆问题,有谁能解答一下原因吗? 查看log有如下报错,但是不清楚具体原因 09-07 17:34:21.506 1854 3073 I Tethering: adding IpServer for: wlan1 09-07 17:34:21.584 1854 3073 I Tethering: [BpfCoordinator] Monitoring started 09-07 17:34:21.598 1854 3073 I Tethering: [BpfCoordinator] Polling started 09-07 17:34:26.602 1854 3073 E Tethering: [api31.BpfCoordinatorShimImpl] ERROR Fail to fetch tethering stats from BPF map: : getNextMapKey failed: EBADF (Bad file descriptor) 09-07 17:34:26.602 1854 3073 E Tethering: android.system.ErrnoException: getNextMapKey failed: EBADF (Bad file descriptor) 09-07 17:34:26.602 1854 3073 E Tethering: at com.android.networkstack.tethering.BpfMap.getNextMapKey(Native Method) 09-07 17:34:26.602 1854 3073 E Tethering: at com.android.networkstack.tethering.BpfMap.getNextRawKey(BpfMap.java:199) 09-07 17:34:26.602 1854 3073 E Tethering: at com.android.networkstack.tethering.BpfMap.getNextKeyInternal(BpfMap.java:177) 09-07 17:34:26.602 1854 3073 E Tethering: at com.android.networkstack.tethering.BpfMap.getFirstKey(BpfMap.java:206) 09-07 17:34:26.602 1854 3073 E Tethering: at com.android.networkstack.tethering.BpfMap.forEach(BpfMap.java:243) 09-07 17:34:26.602 1854 3073 E Tethering: at com.android.networkstack.tethering.apishim.api31.BpfCoordinatorShimImpl.tetherOffloadGetStats(BpfCoordinatorShimImpl.java:241) 09-07 17:34:26.602 1854 3073 E Tethering: at com.android.networkstack.tethering.BpfCoordinator.updateForwardedStats(BpfCoordinator.java:1844) 09-07 17:34:26.602 1854 3073 E Tethering: at com.android.networkstack.tethering.BpfCoordinator.lambda$new
0
(
B
p
f
C
o
o
r
d
i
n
a
t
o
r
.
j
a
v
a
:
249
)
09
?
0717
:
34
:
26.60218543073
E
T
e
t
h
e
r
i
n
g
:
a
t
c
o
m
.
a
n
d
r
o
i
d
.
n
e
t
w
o
r
k
s
t
a
c
k
.
t
e
t
h
e
r
i
n
g
.
B
p
f
C
o
o
r
d
i
n
a
t
o
r
.
0(BpfCoordinator.java:249) 09-07 17:34:26.602 1854 3073 E Tethering: at com.android.networkstack.tethering.BpfCoordinator.
0(BpfCoordinator.java:249)09?0717:34:26.60218543073ETethering:atcom.android.networkstack.tethering.BpfCoordinator.r8$lambda
11
z
i
2
s
o
53
?
t
P
l
R
p
K
n
l
S
k
W
O
p
x
R
e
o
(
U
n
k
n
o
w
n
S
o
u
r
c
e
:
0
)
09
?
0717
:
34
:
26.60218543073
E
T
e
t
h
e
r
i
n
g
:
a
t
c
o
m
.
a
n
d
r
o
i
d
.
n
e
t
w
o
r
k
s
t
a
c
k
.
t
e
t
h
e
r
i
n
g
.
B
p
f
C
o
o
r
d
i
n
a
t
o
r
11zi2so53-tPlRpKnlSkWOpxReo(Unknown Source:0) 09-07 17:34:26.602 1854 3073 E Tethering: at com.android.networkstack.tethering.BpfCoordinator
11zi2so53?tPlRpKnlSkWOpxReo(UnknownSource:0)09?0717:34:26.60218543073ETethering:atcom.android.networkstack.tethering.BpfCoordinator$ExternalSyntheticLambda0.run(Unknown Source:2) 09-07 17:34:26.602 1854 3073 E Tethering: at android.os.Handler.handleCallback(Handler.java:938) 09-07 17:34:26.602 1854 3073 E Tethering: at android.os.Handler.dispatchMessage(Handler.java:99) 09-07 17:34:26.602 1854 3073 E Tethering: at android.os.Looper.loopOnce(Looper.java:210) 09-07 17:34:26.602 1854 3073 E Tethering: at android.os.Looper.loop(Looper.java:299) 09-07 17:34:26.602 1854 3073 E Tethering: at android.os.HandlerThread.run(HandlerThread.java:67) 09-07 17:34:26.602 1854 3073 E Tethering: [BpfCoordinator] ERROR Problem fetching tethering stats
有没有大佬帮忙解答一下。感谢!
|