Skip to content

Commit 4899d91

Browse files
committed
Other Optimize.
1 parent d3bba33 commit 4899d91

87 files changed

Lines changed: 136 additions & 182 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/src/main/java/com/sevtinge/hyperceiler/utils/search/SearchHelper.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ public class SearchHelper {
5353

5454
public static final String ANDROID_NS = "http://schemas.android.com/apk/res/android";
5555
public static final String APP_NS = "http://schemas.android.com/apk/res-auto";
56-
public static final String LOCATION = "http://schemas.android.com/apk/location";
5756

5857
public static void getAllMods(Context context, boolean force) {
5958
if (force) {
@@ -419,16 +418,16 @@ private static void parsePrefXml(Context context, int xmlResId, String catPrefsF
419418
modData.title = getModTitle(res, xml.getAttributeValue(ANDROID_NS, "title"));
420419
boolean isPreferenceVisible = Boolean.parseBoolean(xml.getAttributeValue(APP_NS, "isPreferenceVisible"));
421420
if (locationHyper == null) {
422-
locationHyper = getModTitle(res, xml.getAttributeValue(LOCATION, "myLocationHyper"));
423-
locationHyperId = getModId(xml.getAttributeValue(LOCATION, "myLocationHyper"));
421+
locationHyper = getModTitle(res, xml.getAttributeValue(APP_NS, "myLocationHyper"));
422+
locationHyperId = getModId(xml.getAttributeValue(APP_NS, "myLocationHyper"));
424423
}
425424
if (locationPad == null) {
426-
locationPad = getModTitle(res, xml.getAttributeValue(LOCATION, "myLocationPad"));
427-
locationPadId = getModId(xml.getAttributeValue(LOCATION, "myLocationPad"));
425+
locationPad = getModTitle(res, xml.getAttributeValue(APP_NS, "myLocationPad"));
426+
locationPadId = getModId(xml.getAttributeValue(APP_NS, "myLocationPad"));
428427
}
429428
if (location == null) {
430-
location = getModTitle(res, xml.getAttributeValue(LOCATION, "myLocation"));
431-
locationId = getModId(xml.getAttributeValue(LOCATION, "myLocation"));
429+
location = getModTitle(res, xml.getAttributeValue(APP_NS, "myLocation"));
430+
locationId = getModId(xml.getAttributeValue(APP_NS, "myLocation"));
432431
}
433432
if (!TextUtils.isEmpty(modData.title) && !isPreferenceVisible) {
434433
String internalHyper = internalName == null ? locationHyper : internalName + "/" + locationHyper;

app/src/main/res/values/attrs.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@
5757
<!-- Default style for seekbar preferences. -->
5858
<attr name="seekBarPreferenceExStyle" format="reference" />
5959

60+
<attr name="myLocation" format="string" />
61+
<attr name="myLocationHyper" format="string" />
62+
<attr name="myLocationPad" format="string" />
63+
6064
<declare-styleable name="SeekBarPreferenceEx">
6165
<attr name="note" format="string" />
6266
<attr name="format" format="string" />

app/src/main/res/xml/aiasst.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:location="http://schemas.android.com/apk/location"
4-
location:myLocation="@string/aiasst">
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
app:myLocation="@string/aiasst">
55
<PreferenceCategory>
66

77
<SwitchPreference

app/src/main/res/xml/aod.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:location="http://schemas.android.com/apk/location"
4-
location:myLocation="@string/aod"
5-
location:myLocationHyper="@string/aod_hyperos">
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
app:myLocation="@string/aod"
5+
app:myLocationHyper="@string/aod_hyperos">
66

77
<PreferenceCategory>
88

app/src/main/res/xml/barrage.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
4-
xmlns:location="http://schemas.android.com/apk/location"
5-
location:myLocation="@string/barrage">
4+
app:myLocation="@string/barrage">
65

76
<PreferenceCategory>
87

app/src/main/res/xml/browser.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:location="http://schemas.android.com/apk/location"
4-
location:myLocation="@string/browser">
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
app:myLocation="@string/browser">
55

66
<PreferenceCategory>
77

app/src/main/res/xml/calendar.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:location="http://schemas.android.com/apk/location"
4-
location:myLocation="@string/calendar">
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
app:myLocation="@string/calendar">
55

66
<PreferenceCategory>
77

app/src/main/res/xml/camera.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
4-
xmlns:location="http://schemas.android.com/apk/location"
5-
location:myLocation="@string/camera">
4+
app:myLocation="@string/camera">
65

76
<PreferenceCategory android:title="@string/shot">
87

app/src/main/res/xml/camera_new.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:location="http://schemas.android.com/apk/location"
4-
location:myLocation="@string/camera">
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
app:myLocation="@string/camera">
55

66
<PreferenceCategory>
77

app/src/main/res/xml/clock.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:location="http://schemas.android.com/apk/location"
4-
location:myLocation="@string/clock">
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
app:myLocation="@string/clock">
55

66
<PreferenceCategory>
77

0 commit comments

Comments
 (0)