From befadf45e7c91a9bda15c4835bf4489b974c6d75 Mon Sep 17 00:00:00 2001 From: Quentin Hibon Date: Mon, 13 Dec 2021 23:37:15 +0100 Subject: [PATCH] Set time properly on API 31 --- .../androidTest/java/org/isoron/uhabits/BaseAndroidTest.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/uhabits-android/src/androidTest/java/org/isoron/uhabits/BaseAndroidTest.kt b/uhabits-android/src/androidTest/java/org/isoron/uhabits/BaseAndroidTest.kt index ee7a1a332..38bf157a7 100644 --- a/uhabits-android/src/androidTest/java/org/isoron/uhabits/BaseAndroidTest.kt +++ b/uhabits-android/src/androidTest/java/org/isoron/uhabits/BaseAndroidTest.kt @@ -191,6 +191,10 @@ abstract class BaseAndroidTest : TestCase() { device.executeShellCommand("date $date") device.executeShellCommand("date $date") + // Apparently needed on API31 + device.executeShellCommand("su root date $date") + device.executeShellCommand("su root date $date") + // Set time (method 2) // Run in addition to the method above because one of these mail fail, depending // on the Android API version.