trigger endpoint renewal when up settings change
This commit is contained in:
parent
e84d66874c
commit
dbebb7feed
|
@ -7,7 +7,6 @@ import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.preference.EditTextPreference;
|
import androidx.preference.EditTextPreference;
|
||||||
import androidx.preference.ListPreference;
|
import androidx.preference.ListPreference;
|
||||||
import androidx.preference.Preference;
|
|
||||||
|
|
||||||
import com.google.common.base.Strings;
|
import com.google.common.base.Strings;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
|
@ -91,6 +90,17 @@ public class UpSettingsFragment extends XmppPreferenceFragment {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onSharedPreferenceChanged(@NonNull String key) {
|
||||||
|
super.onSharedPreferenceChanged(key);
|
||||||
|
if (UnifiedPushDistributor.PREFERENCES.contains(key)) {
|
||||||
|
final var service = requireService();
|
||||||
|
if (service.reconfigurePushDistributor()) {
|
||||||
|
service.renewUnifiedPushEndpoints();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStart() {
|
public void onStart() {
|
||||||
super.onStart();
|
super.onStart();
|
||||||
|
|
Loading…
Reference in a new issue