$ demo on|off [hhmm]
Enable or disable the demo mode on a connected Android device or emulator. You can also pass in a custom value for the system clock in the HHMM format (only used when you use the on command).
| import kotlinx.coroutines.Dispatchers | |
| import kotlinx.coroutines.test.TestCoroutineDispatcher | |
| import kotlinx.coroutines.test.TestCoroutineScope | |
| import kotlinx.coroutines.test.resetMain | |
| import kotlinx.coroutines.test.setMain | |
| import org.junit.jupiter.api.extension.AfterAllCallback | |
| import org.junit.jupiter.api.extension.AfterEachCallback | |
| import org.junit.jupiter.api.extension.BeforeAllCallback | |
| import org.junit.jupiter.api.extension.ExtendWith | |
| import org.junit.jupiter.api.extension.ExtensionContext |
| /* | |
| * Copyright 2016 Google Inc. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
$ demo on|off [hhmm]
Enable or disable the demo mode on a connected Android device or emulator. You can also pass in a custom value for the system clock in the HHMM format (only used when you use the on command).
| public class TextViewDrawableSize extends TextView { | |
| private static final int DEFAULT_COMPOUND_DRAWABLE_SIZE = -1; | |
| private int compoundDrawableWidth; | |
| private int compoundDrawableHeight; | |
| public TextViewDrawableSize(Context context) { | |
| this(context, null); | |
| } | |
| public TextViewDrawableSize(Context context, AttributeSet attrs) { |
| import org.junit.rules.TestRule; | |
| import org.junit.runner.Description; | |
| import org.junit.runners.model.Statement; | |
| /** Got flaky tests? Shampoo them away. */ | |
| public final class ShampooRule implements TestRule { | |
| private final int iterations; | |
| public ShampooRule(int iterations) { | |
| if (iterations < 1) throw new IllegalArgumentException("iterations < 1: " + iterations); |
| #kryo | |
| -dontwarn sun.reflect.** | |
| -dontwarn java.beans.** | |
| -keep,allowshrinking class com.esotericsoftware.** { | |
| <fields>; | |
| <methods>; | |
| } | |
| -keep,allowshrinking class java.beans.** { *; } | |
| -keep,allowshrinking class sun.reflect.** { *; } | |
| -keep,allowshrinking class com.esotericsoftware.kryo.** { *; } |
| /* | |
| * Copyright 2014 Chris Banes | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |