Skip to content

Commit 9a76fa8

Browse files
committedDec 2, 2018
Fix recent regression (NPE) if < LOLLIPOP
1 parent 011e23f commit 9a76fa8

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed
 

‎app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ android {
2525
applicationId 'ee.ioc.phon.android.speak'
2626
minSdkVersion 14
2727
targetSdkVersion 28
28-
versionCode 1695
29-
versionName '1.6.95'
28+
versionCode 1696
29+
versionName '1.6.96'
3030
}
3131

3232
compileOptions {

‎app/src/main/java/ee/ioc/phon/android/speak/activity/Preferences.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public void onResume() {
116116
// exist pre Android v5.
117117
// TODO: also remove it on Wear
118118
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
119-
PreferenceCategory category = (PreferenceCategory) findPreference(getString(R.string.keyCategoryServices));
119+
PreferenceCategory category = (PreferenceCategory) findPreference(getString(R.string.keyCategoryDependencies));
120120
Preference pref = category.findPreference(getString(R.string.keySystemVoiceInputSettings));
121121
if (pref != null) {
122122
category.removePreference(pref);

‎app/src/main/res/values/keys.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
// These keys are needed to locate (to show/hide) the "enable ime" link in the settings
3232
<string name="keyEnableIme" translatable="false">keyEnableIme</string>
3333
<string name="keyCategoryIme" translatable="false">keyCategoryIme</string>
34-
35-
<string name="keyCategoryServices" translatable="false">keyCategoryServices</string>
34+
<string name="keyCategoryDependencies" translatable="false">keyCategoryDependencies</string>
3635

3736
<!-- TODO: convert to integer-array -->
3837
<string-array name="valuesAutoStopAfterTime" translatable="false">

‎app/src/main/res/xml/preferences.xml

+3-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@
9393

9494
</PreferenceCategory>
9595

96-
<PreferenceCategory android:title="@string/titleCategoryDependencies">
96+
<PreferenceCategory
97+
android:key="@string/keyCategoryDependencies"
98+
android:title="@string/titleCategoryDependencies">
9799
<Preference
98100
android:summary="@string/summaryAppList"
99101
android:title="@string/labelActivityAppList">

0 commit comments

Comments
 (0)
Failed to load comments.