Skip to content

Commit ece85ec

Browse files
author
SBALAVIGNESH123
committed
Fix: TOCTOU race condition in WearableSettingsActivity
1 parent 7b4047c commit ece85ec

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

play-services-wearable/core/src/main/java/org/microg/gms/wearable/WearableSettingsActivity.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ private void refreshList() {
5151
}
5252

5353
Set<String> connectedNodes = null;
54-
if (WearableService.impl != null) {
55-
connectedNodes = WearableService.impl.getConnectedNodes();
54+
WearableImpl service = WearableService.impl;
55+
if (service != null) {
56+
connectedNodes = service.getConnectedNodes();
5657
}
5758

5859
for (BluetoothDevice device : bondedDevices) {

0 commit comments

Comments
 (0)