summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/testing
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2019-10-01 19:48:05 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2019-10-01 19:48:05 +0000
commit08776ada1e37c4b424893306c058b1de9f85903f (patch)
tree10e0c2de2c2b445ff25022d5655f38de212be8fc /src/com/android/launcher3/testing
parent872a380b59c5489b864e9001be899383e6b6bfa0 (diff)
parent7371e4da6846e532592ac14f3a9ab12576a29a1c (diff)
downloadandroid_packages_apps_Trebuchet-08776ada1e37c4b424893306c058b1de9f85903f.tar.gz
android_packages_apps_Trebuchet-08776ada1e37c4b424893306c058b1de9f85903f.tar.bz2
android_packages_apps_Trebuchet-08776ada1e37c4b424893306c058b1de9f85903f.zip
Merge "Waiting for Launcher model load in out-of-proc tests." into ub-launcher3-qt-qpr1-dev
Diffstat (limited to 'src/com/android/launcher3/testing')
-rw-r--r--src/com/android/launcher3/testing/TestInformationHandler.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/launcher3/testing/TestInformationHandler.java b/src/com/android/launcher3/testing/TestInformationHandler.java
index 790a2e844..9965572bd 100644
--- a/src/com/android/launcher3/testing/TestInformationHandler.java
+++ b/src/com/android/launcher3/testing/TestInformationHandler.java
@@ -27,6 +27,7 @@ import com.android.launcher3.DeviceProfile;
import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherAppState;
+import com.android.launcher3.LauncherModel;
import com.android.launcher3.LauncherState;
import com.android.launcher3.MainThreadExecutor;
import com.android.launcher3.R;
@@ -82,7 +83,7 @@ public class TestInformationHandler implements ResourceBasedOverride {
}
case TestProtocol.REQUEST_IS_LAUNCHER_INITIALIZED: {
- response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD, true);
+ response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD, isLauncherInitialized());
break;
}
@@ -152,4 +153,9 @@ public class TestInformationHandler implements ResourceBasedOverride {
}
return response;
}
+
+ protected boolean isLauncherInitialized() {
+ final LauncherModel model = LauncherAppState.getInstance(mContext).getModel();
+ return model.getCallback() == null || model.isModelLoaded();
+ }
} \ No newline at end of file