version:1.1

update:2021-10-19 17:27:09
fix:更换包名,自更新
add:加入极光推送,发送正在运行的app信息
This commit is contained in:
2021-10-19 17:31:16 +08:00
parent 5da934cf7e
commit 2462bafa85
703 changed files with 4983 additions and 4149 deletions

View File

@@ -19,7 +19,7 @@
-->
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.uiuios.tapl"
package="com.android.colorfulos.tapl"
>
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"/>

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.android.uiuios.tapl;
package com.android.colorfulos.tapl;
import androidx.test.uiautomator.By;
import androidx.test.uiautomator.UiObject2;
@@ -26,7 +26,7 @@ public class AddToHomeScreenPrompt {
AddToHomeScreenPrompt(LauncherInstrumentation launcher) {
mLauncher = launcher;
mWidgetCell = launcher.waitForLauncherObject(By.clazz(
"com.android.uiuios.widget.WidgetCell"));
"com.android.colorfulos.widget.WidgetCell"));
mLauncher.assertNotNull("Can't find widget cell object", mWidgetCell);
}

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.android.uiuios.tapl;
package com.android.colorfulos.tapl;
import android.graphics.Point;
import android.graphics.Rect;
@@ -26,8 +26,8 @@ import androidx.test.uiautomator.BySelector;
import androidx.test.uiautomator.Direction;
import androidx.test.uiautomator.UiObject2;
import com.android.uiuios.ResourceUtils;
import com.android.uiuios.testing.TestProtocol;
import com.android.colorfulos.ResourceUtils;
import com.android.colorfulos.testing.TestProtocol;
/**
* Operations on AllApps opened from Home. Also a parent for All Apps opened from Overview.

View File

@@ -14,16 +14,16 @@
* limitations under the License.
*/
package com.android.uiuios.tapl;
package com.android.colorfulos.tapl;
import static com.android.uiuios.testing.TestProtocol.OVERVIEW_STATE_ORDINAL;
import static com.android.colorfulos.testing.TestProtocol.OVERVIEW_STATE_ORDINAL;
import android.graphics.Point;
import androidx.annotation.NonNull;
import androidx.test.uiautomator.UiObject2;
import com.android.uiuios.testing.TestProtocol;
import com.android.colorfulos.testing.TestProtocol;
/**
* Operations on AllApps opened from Overview.

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.android.uiuios.tapl;
package com.android.colorfulos.tapl;
import android.graphics.Point;
import android.os.SystemClock;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.android.uiuios.tapl;
package com.android.colorfulos.tapl;
import static org.junit.Assert.assertTrue;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.android.uiuios.tapl;
package com.android.colorfulos.tapl;
import androidx.test.uiautomator.UiObject2;

View File

@@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.android.uiuios.tapl;
package com.android.colorfulos.tapl;
import static com.android.uiuios.testing.TestProtocol.BACKGROUND_APP_STATE_ORDINAL;
import static com.android.colorfulos.testing.TestProtocol.BACKGROUND_APP_STATE_ORDINAL;
import android.graphics.Point;
import android.os.SystemClock;
@@ -24,7 +24,7 @@ import android.view.MotionEvent;
import androidx.annotation.NonNull;
import com.android.uiuios.testing.TestProtocol;
import com.android.colorfulos.testing.TestProtocol;
/**
* Indicates the base state with a UI other than Overview running as foreground. It can also

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.android.uiuios.tapl;
package com.android.colorfulos.tapl;
import androidx.annotation.NonNull;
import androidx.test.uiautomator.BySelector;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.android.uiuios.tapl;
package com.android.colorfulos.tapl;
import android.widget.FrameLayout;

View File

@@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.android.uiuios.tapl;
package com.android.colorfulos.tapl;
import static com.android.uiuios.testing.TestProtocol.OVERVIEW_STATE_ORDINAL;
import static com.android.colorfulos.testing.TestProtocol.OVERVIEW_STATE_ORDINAL;
import androidx.annotation.NonNull;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.android.uiuios.tapl;
package com.android.colorfulos.tapl;
import android.graphics.Point;
@@ -23,7 +23,7 @@ import androidx.test.uiautomator.BySelector;
import androidx.test.uiautomator.UiObject2;
import androidx.test.uiautomator.Until;
import com.android.uiuios.testing.TestProtocol;
import com.android.colorfulos.testing.TestProtocol;
/**
* Ancestor for AppIcon and AppMenuItem.

View File

@@ -14,16 +14,16 @@
* limitations under the License.
*/
package com.android.uiuios.tapl;
package com.android.colorfulos.tapl;
import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_ENABLED;
import static android.content.pm.PackageManager.DONT_KILL_APP;
import static android.content.pm.PackageManager.MATCH_ALL;
import static android.content.pm.PackageManager.MATCH_DISABLED_COMPONENTS;
import static com.android.uiuios.tapl.TestHelpers.getOverviewPackageName;
import static com.android.uiuios.testing.TestProtocol.BACKGROUND_APP_STATE_ORDINAL;
import static com.android.uiuios.testing.TestProtocol.NORMAL_STATE_ORDINAL;
import static com.android.colorfulos.tapl.TestHelpers.getOverviewPackageName;
import static com.android.colorfulos.testing.TestProtocol.BACKGROUND_APP_STATE_ORDINAL;
import static com.android.colorfulos.testing.TestProtocol.NORMAL_STATE_ORDINAL;
import android.app.ActivityManager;
import android.app.Instrumentation;
@@ -60,7 +60,7 @@ import androidx.test.uiautomator.UiDevice;
import androidx.test.uiautomator.UiObject2;
import androidx.test.uiautomator.Until;
import com.android.uiuios.testing.TestProtocol;
import com.android.colorfulos.testing.TestProtocol;
import com.android.systemui.shared.system.QuickStepContract;
import org.junit.Assert;

View File

@@ -14,14 +14,14 @@
* limitations under the License.
*/
package com.android.uiuios.tapl;
package com.android.colorfulos.tapl;
import static com.android.uiuios.testing.TestProtocol.ALL_APPS_STATE_ORDINAL;
import static com.android.colorfulos.testing.TestProtocol.ALL_APPS_STATE_ORDINAL;
import androidx.annotation.NonNull;
import androidx.test.uiautomator.UiObject2;
import com.android.uiuios.tapl.LauncherInstrumentation.ContainerType;
import com.android.colorfulos.tapl.LauncherInstrumentation.ContainerType;
/**
* Overview pane.

View File

@@ -14,14 +14,14 @@
* limitations under the License.
*/
package com.android.uiuios.tapl;
package com.android.colorfulos.tapl;
import android.graphics.Rect;
import androidx.test.uiautomator.UiObject2;
import androidx.test.uiautomator.Until;
import com.android.uiuios.testing.TestProtocol;
import com.android.colorfulos.testing.TestProtocol;
/**
* A recent task in the overview panel carousel.

View File

@@ -14,7 +14,7 @@
* the License.
*/
package com.android.uiuios.tapl;
package com.android.colorfulos.tapl;
import static androidx.test.InstrumentationRegistry.getInstrumentation;
import static androidx.test.InstrumentationRegistry.getTargetContext;
@@ -45,7 +45,7 @@ public class TestHelpers {
// If we are in the same process, we can instantiate the class name.
try {
Class launcherClazz = Class.forName("com.android.uiuios.Launcher");
Class launcherClazz = Class.forName("com.android.colorfulos.Launcher");
return launcherClazz.isAssignableFrom(Class.forName(info.name));
} catch (Exception e) {
return false;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.android.uiuios.tapl;
package com.android.colorfulos.tapl;
import androidx.test.uiautomator.UiObject2;

View File

@@ -14,12 +14,12 @@
* limitations under the License.
*/
package com.android.uiuios.tapl;
package com.android.colorfulos.tapl;
import androidx.test.uiautomator.Direction;
import androidx.test.uiautomator.UiObject2;
import com.android.uiuios.ResourceUtils;
import com.android.colorfulos.ResourceUtils;
/**
* All widgets container.

View File

@@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.android.uiuios.tapl;
package com.android.colorfulos.tapl;
import static com.android.uiuios.testing.TestProtocol.ALL_APPS_STATE_ORDINAL;
import static com.android.colorfulos.testing.TestProtocol.ALL_APPS_STATE_ORDINAL;
import static junit.framework.TestCase.assertTrue;
@@ -31,7 +31,7 @@ import androidx.test.uiautomator.By;
import androidx.test.uiautomator.Direction;
import androidx.test.uiautomator.UiObject2;
import com.android.uiuios.testing.TestProtocol;
import com.android.colorfulos.testing.TestProtocol;
/**
* Operations on the workspace screen.
@@ -226,7 +226,7 @@ public final class Workspace extends Home {
@Nullable
public Widget tryGetWidget(String label, long timeout) {
final UiObject2 widget = mLauncher.tryWaitForLauncherObject(
By.clazz("com.android.uiuios.widget.LauncherAppWidgetHostView").desc(label),
By.clazz("com.android.colorfulos.widget.LauncherAppWidgetHostView").desc(label),
timeout);
return widget != null ? new Widget(mLauncher, widget) : null;
}
@@ -234,7 +234,7 @@ public final class Workspace extends Home {
@Nullable
public Widget tryGetPendingWidget(long timeout) {
final UiObject2 widget = mLauncher.tryWaitForLauncherObject(
By.clazz("com.android.uiuios.widget.PendingAppWidgetHostView"), timeout);
By.clazz("com.android.colorfulos.widget.PendingAppWidgetHostView"), timeout);
return widget != null ? new Widget(mLauncher, widget) : null;
}
}