Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add test case for android:isAccessibilityTool #3426

Merged
merged 2 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@ public void xmlReferencesTest() throws BrutException {
compareXmlFiles("res/xml/references.xml");
}

@Test
public void xmlAccessibilityTest() throws BrutException {
compareXmlFiles("res/xml/accessibility_service_config.xml");
}

@Test
public void xmlXsdFileTest() throws BrutException {
compareXmlFiles("res/xml/ww_box_styles_schema.xsd");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ public void xmlXsdFileTest() throws BrutException {
compareXmlFiles("res/xml/ww_box_styles_schema.xsd");
}

@Test
public void xmlAccessibilityTest() throws BrutException {
compareXmlFiles("res/xml/accessibility_service_config.xml");
}

@Test
public void multipleDexTest() throws BrutException, IOException {
compareBinaryFolder("/smali_classes2", false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:appCategory="game" android:compileSdkVersion="23" android:compileSdkVersionCodename="6.0-2438415" package="brut.apktool.testapp" platformBuildVersionCode="23" platformBuildVersionName="6.0-2438415">
<uses-feature android:glEsVersion="0x00020000" />
<uses-feature android:glEsVersion="0x00030002" />
<application android:label="Issue2799 &amp; B">
<application android:label="Issue2799 &amp; B" android:isAccessibilityTool="false">
<service android:name=".MyAccessibilityService">
<meta-data
android:name="android.accessibilityservice"
android:resource="@xml/accessibility_service_config" />
</service>
<meta-data name="test_int_as_string" value="\ 12345" />
<meta-data name="test_int" value="12345" />
</application>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
android:isAccessibilityTool="true"
/>
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:appCategory="game" android:compileSdkVersion="23" android:compileSdkVersionCodename="6.0-2438415" package="brut.apktool.aapt1.testapp" platformBuildVersionCode="23" platformBuildVersionName="6.0-2438415">
<application android:label="Issue2799 &amp; B" android:enableOnBackInvokedCallback="true">
<application android:label="Issue2799 &amp; B" android:enableOnBackInvokedCallback="true" android:isAccessibilityTool="false">
<service android:name=".MyAccessibilityService">
<meta-data
android:name="android.accessibilityservice"
android:resource="@xml/accessibility_service_config" />
</service>
<meta-data name="test_int_as_string" value="\ 12345" />
<meta-data name="test_int" value="12345" />
</application>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
android:isAccessibilityTool="true"
/>