Add new Camera2Enumerator.isSupported with Context parameter.
The old method is marked deprecated and will be removed soon. The new method checks if all cameras on the device support better than legacy implementation of the camera2 API. BUG=webrtc:6390 Review-Url: https://codereview.webrtc.org/2354883002 Cr-Commit-Position: refs/heads/master@{#14350}
This commit is contained in:
@ -232,7 +232,7 @@ public class CallActivity extends Activity
|
||||
boolean loopback = intent.getBooleanExtra(EXTRA_LOOPBACK, false);
|
||||
boolean tracing = intent.getBooleanExtra(EXTRA_TRACING, false);
|
||||
|
||||
boolean useCamera2 = Camera2Enumerator.isSupported()
|
||||
boolean useCamera2 = Camera2Enumerator.isSupported(this)
|
||||
&& intent.getBooleanExtra(EXTRA_CAMERA2, true);
|
||||
|
||||
peerConnectionParameters = new PeerConnectionParameters(
|
||||
|
||||
@ -126,7 +126,7 @@ public class SettingsActivity extends Activity
|
||||
updateSummaryB(sharedPreferences, keyPrefDisplayHud);
|
||||
updateSummaryB(sharedPreferences, keyPrefTracing);
|
||||
|
||||
if (!Camera2Enumerator.isSupported()) {
|
||||
if (!Camera2Enumerator.isSupported(this)) {
|
||||
Preference camera2Preference =
|
||||
settingsFragment.findPreference(keyprefCamera2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user