2015-01-07 14:00:18 +01:00
|
|
|
package nodomain.freeyourgadget.gadgetbridge;
|
|
|
|
|
2015-03-15 21:36:39 +01:00
|
|
|
import android.content.Intent;
|
2015-05-07 01:30:40 +02:00
|
|
|
import android.media.audiofx.BassBoost;
|
2015-01-07 14:00:18 +01:00
|
|
|
import android.os.Bundle;
|
|
|
|
import android.preference.ListPreference;
|
|
|
|
import android.preference.Preference;
|
|
|
|
import android.preference.PreferenceActivity;
|
|
|
|
import android.preference.PreferenceManager;
|
2015-03-28 20:39:46 +01:00
|
|
|
import android.support.v4.app.NavUtils;
|
2015-04-19 12:35:23 +02:00
|
|
|
import android.support.v4.content.LocalBroadcastManager;
|
2015-03-28 20:39:46 +01:00
|
|
|
import android.view.MenuItem;
|
2015-01-07 14:00:18 +01:00
|
|
|
|
2015-05-07 01:30:40 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.activities.AbstractSettingsActivity;
|
|
|
|
import nodomain.freeyourgadget.gadgetbridge.miband.MiBandPreferencesActivity;
|
|
|
|
|
|
|
|
public class SettingsActivity extends AbstractSettingsActivity {
|
|
|
|
@Override
|
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
|
addPreferencesFromResource(R.xml.preferences);
|
|
|
|
}
|
|
|
|
|
2015-01-07 14:00:18 +01:00
|
|
|
@Override
|
|
|
|
protected void onPostCreate(Bundle savedInstanceState) {
|
|
|
|
super.onPostCreate(savedInstanceState);
|
|
|
|
|
2015-03-15 21:36:39 +01:00
|
|
|
Preference pref = (Preference) findPreference("notifications_generic");
|
|
|
|
pref.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
|
|
|
public boolean onPreferenceClick(Preference preference) {
|
|
|
|
Intent enableIntent = new Intent("android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS");
|
|
|
|
startActivity(enableIntent);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
});
|
2015-05-07 01:30:40 +02:00
|
|
|
pref = (Preference) findPreference("pref_key_miband");
|
|
|
|
pref.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
|
|
|
public boolean onPreferenceClick(Preference preference) {
|
|
|
|
Intent enableIntent = new Intent(SettingsActivity.this, MiBandPreferencesActivity.class);
|
|
|
|
startActivity(enableIntent);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
});
|
2015-04-19 12:35:23 +02:00
|
|
|
|
2015-01-07 14:00:18 +01:00
|
|
|
}
|
|
|
|
}
|