fixed crash in settings
This commit is contained in:
parent
84d4869572
commit
d1632b84b3
4 changed files with 10 additions and 5 deletions
|
@ -92,7 +92,8 @@ android {
|
|||
applicationId "de.pixart.messenger"
|
||||
multiDexEnabled true
|
||||
buildConfigField("String", "UPDATE_URL", '"https://xmpp.pix-art.de/Pix-Art_Messenger/update/"')
|
||||
|
||||
resValue "string", "applicationId", applicationId
|
||||
resValue "string", "app_name", "Pix-Art Messenger"
|
||||
dimension "distribution"
|
||||
}
|
||||
|
||||
|
@ -120,7 +121,8 @@ android {
|
|||
open {
|
||||
buildConfigField("String", "UPDATE_URL", '"https://xmpp.pix-art.de/Pix-Art_Messenger/update/open/"')
|
||||
applicationId "de.pixart.openmessenger"
|
||||
|
||||
resValue "string", "applicationId", applicationId
|
||||
resValue "string", "app_name", "Pix-Art Messenger"
|
||||
dimension "distribution"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,10 +37,14 @@ public class SettingsFragment extends PreferenceFragment {
|
|||
}
|
||||
|
||||
public void setActivityIntent(final Intent intent) {
|
||||
boolean wasEmpty = TextUtils.isEmpty(page);
|
||||
if (intent != null) {
|
||||
if (Intent.ACTION_VIEW.equals(intent.getAction())) {
|
||||
if (intent.getExtras() != null) {
|
||||
this.page = intent.getExtras().getString("page");
|
||||
if (wasEmpty) {
|
||||
openPreferenceScreen(page);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name" translatable="false">Pix-Art Messenger</string>
|
||||
<string name="welcome_header" translatable="false">Pix-Art Messenger</string>
|
||||
<string name="type_pc" translatable="false">Computer</string>
|
||||
<string name="type_phone" translatable="false">Mobile phone</string>
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:targetClass="de.pixart.messenger.ui.SettingsActivity"
|
||||
android:targetPackage="de.pixart.messenger">
|
||||
android:targetPackage="@string/applicationId">
|
||||
<extra
|
||||
android:name="page"
|
||||
android:value="quiet_hours" />
|
||||
|
@ -258,7 +258,7 @@
|
|||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:targetClass="de.pixart.messenger.ui.SettingsActivity"
|
||||
android:targetPackage="de.pixart.messenger">
|
||||
android:targetPackage="@string/applicationId">
|
||||
<extra
|
||||
android:name="page"
|
||||
android:value="expert" />
|
||||
|
|
Reference in a new issue