mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
Merge "Adding flickerlib test" into ub-launcher3-master
This commit is contained in:
committed by
Android (Google) Code Review
commit
f3fd35d5f2
@@ -30,6 +30,7 @@ import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.LauncherActivityInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Process;
|
||||
@@ -368,11 +369,16 @@ public abstract class AbstractLauncherUiTest {
|
||||
mDevice.wait(Until.hasObject(selector), DEFAULT_UI_TIMEOUT));
|
||||
}
|
||||
|
||||
public static String resolveSystemApp(String category) {
|
||||
public static ActivityInfo resolveSystemAppInfo(String category) {
|
||||
return getInstrumentation().getContext().getPackageManager().resolveActivity(
|
||||
new Intent(Intent.ACTION_MAIN).addCategory(category),
|
||||
PackageManager.MATCH_SYSTEM_ONLY).
|
||||
activityInfo.packageName;
|
||||
activityInfo;
|
||||
}
|
||||
|
||||
|
||||
public static String resolveSystemApp(String category) {
|
||||
return resolveSystemAppInfo(category).packageName;
|
||||
}
|
||||
|
||||
protected void closeLauncherActivity() {
|
||||
|
||||
Reference in New Issue
Block a user