diff options
author | Xiaohui Chen <xiaohuic@google.com> | 2017-01-26 11:37:28 -0800 |
---|---|---|
committer | Xiaohui Chen <xiaohuic@google.com> | 2017-01-26 20:02:21 +0000 |
commit | 3840922e3fbd500362b692e54d18e811eba7b972 (patch) | |
tree | d779f49a543402fc579c9ea5652d57aa3558012e | |
parent | 36874fa887d92b2b63ed9a0271852550cd11acba (diff) | |
download | platform_testing-3840922e3fbd500362b692e54d18e811eba7b972.tar.gz |
Fix appsmoke tests for Pixel Candroid-7.1.2_r9android-7.1.2_r8android-7.1.2_r6android-7.1.2_r5android-7.1.2_r4android-7.1.2_r39android-7.1.2_r38android-7.1.2_r37android-7.1.2_r36android-7.1.2_r33android-7.1.2_r32android-7.1.2_r30android-7.1.2_r3android-7.1.2_r29android-7.1.2_r28android-7.1.2_r27android-7.1.2_r25android-7.1.2_r24android-7.1.2_r23android-7.1.2_r2android-7.1.2_r19android-7.1.2_r18android-7.1.2_r17android-7.1.2_r16android-7.1.2_r15android-7.1.2_r14android-7.1.2_r13android-7.1.2_r12android-7.1.2_r11android-7.1.2_r10android-7.1.2_r1nougat-mr2.3-releasenougat-mr2.2-releasenougat-mr2.1-releasenougat-mr2-security-releasenougat-mr2-releasenougat-mr2-pixel-releasenougat-mr2-dev
Add Pixel C's launcher to the supported launcher strategies.
Test: adb shell am instrument -w \
-e class android.test.appsmoke.AppSmokeTest \
android.test.appsmoke/android.support.test.runner.AndroidJUnitRunner
Bug: 34434543
Change-Id: I01d8da657c74d9ecc545e5a0088404087d93f924
2 files changed, 30 insertions, 0 deletions
diff --git a/libraries/launcher-helper/src/android/support/test/launcherhelper/LauncherStrategyFactory.java b/libraries/launcher-helper/src/android/support/test/launcherhelper/LauncherStrategyFactory.java index 42848c4eb..cab96cdc9 100644 --- a/libraries/launcher-helper/src/android/support/test/launcherhelper/LauncherStrategyFactory.java +++ b/libraries/launcher-helper/src/android/support/test/launcherhelper/LauncherStrategyFactory.java @@ -43,6 +43,7 @@ public class LauncherStrategyFactory { registerLauncherStrategy(GoogleExperienceLauncherStrategy.class); registerLauncherStrategy(Launcher3Strategy.class); registerLauncherStrategy(NexusLauncherStrategy.class); + registerLauncherStrategy(PixelCLauncherStrategy.class); registerLauncherStrategy(LeanbackLauncherStrategy.class); registerLauncherStrategy(WearLauncherStrategy.class); } diff --git a/libraries/launcher-helper/src/android/support/test/launcherhelper/PixelCLauncherStrategy.java b/libraries/launcher-helper/src/android/support/test/launcherhelper/PixelCLauncherStrategy.java new file mode 100644 index 000000000..93b44ffcb --- /dev/null +++ b/libraries/launcher-helper/src/android/support/test/launcherhelper/PixelCLauncherStrategy.java @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * 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 + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.support.test.launcherhelper; + +/** + * Implementation of {@link ILauncherStrategy} to support Pixel C launcher + */ +public class PixelCLauncherStrategy extends NexusLauncherStrategy { + + private static final String LAUNCHER_PKG = "com.google.android.apps.pixelclauncher"; + + @Override + public String getSupportedLauncherPackage() { + return LAUNCHER_PKG; + } +} |