Commit Graph

2 Commits

Author SHA1 Message Date
hoffc
de3f413ecd Fix NPE force close if disabling BT feature
adapter can be null in some SPs which disable bluetooth feature
from framework, so it will lead to NPE force close in these SPs.

Add null check for adapter.

Bug: 345584461

Change-Id: I3fabe94a97cc9baf7b1739fe1c9160a52b50d7d4
2024-06-07 13:00:03 +08:00
Chaohui Wang
880068d23a Avoid ANR of TetherPreferenceController
Off load the following work from main thread,
- Calculate title
- Calculate summery

This also helps improve the latency.

Also migrate to registerTetheringEventCallback() since
TetheringManager.ACTION_TETHER_STATE_CHANGED is deprecated.

Fix: 311848767
Test: manual - on Network & internet page and turn on / off tethering
Test: unit tests
Change-Id: I6ee182b41ef51f691ea31938142be1a41faf5573
2023-11-29 12:06:37 +08:00