Skip to content

Commit 5a3dbb5

Browse files
author
Lalit Sharma
committed
Fix: Adjust GPS coordinates for Gibraltar and add settle time before capturing screenshots
1 parent 1933183 commit 5a3dbb5

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/wearos-emulator-screenshots.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,10 @@ jobs:
247247
exit 1
248248
fi
249249
250+
# Extra settle time so the Wear app picks up emulator geo changes
251+
# before we deep-link and capture the first screenshot.
252+
LOCATION_SETTLE_SECONDS=12
253+
250254
sdk_root="${ANDROID_SDK_ROOT:-${ANDROID_HOME:-}}"
251255
if [ -z "$sdk_root" ] || [ ! -d "$sdk_root" ]; then
252256
echo "ANDROID_SDK_ROOT/ANDROID_HOME is not configured."
@@ -529,8 +533,8 @@ jobs:
529533
}
530534
531535
set_emulator_geo_gibraltar() {
532-
local lat="36.1408"
533-
local lon="-5.3536"
536+
local lat="36.1319"
537+
local lon="-5.3409"
534538
echo "Setting emulator GPS to Gibraltar: lat=$lat, lon=$lon"
535539
536540
# Use emulator console command
@@ -655,16 +659,20 @@ jobs:
655659
case "$url" in
656660
*gibraltar-between-c1-c3*)
657661
echo "Detected gibraltar-between-c1-c3 scenario"
658-
set_emulator_time_utc "2027-08-02T08:23:09Z"
659662
set_emulator_geo_gibraltar
660-
echo "Waiting 2 seconds for time/GPS changes to propagate..."
663+
echo "Waiting ${LOCATION_SETTLE_SECONDS}s for GPS changes to propagate..."
664+
sleep "$LOCATION_SETTLE_SECONDS"
665+
set_emulator_time_utc "2027-08-02T08:18:36Z"
666+
echo "Waiting 2 seconds for UTC time change to propagate..."
661667
sleep 2
662668
;;
663669
*gibraltar-max*)
664670
echo "Detected gibraltar-max scenario"
665-
set_emulator_time_utc "2027-08-02T08:47:59Z"
666671
set_emulator_geo_gibraltar
667-
echo "Waiting 2 seconds for time/GPS changes to propagate..."
672+
echo "Waiting ${LOCATION_SETTLE_SECONDS}s for GPS changes to propagate..."
673+
sleep "$LOCATION_SETTLE_SECONDS"
674+
set_emulator_time_utc "2027-08-02T08:48:00Z"
675+
echo "Waiting 2 seconds for UTC time change to propagate..."
668676
sleep 2
669677
;;
670678
esac

0 commit comments

Comments
 (0)