Index: webrtc/examples/androidapp/src/org/appspot/apprtc/SettingsActivity.java |
diff --git a/webrtc/examples/androidapp/src/org/appspot/apprtc/SettingsActivity.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/SettingsActivity.java |
index 7f8daad1386ca80bc48002e5243628a8af3765ed..fd38f9039f63744f733e56cc6f81110025d8d3b9 100644 |
--- a/webrtc/examples/androidapp/src/org/appspot/apprtc/SettingsActivity.java |
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/SettingsActivity.java |
@@ -23,8 +23,7 @@ import org.webrtc.voiceengine.WebRtcAudioUtils; |
/** |
* Settings activity for AppRTC. |
*/ |
-public class SettingsActivity extends Activity |
- implements OnSharedPreferenceChangeListener{ |
+public class SettingsActivity extends Activity implements OnSharedPreferenceChangeListener { |
private SettingsFragment settingsFragment; |
private String keyprefVideoCall; |
private String keyprefCamera2; |
@@ -85,7 +84,8 @@ public class SettingsActivity extends Activity |
// Display the fragment as the main content. |
settingsFragment = new SettingsFragment(); |
- getFragmentManager().beginTransaction() |
+ getFragmentManager() |
+ .beginTransaction() |
.replace(android.R.id.content, settingsFragment) |
.commit(); |
} |
@@ -127,8 +127,7 @@ public class SettingsActivity extends Activity |
updateSummaryB(sharedPreferences, keyPrefTracing); |
if (!Camera2Enumerator.isSupported(this)) { |
- Preference camera2Preference = |
- settingsFragment.findPreference(keyprefCamera2); |
+ Preference camera2Preference = settingsFragment.findPreference(keyprefCamera2); |
camera2Preference.setSummary(getString(R.string.pref_camera2_not_supported)); |
camera2Preference.setEnabled(false); |
@@ -173,8 +172,8 @@ public class SettingsActivity extends Activity |
} |
@Override |
- public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, |
- String key) { |
+ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { |
+ // clang-format off |
if (key.equals(keyprefResolution) |
|| key.equals(keyprefFps) |
|| key.equals(keyprefMaxVideoBitrateType) |
@@ -204,6 +203,7 @@ public class SettingsActivity extends Activity |
} else if (key.equals(keyprefSpeakerphone)) { |
updateSummaryList(sharedPreferences, key); |
} |
+ // clang-format on |
if (key.equals(keyprefMaxVideoBitrateType)) { |
setVideoBitrateEnable(sharedPreferences); |
} |
@@ -218,8 +218,7 @@ public class SettingsActivity extends Activity |
updatedPref.setSummary(sharedPreferences.getString(key, "")); |
} |
- private void updateSummaryBitrate( |
- SharedPreferences sharedPreferences, String key) { |
+ private void updateSummaryBitrate(SharedPreferences sharedPreferences, String key) { |
Preference updatedPref = settingsFragment.findPreference(key); |
updatedPref.setSummary(sharedPreferences.getString(key, "") + " kbps"); |
} |
@@ -227,8 +226,8 @@ public class SettingsActivity extends Activity |
private void updateSummaryB(SharedPreferences sharedPreferences, String key) { |
Preference updatedPref = settingsFragment.findPreference(key); |
updatedPref.setSummary(sharedPreferences.getBoolean(key, true) |
- ? getString(R.string.pref_value_enabled) |
- : getString(R.string.pref_value_disabled)); |
+ ? getString(R.string.pref_value_enabled) |
+ : getString(R.string.pref_value_disabled)); |
} |
private void updateSummaryList(SharedPreferences sharedPreferences, String key) { |
@@ -240,8 +239,8 @@ public class SettingsActivity extends Activity |
Preference bitratePreferenceValue = |
settingsFragment.findPreference(keyprefMaxVideoBitrateValue); |
String bitrateTypeDefault = getString(R.string.pref_maxvideobitrate_default); |
- String bitrateType = sharedPreferences.getString( |
- keyprefMaxVideoBitrateType, bitrateTypeDefault); |
+ String bitrateType = |
+ sharedPreferences.getString(keyprefMaxVideoBitrateType, bitrateTypeDefault); |
if (bitrateType.equals(bitrateTypeDefault)) { |
bitratePreferenceValue.setEnabled(false); |
} else { |
@@ -253,8 +252,8 @@ public class SettingsActivity extends Activity |
Preference bitratePreferenceValue = |
settingsFragment.findPreference(keyprefStartAudioBitrateValue); |
String bitrateTypeDefault = getString(R.string.pref_startaudiobitrate_default); |
- String bitrateType = sharedPreferences.getString( |
- keyprefStartAudioBitrateType, bitrateTypeDefault); |
+ String bitrateType = |
+ sharedPreferences.getString(keyprefStartAudioBitrateType, bitrateTypeDefault); |
if (bitrateType.equals(bitrateTypeDefault)) { |
bitratePreferenceValue.setEnabled(false); |
} else { |