1/*
2 * Copyright 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package androidx.wear.ambient;
18
19import static org.junit.Assert.assertFalse;
20import static org.junit.Assert.assertTrue;
21
22import android.support.test.filters.MediumTest;
23import android.support.test.rule.ActivityTestRule;
24import android.support.test.runner.AndroidJUnit4;
25
26import androidx.wear.widget.util.WakeLockRule;
27
28import com.google.android.wearable.compat.WearableActivityController;
29
30import org.junit.Rule;
31import org.junit.Test;
32import org.junit.runner.RunWith;
33
34@MediumTest
35@RunWith(AndroidJUnit4.class)
36public class AmbientModeSupportResumeTest {
37    @Rule
38    public final WakeLockRule mWakeLock = new WakeLockRule();
39
40    @Rule
41    public final ActivityTestRule<AmbientModeSupportResumeTestActivity> mActivityRule =
42            new ActivityTestRule<>(AmbientModeSupportResumeTestActivity.class);
43
44    @Test
45    public void testActivityDefaults() throws Throwable {
46        assertTrue(WearableActivityController.getLastInstance().isAutoResumeEnabled());
47        assertFalse(WearableActivityController.getLastInstance().isAmbientEnabled());
48    }
49}
50