OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 private String keyprefStartVideoBitrateType; | 29 private String keyprefStartVideoBitrateType; |
30 private String keyprefStartVideoBitrateValue; | 30 private String keyprefStartVideoBitrateValue; |
31 private String keyPrefVideoCodec; | 31 private String keyPrefVideoCodec; |
32 private String keyprefHwCodec; | 32 private String keyprefHwCodec; |
33 private String keyprefCaptureToTexture; | 33 private String keyprefCaptureToTexture; |
34 | 34 |
35 private String keyprefStartAudioBitrateType; | 35 private String keyprefStartAudioBitrateType; |
36 private String keyprefStartAudioBitrateValue; | 36 private String keyprefStartAudioBitrateValue; |
37 private String keyPrefAudioCodec; | 37 private String keyPrefAudioCodec; |
38 private String keyprefNoAudioProcessing; | 38 private String keyprefNoAudioProcessing; |
| 39 private String keyprefAecDump; |
39 private String keyprefOpenSLES; | 40 private String keyprefOpenSLES; |
40 | 41 |
41 private String keyPrefRoomServerUrl; | 42 private String keyPrefRoomServerUrl; |
42 private String keyPrefDisplayHud; | 43 private String keyPrefDisplayHud; |
43 | 44 |
44 @Override | 45 @Override |
45 protected void onCreate(Bundle savedInstanceState) { | 46 protected void onCreate(Bundle savedInstanceState) { |
46 super.onCreate(savedInstanceState); | 47 super.onCreate(savedInstanceState); |
47 keyprefVideoCall = getString(R.string.pref_videocall_key); | 48 keyprefVideoCall = getString(R.string.pref_videocall_key); |
48 keyprefResolution = getString(R.string.pref_resolution_key); | 49 keyprefResolution = getString(R.string.pref_resolution_key); |
49 keyprefFps = getString(R.string.pref_fps_key); | 50 keyprefFps = getString(R.string.pref_fps_key); |
50 keyprefCaptureQualitySlider = getString(R.string.pref_capturequalityslider_k
ey); | 51 keyprefCaptureQualitySlider = getString(R.string.pref_capturequalityslider_k
ey); |
51 keyprefStartVideoBitrateType = getString(R.string.pref_startvideobitrate_key
); | 52 keyprefStartVideoBitrateType = getString(R.string.pref_startvideobitrate_key
); |
52 keyprefStartVideoBitrateValue = getString(R.string.pref_startvideobitrateval
ue_key); | 53 keyprefStartVideoBitrateValue = getString(R.string.pref_startvideobitrateval
ue_key); |
53 keyPrefVideoCodec = getString(R.string.pref_videocodec_key); | 54 keyPrefVideoCodec = getString(R.string.pref_videocodec_key); |
54 keyprefHwCodec = getString(R.string.pref_hwcodec_key); | 55 keyprefHwCodec = getString(R.string.pref_hwcodec_key); |
55 keyprefCaptureToTexture = getString(R.string.pref_capturetotexture_key); | 56 keyprefCaptureToTexture = getString(R.string.pref_capturetotexture_key); |
56 | 57 |
57 keyprefStartAudioBitrateType = getString(R.string.pref_startaudiobitrate_key
); | 58 keyprefStartAudioBitrateType = getString(R.string.pref_startaudiobitrate_key
); |
58 keyprefStartAudioBitrateValue = getString(R.string.pref_startaudiobitrateval
ue_key); | 59 keyprefStartAudioBitrateValue = getString(R.string.pref_startaudiobitrateval
ue_key); |
59 keyPrefAudioCodec = getString(R.string.pref_audiocodec_key); | 60 keyPrefAudioCodec = getString(R.string.pref_audiocodec_key); |
60 keyprefNoAudioProcessing = getString(R.string.pref_noaudioprocessing_key); | 61 keyprefNoAudioProcessing = getString(R.string.pref_noaudioprocessing_key); |
| 62 keyprefAecDump = getString(R.string.pref_aecdump_key); |
61 keyprefOpenSLES = getString(R.string.pref_opensles_key); | 63 keyprefOpenSLES = getString(R.string.pref_opensles_key); |
62 | 64 |
63 keyPrefRoomServerUrl = getString(R.string.pref_room_server_url_key); | 65 keyPrefRoomServerUrl = getString(R.string.pref_room_server_url_key); |
64 keyPrefDisplayHud = getString(R.string.pref_displayhud_key); | 66 keyPrefDisplayHud = getString(R.string.pref_displayhud_key); |
65 | 67 |
66 // Display the fragment as the main content. | 68 // Display the fragment as the main content. |
67 settingsFragment = new SettingsFragment(); | 69 settingsFragment = new SettingsFragment(); |
68 getFragmentManager().beginTransaction() | 70 getFragmentManager().beginTransaction() |
69 .replace(android.R.id.content, settingsFragment) | 71 .replace(android.R.id.content, settingsFragment) |
70 .commit(); | 72 .commit(); |
(...skipping 15 matching lines...) Expand all Loading... |
86 setVideoBitrateEnable(sharedPreferences); | 88 setVideoBitrateEnable(sharedPreferences); |
87 updateSummary(sharedPreferences, keyPrefVideoCodec); | 89 updateSummary(sharedPreferences, keyPrefVideoCodec); |
88 updateSummaryB(sharedPreferences, keyprefHwCodec); | 90 updateSummaryB(sharedPreferences, keyprefHwCodec); |
89 updateSummaryB(sharedPreferences, keyprefCaptureToTexture); | 91 updateSummaryB(sharedPreferences, keyprefCaptureToTexture); |
90 | 92 |
91 updateSummary(sharedPreferences, keyprefStartAudioBitrateType); | 93 updateSummary(sharedPreferences, keyprefStartAudioBitrateType); |
92 updateSummaryBitrate(sharedPreferences, keyprefStartAudioBitrateValue); | 94 updateSummaryBitrate(sharedPreferences, keyprefStartAudioBitrateValue); |
93 setAudioBitrateEnable(sharedPreferences); | 95 setAudioBitrateEnable(sharedPreferences); |
94 updateSummary(sharedPreferences, keyPrefAudioCodec); | 96 updateSummary(sharedPreferences, keyPrefAudioCodec); |
95 updateSummaryB(sharedPreferences, keyprefNoAudioProcessing); | 97 updateSummaryB(sharedPreferences, keyprefNoAudioProcessing); |
| 98 updateSummaryB(sharedPreferences, keyprefAecDump); |
96 updateSummaryB(sharedPreferences, keyprefOpenSLES); | 99 updateSummaryB(sharedPreferences, keyprefOpenSLES); |
97 | 100 |
98 updateSummary(sharedPreferences, keyPrefRoomServerUrl); | 101 updateSummary(sharedPreferences, keyPrefRoomServerUrl); |
99 updateSummaryB(sharedPreferences, keyPrefDisplayHud); | 102 updateSummaryB(sharedPreferences, keyPrefDisplayHud); |
100 } | 103 } |
101 | 104 |
102 @Override | 105 @Override |
103 protected void onPause() { | 106 protected void onPause() { |
104 super.onPause(); | 107 super.onPause(); |
105 SharedPreferences sharedPreferences = | 108 SharedPreferences sharedPreferences = |
(...skipping 13 matching lines...) Expand all Loading... |
119 || key.equals(keyPrefRoomServerUrl)) { | 122 || key.equals(keyPrefRoomServerUrl)) { |
120 updateSummary(sharedPreferences, key); | 123 updateSummary(sharedPreferences, key); |
121 } else if (key.equals(keyprefStartVideoBitrateValue) | 124 } else if (key.equals(keyprefStartVideoBitrateValue) |
122 || key.equals(keyprefStartAudioBitrateValue)) { | 125 || key.equals(keyprefStartAudioBitrateValue)) { |
123 updateSummaryBitrate(sharedPreferences, key); | 126 updateSummaryBitrate(sharedPreferences, key); |
124 } else if (key.equals(keyprefVideoCall) | 127 } else if (key.equals(keyprefVideoCall) |
125 || key.equals(keyprefCaptureQualitySlider) | 128 || key.equals(keyprefCaptureQualitySlider) |
126 || key.equals(keyprefHwCodec) | 129 || key.equals(keyprefHwCodec) |
127 || key.equals(keyprefCaptureToTexture) | 130 || key.equals(keyprefCaptureToTexture) |
128 || key.equals(keyprefNoAudioProcessing) | 131 || key.equals(keyprefNoAudioProcessing) |
| 132 || key.equals(keyprefAecDump) |
129 || key.equals(keyprefOpenSLES) | 133 || key.equals(keyprefOpenSLES) |
130 || key.equals(keyPrefDisplayHud)) { | 134 || key.equals(keyPrefDisplayHud)) { |
131 updateSummaryB(sharedPreferences, key); | 135 updateSummaryB(sharedPreferences, key); |
132 } | 136 } |
133 if (key.equals(keyprefStartVideoBitrateType)) { | 137 if (key.equals(keyprefStartVideoBitrateType)) { |
134 setVideoBitrateEnable(sharedPreferences); | 138 setVideoBitrateEnable(sharedPreferences); |
135 } | 139 } |
136 if (key.equals(keyprefStartAudioBitrateType)) { | 140 if (key.equals(keyprefStartAudioBitrateType)) { |
137 setAudioBitrateEnable(sharedPreferences); | 141 setAudioBitrateEnable(sharedPreferences); |
138 } | 142 } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 String bitrateTypeDefault = getString(R.string.pref_startaudiobitrate_defaul
t); | 180 String bitrateTypeDefault = getString(R.string.pref_startaudiobitrate_defaul
t); |
177 String bitrateType = sharedPreferences.getString( | 181 String bitrateType = sharedPreferences.getString( |
178 keyprefStartAudioBitrateType, bitrateTypeDefault); | 182 keyprefStartAudioBitrateType, bitrateTypeDefault); |
179 if (bitrateType.equals(bitrateTypeDefault)) { | 183 if (bitrateType.equals(bitrateTypeDefault)) { |
180 bitratePreferenceValue.setEnabled(false); | 184 bitratePreferenceValue.setEnabled(false); |
181 } else { | 185 } else { |
182 bitratePreferenceValue.setEnabled(true); | 186 bitratePreferenceValue.setEnabled(true); |
183 } | 187 } |
184 } | 188 } |
185 } | 189 } |
OLD | NEW |