mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-01 14:32:54 +01:00
Upgrade notification settings to androidx
This commit is contained in:
parent
53c06b8c31
commit
bac1d35479
@ -42,7 +42,6 @@ import androidx.preference.Preference;
|
|||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.activities.charts.AbstractPreferenceFragment;
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.DeviceManager;
|
import nodomain.freeyourgadget.gadgetbridge.devices.DeviceManager;
|
||||||
|
|
||||||
public class AboutUserPreferencesActivity extends AbstractGBActivity {
|
public class AboutUserPreferencesActivity extends AbstractGBActivity {
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
You should have received a copy of the GNU Affero General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
package nodomain.freeyourgadget.gadgetbridge.activities.charts;
|
package nodomain.freeyourgadget.gadgetbridge.activities;
|
||||||
|
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
@ -22,7 +22,6 @@ import android.os.Bundle;
|
|||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.activities.charts.AbstractPreferenceFragment;
|
|
||||||
|
|
||||||
public class DiscoveryPairingPreferenceActivity extends AbstractGBActivity {
|
public class DiscoveryPairingPreferenceActivity extends AbstractGBActivity {
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,22 +1,5 @@
|
|||||||
/* Copyright (C) 2015-2020 Andreas Shimokawa, Carsten Pfeiffer, Lem Dulfo,
|
/* Copyright (C) 2015-2023 Andreas Shimokawa, Carsten Pfeiffer, Lem Dulfo,
|
||||||
vanous
|
vanous, José Rebelo
|
||||||
|
|
||||||
This file is part of Gadgetbridge.
|
|
||||||
|
|
||||||
Gadgetbridge is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Affero General Public License as published
|
|
||||||
by the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Gadgetbridge is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Affero General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
||||||
/* Copyright (C) 2015-2020 Andreas Shimokawa, Carsten Pfeiffer, Lem Dulfo,
|
|
||||||
vanous
|
|
||||||
|
|
||||||
This file is part of Gadgetbridge.
|
This file is part of Gadgetbridge.
|
||||||
|
|
||||||
@ -35,18 +18,14 @@
|
|||||||
package nodomain.freeyourgadget.gadgetbridge.activities;
|
package nodomain.freeyourgadget.gadgetbridge.activities;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.media.Ringtone;
|
|
||||||
import android.media.RingtoneManager;
|
import android.media.RingtoneManager;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.EditTextPreference;
|
|
||||||
import android.preference.Preference;
|
|
||||||
import android.preference.PreferenceCategory;
|
|
||||||
import android.preference.PreferenceManager;
|
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.widget.EditText;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.preference.Preference;
|
||||||
|
import androidx.preference.PreferenceCategory;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -56,7 +35,7 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.util.GBPrefs;
|
import nodomain.freeyourgadget.gadgetbridge.util.GBPrefs;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
||||||
|
|
||||||
public class NotificationManagementActivity extends AbstractSettingsActivity {
|
public class NotificationManagementActivity extends AbstractGBActivity {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(NotificationManagementActivity.class);
|
private static final Logger LOG = LoggerFactory.getLogger(NotificationManagementActivity.class);
|
||||||
private static final int RINGTONE_REQUEST_CODE = 4712;
|
private static final int RINGTONE_REQUEST_CODE = 4712;
|
||||||
private static final String DEFAULT_RINGTONE_URI = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE).toString();
|
private static final String DEFAULT_RINGTONE_URI = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE).toString();
|
||||||
@ -64,112 +43,114 @@ public class NotificationManagementActivity extends AbstractSettingsActivity {
|
|||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
addPreferencesFromResource(R.xml.notifications_preferences);
|
setContentView(R.layout.activity_device_settings);
|
||||||
|
|
||||||
|
if (savedInstanceState == null) {
|
||||||
|
Fragment fragment = getSupportFragmentManager().findFragmentByTag(NotificationPreferencesFragment.FRAGMENT_TAG);
|
||||||
|
if (fragment == null) {
|
||||||
|
fragment = new NotificationPreferencesFragment();
|
||||||
|
}
|
||||||
|
getSupportFragmentManager()
|
||||||
|
.beginTransaction()
|
||||||
|
.replace(R.id.settings_container, fragment, NotificationPreferencesFragment.FRAGMENT_TAG)
|
||||||
|
.commit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public static class NotificationPreferencesFragment extends AbstractPreferenceFragment {
|
||||||
protected void onPostCreate(Bundle savedInstanceState) {
|
static final String FRAGMENT_TAG = "NOTIFICATION_PREFERENCES_FRAGMENT";
|
||||||
super.onPostCreate(savedInstanceState);
|
|
||||||
|
|
||||||
Prefs prefs = GBApplication.getPrefs();
|
@Override
|
||||||
Preference pref = findPreference("notifications_generic");
|
protected void onSharedPreferenceChanged(final Preference preference) {
|
||||||
pref.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
if (GBPrefs.PING_TONE.equals(preference.getKey())) {
|
||||||
public boolean onPreferenceClick(Preference preference) {
|
try {
|
||||||
Intent enableIntent = new Intent("android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS");
|
final Prefs prefs = GBApplication.getPrefs();
|
||||||
|
// This fails on some ROMs. The actual implementation falls-back to an internal ping tone
|
||||||
|
preference.setSummary(RingtoneManager.getRingtone(requireContext(), Uri.parse(prefs.getString(GBPrefs.PING_TONE, DEFAULT_RINGTONE_URI))).getTitle(requireContext()));
|
||||||
|
} catch (final Exception e) {
|
||||||
|
LOG.error("Failed to find the configured ping ringtone", e);
|
||||||
|
preference.setSummary("-");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreatePreferences(final Bundle savedInstanceState, final String rootKey) {
|
||||||
|
addPreferencesFromResource(R.xml.notifications_preferences);
|
||||||
|
|
||||||
|
Preference pref = findPreference("notifications_generic");
|
||||||
|
pref.setOnPreferenceClickListener(preference -> {
|
||||||
|
final Intent enableIntent = new Intent("android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS");
|
||||||
startActivity(enableIntent);
|
startActivity(enableIntent);
|
||||||
return true;
|
return true;
|
||||||
}
|
});
|
||||||
});
|
|
||||||
|
|
||||||
|
pref = findPreference(GBPrefs.PING_TONE);
|
||||||
pref = findPreference(GBPrefs.PING_TONE);
|
pref.setOnPreferenceClickListener(preference -> {
|
||||||
pref.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
final Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
|
||||||
@Override
|
|
||||||
public boolean onPreferenceClick(Preference preference) {
|
|
||||||
Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
|
|
||||||
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE, "Set Ping tone");
|
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE, "Set Ping tone");
|
||||||
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, false);
|
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, false);
|
||||||
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);
|
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);
|
||||||
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_ALL);
|
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_ALL);
|
||||||
startActivityForResult(intent, RINGTONE_REQUEST_CODE);
|
startActivityForResult(intent, RINGTONE_REQUEST_CODE);
|
||||||
return true;
|
return true;
|
||||||
}
|
});
|
||||||
});
|
|
||||||
|
|
||||||
try {
|
pref = findPreference("pref_key_blacklist");
|
||||||
// This fails on some ROMs. The actual implementation falls-back to an internal ping tone
|
pref.setOnPreferenceClickListener(preference -> {
|
||||||
pref.setSummary(RingtoneManager.getRingtone(this, Uri.parse(prefs.getString(GBPrefs.PING_TONE, DEFAULT_RINGTONE_URI))).getTitle(this));
|
final Intent enableIntent = new Intent(requireContext(), AppBlacklistActivity.class);
|
||||||
} catch (final Exception e) {
|
|
||||||
LOG.error("Failed to find the configured ping ringtone");
|
|
||||||
pref.setSummary("-");
|
|
||||||
}
|
|
||||||
|
|
||||||
pref = findPreference("pref_key_blacklist");
|
|
||||||
pref.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
|
||||||
public boolean onPreferenceClick(Preference preference) {
|
|
||||||
Intent enableIntent = new Intent(NotificationManagementActivity.this, AppBlacklistActivity.class);
|
|
||||||
startActivity(enableIntent);
|
startActivity(enableIntent);
|
||||||
return true;
|
return true;
|
||||||
}
|
});
|
||||||
});
|
|
||||||
|
|
||||||
if (!GBApplication.isRunningMarshmallowOrLater()) {
|
pref = findPreference("notifications_settings");
|
||||||
pref = findPreference("notification_filter");
|
pref.setOnPreferenceClickListener(preference -> {
|
||||||
PreferenceCategory category = (PreferenceCategory) findPreference("pref_key_notifications");
|
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.O) {
|
||||||
category.removePreference(pref);
|
LOG.warn("This preference should not be displayed in Android < O");
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
pref = findPreference("notifications_settings");
|
final Intent intent = new Intent(Settings.ACTION_APP_NOTIFICATION_SETTINGS);
|
||||||
pref.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
|
||||||
public boolean onPreferenceClick(Preference preference) {
|
|
||||||
Intent intent = new Intent(Settings.ACTION_APP_NOTIFICATION_SETTINGS);
|
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
intent.putExtra(Settings.EXTRA_APP_PACKAGE, getPackageName());
|
intent.putExtra(Settings.EXTRA_APP_PACKAGE, requireActivity().getPackageName());
|
||||||
//This could open notification channel settings, if needed...:
|
//This could open notification channel settings, if needed...:
|
||||||
//Intent intent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS);
|
//Intent intent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS);
|
||||||
//intent.putExtra(Settings.EXTRA_CHANNEL_ID, GB.NOTIFICATION_CHANNEL_ID_TRANSFER);
|
//intent.putExtra(Settings.EXTRA_CHANNEL_ID, GB.NOTIFICATION_CHANNEL_ID_TRANSFER);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
return true;
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
|
final PreferenceCategory notificationsCategory = findPreference("pref_key_notifications");
|
||||||
|
|
||||||
|
if (!GBApplication.isRunningMarshmallowOrLater()) {
|
||||||
|
pref = findPreference("notification_filter");
|
||||||
|
notificationsCategory.removePreference(pref);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
if (GBApplication.isRunningTenOrLater()) {
|
if (GBApplication.isRunningTenOrLater()) {
|
||||||
pref = findPreference("minimize_priority");
|
pref = findPreference("minimize_priority");
|
||||||
PreferenceCategory category = (PreferenceCategory) findPreference("pref_key_notifications");
|
notificationsCategory.removePreference(pref);
|
||||||
category.removePreference(pref);
|
}
|
||||||
|
|
||||||
|
if (!GBApplication.isRunningOreoOrLater()) {
|
||||||
|
pref = findPreference("notifications_settings");
|
||||||
|
notificationsCategory.removePreference(pref);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!GBApplication.isRunningOreoOrLater()) {
|
// TODO: Migrate this to ActivityResultContract
|
||||||
pref = findPreference("notifications_settings");
|
@Override
|
||||||
PreferenceCategory category = (PreferenceCategory) findPreference("pref_key_notifications");
|
public void onActivityResult(final int requestCode, final int resultCode, final Intent intent) {
|
||||||
category.removePreference(pref);
|
if (requestCode == RINGTONE_REQUEST_CODE && intent != null) {
|
||||||
}
|
if (intent.getExtras().getParcelable(RingtoneManager.EXTRA_RINGTONE_PICKED_URI) != null) {
|
||||||
}
|
final Uri uri = intent.getExtras().getParcelable(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
|
||||||
|
GBApplication.getPrefs()
|
||||||
|
.getPreferences()
|
||||||
@Override
|
.edit()
|
||||||
protected String[] getPreferenceKeysWithSummary() {
|
.putString(GBPrefs.PING_TONE, uri.toString())
|
||||||
return new String[]{
|
.apply();
|
||||||
};
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
|
|
||||||
if (requestCode == RINGTONE_REQUEST_CODE && intent != null) {
|
|
||||||
if (intent.getExtras().getParcelable(RingtoneManager.EXTRA_RINGTONE_PICKED_URI) != null) {
|
|
||||||
Uri uri = intent.getExtras().getParcelable(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
|
|
||||||
Ringtone r = RingtoneManager.getRingtone(this, uri);
|
|
||||||
findPreference(GBPrefs.PING_TONE).setSummary(r.toString());
|
|
||||||
|
|
||||||
PreferenceManager
|
|
||||||
.getDefaultSharedPreferences(this)
|
|
||||||
.edit()
|
|
||||||
.putString(GBPrefs.PING_TONE, uri.toString())
|
|
||||||
.apply();
|
|
||||||
findPreference(GBPrefs.PING_TONE).setSummary(r.getTitle(this));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@ import androidx.preference.Preference;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.activities.AboutUserPreferencesActivity;
|
import nodomain.freeyourgadget.gadgetbridge.activities.AboutUserPreferencesActivity;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.activities.AbstractGBActivity;
|
import nodomain.freeyourgadget.gadgetbridge.activities.AbstractGBActivity;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.activities.AbstractPreferenceFragment;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.util.GBPrefs;
|
import nodomain.freeyourgadget.gadgetbridge.util.GBPrefs;
|
||||||
|
|
||||||
public class ChartsPreferencesActivity extends AbstractGBActivity {
|
public class ChartsPreferencesActivity extends AbstractGBActivity {
|
||||||
|
@ -40,7 +40,7 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.activities.CalBlacklistActivity;
|
import nodomain.freeyourgadget.gadgetbridge.activities.CalBlacklistActivity;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.activities.ConfigureContacts;
|
import nodomain.freeyourgadget.gadgetbridge.activities.ConfigureContacts;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.activities.ConfigureWorldClocks;
|
import nodomain.freeyourgadget.gadgetbridge.activities.ConfigureWorldClocks;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.activities.charts.AbstractPreferenceFragment;
|
import nodomain.freeyourgadget.gadgetbridge.activities.AbstractPreferenceFragment;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.activities.loyaltycards.LoyaltyCardsSettingsActivity;
|
import nodomain.freeyourgadget.gadgetbridge.activities.loyaltycards.LoyaltyCardsSettingsActivity;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.activities.loyaltycards.LoyaltyCardsSettingsConst;
|
import nodomain.freeyourgadget.gadgetbridge.activities.loyaltycards.LoyaltyCardsSettingsConst;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.capabilities.HeartRateCapability;
|
import nodomain.freeyourgadget.gadgetbridge.capabilities.HeartRateCapability;
|
||||||
|
@ -1,76 +1,92 @@
|
|||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
<PreferenceCategory xmlns:app="http://schemas.android.com/apk/res-auto"
|
<PreferenceCategory xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:key="pref_key_notifications"
|
android:key="pref_key_notifications"
|
||||||
android:title="@string/pref_header_notifications">
|
android:title="@string/pref_header_notifications"
|
||||||
|
app:iconSpaceReserved="false">
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="notifications_settings"
|
android:key="notifications_settings"
|
||||||
android:title="@string/pref_title_notifications_generic_settings" />
|
android:title="@string/pref_title_notifications_generic_settings"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="notifications_generic"
|
android:key="notifications_generic"
|
||||||
android:title="@string/pref_title_notifications_generic" />
|
android:title="@string/pref_title_notifications_generic"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
<CheckBoxPreference
|
<SwitchPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="notifications_generic_whenscreenon"
|
android:key="notifications_generic_whenscreenon"
|
||||||
android:layout="@layout/preference_checkbox"
|
android:layout="@layout/preference_checkbox"
|
||||||
android:title="@string/pref_title_whenscreenon" />
|
android:title="@string/pref_title_whenscreenon"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
<CheckBoxPreference
|
<SwitchPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:key="notifications_ignore_low_priority"
|
android:key="notifications_ignore_low_priority"
|
||||||
android:layout="@layout/preference_checkbox"
|
android:layout="@layout/preference_checkbox"
|
||||||
|
android:summary="@string/pref_summary_notifications_ignore_low_priority"
|
||||||
android:title="@string/pref_title_notifications_ignore_low_priority"
|
android:title="@string/pref_title_notifications_ignore_low_priority"
|
||||||
android:summary="@string/pref_summary_notifications_ignore_low_priority" />
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
<CheckBoxPreference
|
<SwitchPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:key="notification_prefer_long_text"
|
android:key="notification_prefer_long_text"
|
||||||
android:layout="@layout/preference_checkbox"
|
android:layout="@layout/preference_checkbox"
|
||||||
|
android:summary="@string/pref_summary_notification_prefer_long_text"
|
||||||
android:title="@string/pref_title_notification_prefer_long_text"
|
android:title="@string/pref_title_notification_prefer_long_text"
|
||||||
android:summary="@string/pref_summary_notification_prefer_long_text" />
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
<CheckBoxPreference
|
<SwitchPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="notification_cache_while_disconnected"
|
android:key="notification_cache_while_disconnected"
|
||||||
android:layout="@layout/preference_checkbox"
|
android:layout="@layout/preference_checkbox"
|
||||||
|
android:summary="@string/pref_summary_notification_cache_while_disconnected"
|
||||||
android:title="@string/pref_title_notification_cache_while_disconnected"
|
android:title="@string/pref_title_notification_cache_while_disconnected"
|
||||||
android:summary="@string/pref_summary_notification_cache_while_disconnected" />
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
<CheckBoxPreference
|
<SwitchPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="minimize_priority"
|
android:key="minimize_priority"
|
||||||
android:layout="@layout/preference_checkbox"
|
android:layout="@layout/preference_checkbox"
|
||||||
android:summaryOff="@string/pref_summary_minimize_priority_off"
|
android:summaryOff="@string/pref_summary_minimize_priority_off"
|
||||||
android:summaryOn="@string/pref_summary_minimize_priority_on"
|
android:summaryOn="@string/pref_summary_minimize_priority_on"
|
||||||
android:title="@string/pref_title_minimize_priority" />
|
android:title="@string/pref_title_minimize_priority"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:id="@+id/preference"
|
android:id="@+id/preference"
|
||||||
android:key="ping_tone"
|
android:key="ping_tone"
|
||||||
android:title="@string/pref_title_ping_tone"
|
android:title="@string/pref_title_ping_tone"
|
||||||
|
app:iconSpaceReserved="false"
|
||||||
app:summary="%s" />
|
app:summary="%s" />
|
||||||
|
|
||||||
<ListPreference
|
<ListPreference
|
||||||
android:defaultValue="always"
|
android:defaultValue="always"
|
||||||
android:entries="@array/notification_mode_toggle"
|
android:entries="@array/notification_mode_toggle"
|
||||||
android:entryValues="@array/notification_mode_values_toggle"
|
android:entryValues="@array/notification_mode_values_toggle"
|
||||||
android:key="notification_mode_calls"
|
android:key="notification_mode_calls"
|
||||||
android:summary="%s"
|
android:summary="%s"
|
||||||
android:title="@string/pref_title_notifications_call" />
|
android:title="@string/pref_title_notifications_call"
|
||||||
<CheckBoxPreference
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
|
<SwitchPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="notification_support_voip_calls"
|
android:key="notification_support_voip_calls"
|
||||||
android:layout="@layout/preference_checkbox"
|
android:layout="@layout/preference_checkbox"
|
||||||
android:title="@string/pref_title_support_voip_calls" />
|
android:title="@string/pref_title_support_voip_calls"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
<EditTextPreference
|
<EditTextPreference
|
||||||
android:defaultValue="0"
|
android:defaultValue="0"
|
||||||
android:inputType="number"
|
|
||||||
android:digits="0123456789"
|
android:digits="0123456789"
|
||||||
|
android:inputType="number"
|
||||||
android:key="notification_delay_calls"
|
android:key="notification_delay_calls"
|
||||||
android:maxLength="2"
|
android:maxLength="2"
|
||||||
|
android:summary="@string/pref_summary_notification_delay_calls"
|
||||||
android:title="@string/pref_title_notification_delay_calls"
|
android:title="@string/pref_title_notification_delay_calls"
|
||||||
android:summary="@string/pref_summary_notification_delay_calls" />
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
<ListPreference
|
<ListPreference
|
||||||
android:defaultValue="when_screen_off"
|
android:defaultValue="when_screen_off"
|
||||||
@ -78,7 +94,8 @@
|
|||||||
android:entryValues="@array/notification_mode_values"
|
android:entryValues="@array/notification_mode_values"
|
||||||
android:key="notification_mode_sms"
|
android:key="notification_mode_sms"
|
||||||
android:summary="%s"
|
android:summary="%s"
|
||||||
android:title="@string/pref_title_notifications_sms" />
|
android:title="@string/pref_title_notifications_sms"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
<ListPreference
|
<ListPreference
|
||||||
android:defaultValue="when_screen_off"
|
android:defaultValue="when_screen_off"
|
||||||
@ -86,7 +103,8 @@
|
|||||||
android:entryValues="@array/notification_mode_values"
|
android:entryValues="@array/notification_mode_values"
|
||||||
android:key="notification_mode_pebblemsg"
|
android:key="notification_mode_pebblemsg"
|
||||||
android:summary="@string/pref_summary_notifications_pebblemsg"
|
android:summary="@string/pref_summary_notifications_pebblemsg"
|
||||||
android:title="@string/pref_title_notifications_pebblemsg" />
|
android:title="@string/pref_title_notifications_pebblemsg"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
<ListPreference
|
<ListPreference
|
||||||
android:defaultValue="0"
|
android:defaultValue="0"
|
||||||
@ -94,48 +112,66 @@
|
|||||||
android:entryValues="@array/notifications_timeout_values"
|
android:entryValues="@array/notifications_timeout_values"
|
||||||
android:key="notifications_timeout"
|
android:key="notifications_timeout"
|
||||||
android:summary="%s"
|
android:summary="%s"
|
||||||
android:title="@string/pref_title_notifications_timeout" />
|
android:title="@string/pref_title_notifications_timeout"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
<CheckBoxPreference
|
<SwitchPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="notification_filter"
|
android:key="notification_filter"
|
||||||
android:layout="@layout/preference_checkbox"
|
android:layout="@layout/preference_checkbox"
|
||||||
android:summary="@string/pref_summary_notification_filter"
|
android:summary="@string/pref_summary_notification_filter"
|
||||||
android:title="@string/pref_title_notification_filter" />
|
android:title="@string/pref_title_notification_filter"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
<PreferenceCategory android:title="@string/pref_header_notification_application_settings">
|
|
||||||
|
<PreferenceCategory
|
||||||
|
android:title="@string/pref_header_notification_application_settings"
|
||||||
|
app:iconSpaceReserved="false">
|
||||||
|
|
||||||
<ListPreference
|
<ListPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:entries="@array/notification_list_is_blacklist_names"
|
android:entries="@array/notification_list_is_blacklist_names"
|
||||||
android:entryValues="@array/notification_list_is_blacklist_values"
|
android:entryValues="@array/notification_list_is_blacklist_values"
|
||||||
android:key="notification_list_is_blacklist"
|
android:key="notification_list_is_blacklist"
|
||||||
android:summary="%s"
|
android:summary="%s"
|
||||||
android:title="@string/pref_title_notification_use_as" />
|
android:title="@string/pref_title_notification_use_as"
|
||||||
<CheckBoxPreference
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
|
<SwitchPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="notification_media_ignores_application_list"
|
android:key="notification_media_ignores_application_list"
|
||||||
android:layout="@layout/preference_checkbox"
|
android:layout="@layout/preference_checkbox"
|
||||||
android:summary="@string/pref_summary_notification_media_ignores_application_list"
|
android:summary="@string/pref_summary_notification_media_ignores_application_list"
|
||||||
android:title="@string/pref_title_notification_media_ignores_application_list" />
|
android:title="@string/pref_title_notification_media_ignores_application_list"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="pref_key_blacklist"
|
android:key="pref_key_blacklist"
|
||||||
android:title="@string/pref_applications_settings" />
|
android:title="@string/pref_applications_settings"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
<PreferenceCategory android:title="@string/pref_header_privacy">
|
|
||||||
|
<PreferenceCategory
|
||||||
|
android:title="@string/pref_header_privacy"
|
||||||
|
app:iconSpaceReserved="false">
|
||||||
|
|
||||||
<ListPreference
|
<ListPreference
|
||||||
android:defaultValue="@string/p_call_privacy_mode_off"
|
android:defaultValue="@string/p_call_privacy_mode_off"
|
||||||
android:entries="@array/pref_call_privacy_mode"
|
android:entries="@array/pref_call_privacy_mode"
|
||||||
android:entryValues="@array/pref_call_privacy_mode_values"
|
android:entryValues="@array/pref_call_privacy_mode_values"
|
||||||
android:key="pref_call_privacy_mode"
|
android:key="pref_call_privacy_mode"
|
||||||
android:summary="%s"
|
android:summary="%s"
|
||||||
android:title="@string/pref_title_call_privacy_mode" />
|
android:title="@string/pref_title_call_privacy_mode"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
<ListPreference
|
<ListPreference
|
||||||
android:defaultValue="off"
|
android:defaultValue="off"
|
||||||
android:entries="@array/pref_message_privacy_mode"
|
android:entries="@array/pref_message_privacy_mode"
|
||||||
android:entryValues="@array/pref_message_privacy_mode_values"
|
android:entryValues="@array/pref_message_privacy_mode_values"
|
||||||
android:key="pref_message_privacy_mode"
|
android:key="pref_message_privacy_mode"
|
||||||
android:summary="%s"
|
android:summary="%s"
|
||||||
android:title="@string/pref_title_message_privacy_mode" />
|
android:title="@string/pref_title_message_privacy_mode"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
Loading…
Reference in New Issue
Block a user