bug fix: correctly check for null strings in AutoFill Service

This commit is contained in:
Philipp Crocoll 2016-01-31 16:44:21 +01:00
parent b49fcb8ebe
commit 033ad06608
3 changed files with 79 additions and 52 deletions

View File

@ -55,8 +55,36 @@
<element signature="e#9518#9519#0" expanded="false" /> <element signature="e#9518#9519#0" expanded="false" />
<element signature="e#9591#9592#0" expanded="false" /> <element signature="e#9591#9592#0" expanded="false" />
<element signature="e#9647#9648#0" expanded="false" /> <element signature="e#9647#9648#0" expanded="false" />
<element signature="e#51293#51294#0" expanded="false" />
<element signature="e#51354#51355#0" expanded="false" />
<element signature="e#59864#59865#0" expanded="false" />
<element signature="e#59905#59906#0" expanded="false" />
<element signature="e#59939#59940#0" expanded="false" />
<element signature="e#59981#59982#0" expanded="false" />
<element signature="e#67589#67590#0" expanded="false" />
<element signature="e#67625#67626#0" expanded="false" />
<element signature="e#67674#67675#0" expanded="false" />
<element signature="e#67733#67734#0" expanded="false" />
<element signature="e#68330#68331#0" expanded="false" />
<element signature="e#68387#68388#0" expanded="false" />
<element signature="e#81359#81360#0" expanded="false" />
<element signature="e#81428#81429#0" expanded="false" />
<element signature="e#85149#85150#0" expanded="false" />
<element signature="e#85187#85188#0" expanded="false" />
<element signature="e#85712#85713#0" expanded="false" />
<element signature="e#85765#85766#0" expanded="false" />
<element signature="e#87861#87862#0" expanded="false" />
<element signature="e#87890#87891#0" expanded="false" />
<element signature="e#89833#89834#0" expanded="false" /> <element signature="e#89833#89834#0" expanded="false" />
<element signature="e#89875#89876#0" expanded="false" /> <element signature="e#89875#89876#0" expanded="false" />
<element signature="e#91923#91924#0" expanded="false" />
<element signature="e#91951#91952#0" expanded="false" />
<element signature="e#91993#91994#0" expanded="false" />
<element signature="e#92024#92025#0" expanded="false" />
<element signature="e#93068#93069#0" expanded="false" />
<element signature="e#93122#93123#0" expanded="false" />
<element signature="e#93163#93164#0" expanded="false" />
<element signature="e#93222#93223#0" expanded="false" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -106,7 +134,7 @@
<entry file="file://$PROJECT_DIR$/app/src/main/res/values/strings_autofill.xml"> <entry file="file://$PROJECT_DIR$/app/src/main/res/values/strings_autofill.xml">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0"> <state vertical-scroll-proportion="0.0">
<caret line="8" column="0" selection-start-line="8" selection-start-column="0" selection-end-line="8" selection-end-column="0" /> <caret line="6" column="70" selection-start-line="6" selection-start-column="70" selection-end-line="6" selection-end-column="70" />
<folding /> <folding />
</state> </state>
</provider> </provider>
@ -115,12 +143,10 @@
<file leaf-file-name="AutoFillService.java" pinned="false" current-in-tab="true"> <file leaf-file-name="AutoFillService.java" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/app/src/main/java/keepass2android/autofill/AutoFillService.java"> <entry file="file://$PROJECT_DIR$/app/src/main/java/keepass2android/autofill/AutoFillService.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.76775956"> <state vertical-scroll-proportion="0.33242506">
<caret line="219" column="0" selection-start-line="219" selection-start-column="0" selection-end-line="219" selection-end-column="0" /> <caret line="149" column="44" selection-start-line="149" selection-start-column="44" selection-end-line="149" selection-end-column="44" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#2880#2881#0" expanded="true" />
<element signature="e#2913#2914#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -141,13 +167,7 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0"> <state vertical-scroll-proportion="0.0">
<caret line="18" column="30" selection-start-line="18" selection-start-column="30" selection-end-line="18" selection-end-column="30" /> <caret line="18" column="30" selection-start-line="18" selection-start-column="30" selection-end-line="18" selection-end-column="30" />
<folding> <folding />
<element signature="imports" expanded="true" />
<element signature="e#362#363#0" expanded="true" />
<element signature="e#404#405#0" expanded="true" />
<element signature="e#438#439#0" expanded="true" />
<element signature="e#479#480#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -157,10 +177,7 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0"> <state vertical-scroll-proportion="0.0">
<caret line="54" column="0" selection-start-line="54" selection-start-column="0" selection-end-line="54" selection-end-column="0" /> <caret line="54" column="0" selection-start-line="54" selection-start-column="0" selection-end-line="54" selection-end-column="0" />
<folding> <folding />
<element signature="e#0#3436#0" expanded="false" />
<element signature="imports" expanded="false" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -1503,6 +1520,7 @@
<sortByType /> <sortByType />
</navigator> </navigator>
<panes> <panes>
<pane id="Scratches" />
<pane id="AndroidView"> <pane id="AndroidView">
<subPane> <subPane>
<PATH> <PATH>
@ -1517,7 +1535,6 @@
</PATH> </PATH>
</subPane> </subPane>
</pane> </pane>
<pane id="Scratches" />
<pane id="ProjectPane"> <pane id="ProjectPane">
<subPane> <subPane>
<PATH> <PATH>
@ -1749,13 +1766,14 @@
<window_info id="Palette&#9;" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Palette&#9;" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Designer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Designer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3270869" sideWeight="0.4969743" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Captures" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Captures" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32879046" sideWeight="0.5181543" order="7" side_tool="true" content_ui="tabs" /> <window_info id="Event Log" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3270869" sideWeight="0.5030257" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" /> <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Gradle Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" /> <window_info id="Gradle Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Build Variants" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" /> <window_info id="Build Variants" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32879046" sideWeight="0.48184568" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32879046" sideWeight="0.47579426" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Android" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32879046" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Android" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32879046" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32879046" sideWeight="0.4969743" order="6" side_tool="false" content_ui="tabs" /> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32879046" sideWeight="0.4969743" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Gradle" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Gradle" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
@ -1764,11 +1782,10 @@
<window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24886535" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24886535" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24962178" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24962178" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3270869" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
@ -1822,8 +1839,6 @@
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#2880#2881#0" expanded="true" />
<element signature="e#2913#2914#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -1840,13 +1855,7 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0"> <state vertical-scroll-proportion="0.0">
<caret line="18" column="30" selection-start-line="18" selection-start-column="30" selection-end-line="18" selection-end-column="30" /> <caret line="18" column="30" selection-start-line="18" selection-start-column="30" selection-end-line="18" selection-end-column="30" />
<folding> <folding />
<element signature="imports" expanded="true" />
<element signature="e#362#363#0" expanded="true" />
<element signature="e#404#405#0" expanded="true" />
<element signature="e#438#439#0" expanded="true" />
<element signature="e#479#480#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -1854,10 +1863,7 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0"> <state vertical-scroll-proportion="0.0">
<caret line="54" column="0" selection-start-line="54" selection-start-column="0" selection-end-line="54" selection-end-column="0" /> <caret line="54" column="0" selection-start-line="54" selection-start-column="0" selection-end-line="54" selection-end-column="0" />
<folding> <folding />
<element signature="e#0#3436#0" expanded="false" />
<element signature="imports" expanded="false" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -2109,10 +2115,7 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0"> <state vertical-scroll-proportion="0.0">
<caret line="54" column="0" selection-start-line="54" selection-start-column="0" selection-end-line="54" selection-end-column="0" /> <caret line="54" column="0" selection-start-line="54" selection-start-column="0" selection-end-line="54" selection-end-column="0" />
<folding> <folding />
<element signature="e#0#3436#0" expanded="false" />
<element signature="imports" expanded="false" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -2141,8 +2144,36 @@
<element signature="e#9518#9519#0" expanded="false" /> <element signature="e#9518#9519#0" expanded="false" />
<element signature="e#9591#9592#0" expanded="false" /> <element signature="e#9591#9592#0" expanded="false" />
<element signature="e#9647#9648#0" expanded="false" /> <element signature="e#9647#9648#0" expanded="false" />
<element signature="e#51293#51294#0" expanded="false" />
<element signature="e#51354#51355#0" expanded="false" />
<element signature="e#59864#59865#0" expanded="false" />
<element signature="e#59905#59906#0" expanded="false" />
<element signature="e#59939#59940#0" expanded="false" />
<element signature="e#59981#59982#0" expanded="false" />
<element signature="e#67589#67590#0" expanded="false" />
<element signature="e#67625#67626#0" expanded="false" />
<element signature="e#67674#67675#0" expanded="false" />
<element signature="e#67733#67734#0" expanded="false" />
<element signature="e#68330#68331#0" expanded="false" />
<element signature="e#68387#68388#0" expanded="false" />
<element signature="e#81359#81360#0" expanded="false" />
<element signature="e#81428#81429#0" expanded="false" />
<element signature="e#85149#85150#0" expanded="false" />
<element signature="e#85187#85188#0" expanded="false" />
<element signature="e#85712#85713#0" expanded="false" />
<element signature="e#85765#85766#0" expanded="false" />
<element signature="e#87861#87862#0" expanded="false" />
<element signature="e#87890#87891#0" expanded="false" />
<element signature="e#89833#89834#0" expanded="false" /> <element signature="e#89833#89834#0" expanded="false" />
<element signature="e#89875#89876#0" expanded="false" /> <element signature="e#89875#89876#0" expanded="false" />
<element signature="e#91923#91924#0" expanded="false" />
<element signature="e#91951#91952#0" expanded="false" />
<element signature="e#91993#91994#0" expanded="false" />
<element signature="e#92024#92025#0" expanded="false" />
<element signature="e#93068#93069#0" expanded="false" />
<element signature="e#93122#93123#0" expanded="false" />
<element signature="e#93163#93164#0" expanded="false" />
<element signature="e#93222#93223#0" expanded="false" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -2159,13 +2190,7 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0"> <state vertical-scroll-proportion="0.0">
<caret line="18" column="30" selection-start-line="18" selection-start-column="30" selection-end-line="18" selection-end-column="30" /> <caret line="18" column="30" selection-start-line="18" selection-start-column="30" selection-end-line="18" selection-end-column="30" />
<folding> <folding />
<element signature="imports" expanded="true" />
<element signature="e#362#363#0" expanded="true" />
<element signature="e#404#405#0" expanded="true" />
<element signature="e#438#439#0" expanded="true" />
<element signature="e#479#480#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -2196,19 +2221,17 @@
<entry file="file://$PROJECT_DIR$/app/src/main/res/values/strings_autofill.xml"> <entry file="file://$PROJECT_DIR$/app/src/main/res/values/strings_autofill.xml">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0"> <state vertical-scroll-proportion="0.0">
<caret line="8" column="0" selection-start-line="8" selection-start-column="0" selection-end-line="8" selection-end-column="0" /> <caret line="6" column="70" selection-start-line="6" selection-start-column="70" selection-end-line="6" selection-end-column="70" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/keepass2android/autofill/AutoFillService.java"> <entry file="file://$PROJECT_DIR$/app/src/main/java/keepass2android/autofill/AutoFillService.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.76775956"> <state vertical-scroll-proportion="0.33242506">
<caret line="219" column="0" selection-start-line="219" selection-start-column="0" selection-end-line="219" selection-end-column="0" /> <caret line="149" column="44" selection-start-line="149" selection-start-column="44" selection-end-line="149" selection-end-column="44" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#2880#2881#0" expanded="true" />
<element signature="e#2913#2914#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>

View File

@ -298,10 +298,14 @@ public class AutoFillService extends AccessibilityService {
private boolean isSame(String url1, String url2) { private boolean isSame(String url1, String url2) {
if (url1.startsWith("androidapp://"))
return url1.equals(url2);
if (url1 == null) if (url1 == null)
return (url2 == null); return (url2 == null);
if (url2 == null)
return (url1 == null);
if (url1.startsWith("androidapp://"))
return url1.equals(url2);
return getHost(url1).equals(getHost(url2)); return getHost(url1).equals(getHost(url2));
} }