Include common names for Magisk app in list of flashable zip files.
We introduce a new XML element prfxfilter for file name prefix
filtering, e.g. Magisk- .
The file is first matched against the list of extensions and, if there's
no match, then matched against the list of prefixes. An extension or
prefix may be equal to the whole filename.
Change-Id: I46a985c7298799793911948bc74296bebb306d9e
(cherry picked from commit 88e9c6ef052cd0ec71658ca42e8d70f0aabe07ac)
diff --git a/gui/theme/common/landscape.xml b/gui/theme/common/landscape.xml
index 5ffa146..8221fa4 100755
--- a/gui/theme/common/landscape.xml
+++ b/gui/theme/common/landscape.xml
@@ -311,6 +311,7 @@
<placement x="%col2_x_left%" y="%row1a_y%" w="%fileselector_install_width%" h="%fileselector_install_height%"/>
<text>%tw_zip_location%</text>
<filter extn=".zip;.ozip;.ZIP;.OZIP" folders="0" files="1"/>
+ <prfxfilter prfx="Magisk-;Magisk.apk;app-release.apk;app-debug.apk" folders="1" files="1"/>
<path name="tw_zip_location" default="/sdcard"/>
<data name="tw_filename"/>
<selection name="tw_file"/>
diff --git a/gui/theme/common/portrait.xml b/gui/theme/common/portrait.xml
index 3a11170..d5318fb 100755
--- a/gui/theme/common/portrait.xml
+++ b/gui/theme/common/portrait.xml
@@ -268,6 +268,7 @@
<placement x="%indent%" y="%row3_y%" w="%content_width%" h="%fileselector_install_height%"/>
<text>%tw_zip_location%</text>
<filter extn=".zip;.ozip;.ZIP;.OZIP" folders="1" files="1"/>
+ <prfxfilter prfx="Magisk-;Magisk.apk;app-release.apk;app-debug.apk" folders="1" files="1"/>
<path name="tw_zip_location" default="/sdcard"/>
<data name="tw_filename"/>
<selection name="tw_file"/>
diff --git a/gui/theme/common/watch.xml b/gui/theme/common/watch.xml
index 7debf3a..5a7c225 100755
--- a/gui/theme/common/watch.xml
+++ b/gui/theme/common/watch.xml
@@ -399,6 +399,7 @@
<placement x="%indent%" y="%row2_header_y%" w="%content_width%" h="%fileselector_install_height%"/>
<text>%tw_zip_location%</text>
<filter extn=".zip;.ozip;.ZIP;.OZIP" folders="1" files="1"/>
+ <prfxfilter prfx="Magisk-;Magisk.apk;app-release.apk;app-debug.apk" folders="1" files="1"/>
<path name="tw_zip_location" default="/sdcard"/>
<data name="tw_filename"/>
<selection name="tw_file"/>