Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(916)

Side by Side Diff: talk/examples/android/src/org/appspot/apprtc/SettingsActivity.java

Issue 1176023002: Relanding https://webrtc-codereview.appspot.com/56589004 (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 private String keyprefResolution; 43 private String keyprefResolution;
44 private String keyprefFps; 44 private String keyprefFps;
45 private String keyprefStartVideoBitrateType; 45 private String keyprefStartVideoBitrateType;
46 private String keyprefStartVideoBitrateValue; 46 private String keyprefStartVideoBitrateValue;
47 private String keyPrefVideoCodec; 47 private String keyPrefVideoCodec;
48 private String keyprefHwCodec; 48 private String keyprefHwCodec;
49 49
50 private String keyprefStartAudioBitrateType; 50 private String keyprefStartAudioBitrateType;
51 private String keyprefStartAudioBitrateValue; 51 private String keyprefStartAudioBitrateValue;
52 private String keyPrefAudioCodec; 52 private String keyPrefAudioCodec;
53 private String keyprefNoAudioProcessing;
53 54
54 private String keyprefCpuUsageDetection; 55 private String keyprefCpuUsageDetection;
55 private String keyPrefRoomServerUrl; 56 private String keyPrefRoomServerUrl;
56 private String keyPrefDisplayHud; 57 private String keyPrefDisplayHud;
57 58
58 @Override 59 @Override
59 protected void onCreate(Bundle savedInstanceState) { 60 protected void onCreate(Bundle savedInstanceState) {
60 super.onCreate(savedInstanceState); 61 super.onCreate(savedInstanceState);
61 keyprefVideoCall = getString(R.string.pref_videocall_key); 62 keyprefVideoCall = getString(R.string.pref_videocall_key);
62 keyprefResolution = getString(R.string.pref_resolution_key); 63 keyprefResolution = getString(R.string.pref_resolution_key);
63 keyprefFps = getString(R.string.pref_fps_key); 64 keyprefFps = getString(R.string.pref_fps_key);
64 keyprefStartVideoBitrateType = getString(R.string.pref_startvideobitrate_key ); 65 keyprefStartVideoBitrateType = getString(R.string.pref_startvideobitrate_key );
65 keyprefStartVideoBitrateValue = getString(R.string.pref_startvideobitrateval ue_key); 66 keyprefStartVideoBitrateValue = getString(R.string.pref_startvideobitrateval ue_key);
66 keyPrefVideoCodec = getString(R.string.pref_videocodec_key); 67 keyPrefVideoCodec = getString(R.string.pref_videocodec_key);
67 keyprefHwCodec = getString(R.string.pref_hwcodec_key); 68 keyprefHwCodec = getString(R.string.pref_hwcodec_key);
68 69
69 keyprefStartAudioBitrateType = getString(R.string.pref_startaudiobitrate_key ); 70 keyprefStartAudioBitrateType = getString(R.string.pref_startaudiobitrate_key );
70 keyprefStartAudioBitrateValue = getString(R.string.pref_startaudiobitrateval ue_key); 71 keyprefStartAudioBitrateValue = getString(R.string.pref_startaudiobitrateval ue_key);
71 keyPrefAudioCodec = getString(R.string.pref_audiocodec_key); 72 keyPrefAudioCodec = getString(R.string.pref_audiocodec_key);
73 keyprefNoAudioProcessing = getString(R.string.pref_noaudioprocessing_key);
72 74
73 keyprefCpuUsageDetection = getString(R.string.pref_cpu_usage_detection_key); 75 keyprefCpuUsageDetection = getString(R.string.pref_cpu_usage_detection_key);
74 keyPrefRoomServerUrl = getString(R.string.pref_room_server_url_key); 76 keyPrefRoomServerUrl = getString(R.string.pref_room_server_url_key);
75 keyPrefDisplayHud = getString(R.string.pref_displayhud_key); 77 keyPrefDisplayHud = getString(R.string.pref_displayhud_key);
76 78
77 // Display the fragment as the main content. 79 // Display the fragment as the main content.
78 settingsFragment = new SettingsFragment(); 80 settingsFragment = new SettingsFragment();
79 getFragmentManager().beginTransaction() 81 getFragmentManager().beginTransaction()
80 .replace(android.R.id.content, settingsFragment) 82 .replace(android.R.id.content, settingsFragment)
81 .commit(); 83 .commit();
(...skipping 12 matching lines...) Expand all
94 updateSummary(sharedPreferences, keyprefStartVideoBitrateType); 96 updateSummary(sharedPreferences, keyprefStartVideoBitrateType);
95 updateSummaryBitrate(sharedPreferences, keyprefStartVideoBitrateValue); 97 updateSummaryBitrate(sharedPreferences, keyprefStartVideoBitrateValue);
96 setVideoBitrateEnable(sharedPreferences); 98 setVideoBitrateEnable(sharedPreferences);
97 updateSummary(sharedPreferences, keyPrefVideoCodec); 99 updateSummary(sharedPreferences, keyPrefVideoCodec);
98 updateSummaryB(sharedPreferences, keyprefHwCodec); 100 updateSummaryB(sharedPreferences, keyprefHwCodec);
99 101
100 updateSummary(sharedPreferences, keyprefStartAudioBitrateType); 102 updateSummary(sharedPreferences, keyprefStartAudioBitrateType);
101 updateSummaryBitrate(sharedPreferences, keyprefStartAudioBitrateValue); 103 updateSummaryBitrate(sharedPreferences, keyprefStartAudioBitrateValue);
102 setAudioBitrateEnable(sharedPreferences); 104 setAudioBitrateEnable(sharedPreferences);
103 updateSummary(sharedPreferences, keyPrefAudioCodec); 105 updateSummary(sharedPreferences, keyPrefAudioCodec);
106 updateSummaryB(sharedPreferences, keyprefNoAudioProcessing);
104 107
105 updateSummaryB(sharedPreferences, keyprefCpuUsageDetection); 108 updateSummaryB(sharedPreferences, keyprefCpuUsageDetection);
106 updateSummary(sharedPreferences, keyPrefRoomServerUrl); 109 updateSummary(sharedPreferences, keyPrefRoomServerUrl);
107 updateSummaryB(sharedPreferences, keyPrefDisplayHud); 110 updateSummaryB(sharedPreferences, keyPrefDisplayHud);
108 } 111 }
109 112
110 @Override 113 @Override
111 protected void onPause() { 114 protected void onPause() {
112 super.onPause(); 115 super.onPause();
113 SharedPreferences sharedPreferences = 116 SharedPreferences sharedPreferences =
(...skipping 10 matching lines...) Expand all
124 || key.equals(keyPrefVideoCodec) 127 || key.equals(keyPrefVideoCodec)
125 || key.equals(keyprefStartAudioBitrateType) 128 || key.equals(keyprefStartAudioBitrateType)
126 || key.equals(keyPrefAudioCodec) 129 || key.equals(keyPrefAudioCodec)
127 || key.equals(keyPrefRoomServerUrl)) { 130 || key.equals(keyPrefRoomServerUrl)) {
128 updateSummary(sharedPreferences, key); 131 updateSummary(sharedPreferences, key);
129 } else if (key.equals(keyprefStartVideoBitrateValue) 132 } else if (key.equals(keyprefStartVideoBitrateValue)
130 || key.equals(keyprefStartAudioBitrateValue)) { 133 || key.equals(keyprefStartAudioBitrateValue)) {
131 updateSummaryBitrate(sharedPreferences, key); 134 updateSummaryBitrate(sharedPreferences, key);
132 } else if (key.equals(keyprefVideoCall) 135 } else if (key.equals(keyprefVideoCall)
133 || key.equals(keyprefHwCodec) 136 || key.equals(keyprefHwCodec)
137 || key.equals(keyprefNoAudioProcessing)
134 || key.equals(keyprefCpuUsageDetection) 138 || key.equals(keyprefCpuUsageDetection)
135 || key.equals(keyPrefDisplayHud)) { 139 || key.equals(keyPrefDisplayHud)) {
136 updateSummaryB(sharedPreferences, key); 140 updateSummaryB(sharedPreferences, key);
137 } 141 }
138 if (key.equals(keyprefStartVideoBitrateType)) { 142 if (key.equals(keyprefStartVideoBitrateType)) {
139 setVideoBitrateEnable(sharedPreferences); 143 setVideoBitrateEnable(sharedPreferences);
140 } 144 }
141 if (key.equals(keyprefStartAudioBitrateType)) { 145 if (key.equals(keyprefStartAudioBitrateType)) {
142 setAudioBitrateEnable(sharedPreferences); 146 setAudioBitrateEnable(sharedPreferences);
143 } 147 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 String bitrateTypeDefault = getString(R.string.pref_startaudiobitrate_defaul t); 185 String bitrateTypeDefault = getString(R.string.pref_startaudiobitrate_defaul t);
182 String bitrateType = sharedPreferences.getString( 186 String bitrateType = sharedPreferences.getString(
183 keyprefStartAudioBitrateType, bitrateTypeDefault); 187 keyprefStartAudioBitrateType, bitrateTypeDefault);
184 if (bitrateType.equals(bitrateTypeDefault)) { 188 if (bitrateType.equals(bitrateTypeDefault)) {
185 bitratePreferenceValue.setEnabled(false); 189 bitratePreferenceValue.setEnabled(false);
186 } else { 190 } else {
187 bitratePreferenceValue.setEnabled(true); 191 bitratePreferenceValue.setEnabled(true);
188 } 192 }
189 } 193 }
190 } 194 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698