mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-21 20:45:29 +03:00
Improve settings & Update webrtc stuff
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
ba5de1a7e0
commit
a49cab9b84
3 changed files with 35 additions and 16 deletions
|
@ -612,19 +612,21 @@ public class CallActivity extends AppCompatActivity {
|
|||
|
||||
private void gotRemoteStream(MediaStream stream) {
|
||||
//we have remote video stream. add to the renderer.
|
||||
final VideoTrack videoTrack = stream.videoTracks.getFirst();
|
||||
AudioTrack audioTrack = stream.audioTracks.getFirst();
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
remoteRenderer = new VideoRenderer(fullScreenVideoView);
|
||||
videoTrack.addRenderer(remoteRenderer);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
if (stream.videoTracks.size() == 1 && stream.audioTracks.size() == 1) {
|
||||
final VideoTrack videoTrack = stream.videoTracks.get(0);
|
||||
AudioTrack audioTrack = stream.audioTracks.get(0);
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
remoteRenderer = new VideoRenderer(fullScreenVideoView);
|
||||
videoTrack.addRenderer(remoteRenderer);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -108,6 +108,9 @@ public class SettingsController extends BaseController {
|
|||
@BindView(R.id.display_name_text)
|
||||
TextView displayNameTextView;
|
||||
|
||||
@BindView(R.id.base_url_text)
|
||||
TextView baseUrlTextView;
|
||||
|
||||
@BindView(R.id.settings_remove_account)
|
||||
MaterialStandardPreference removeAccountButton;
|
||||
|
||||
|
@ -138,6 +141,8 @@ public class SettingsController extends BaseController {
|
|||
@Inject
|
||||
UserUtils userUtils;
|
||||
|
||||
private UserEntity userEntity;
|
||||
|
||||
private OnPreferenceValueChangedListener<String> proxyTypeChangeListener;
|
||||
private OnPreferenceValueChangedListener<Boolean> proxyCredentialsChangeListener;
|
||||
|
||||
|
@ -204,8 +209,11 @@ public class SettingsController extends BaseController {
|
|||
|
||||
versionInfo.setSummary("v" + BuildConfig.VERSION_NAME);
|
||||
|
||||
UserEntity userEntity = userUtils.getCurrentUser();
|
||||
userEntity = userUtils.getCurrentUser();
|
||||
if (userEntity != null) {
|
||||
|
||||
baseUrlTextView.setText(userEntity.getBaseUrl());
|
||||
|
||||
reauthorizeButton.setOnClickListener(view14 -> {
|
||||
reauthorizeButton.setEnabled(false);
|
||||
getParentController().getRouter().pushController(RouterTransaction.with(
|
||||
|
@ -251,7 +259,7 @@ public class SettingsController extends BaseController {
|
|||
hideProxyCredentials();
|
||||
}
|
||||
|
||||
UserEntity userEntity = userUtils.getCurrentUser();
|
||||
userEntity = userUtils.getCurrentUser();
|
||||
if (userEntity != null) {
|
||||
// Awful hack
|
||||
if (userEntity.getDisplayName() != null) {
|
||||
|
|
|
@ -63,13 +63,22 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/avatar_image"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_margin="@dimen/margin_between_elements"/>
|
||||
android:layout_marginTop="@dimen/margin_between_elements"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/base_url_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/display_name_text"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_margin="4dp"/>
|
||||
|
||||
|
||||
<com.yarolegovich.mp.MaterialStandardPreference
|
||||
android:id="@+id/settings_switch"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/display_name_text"
|
||||
android:layout_below="@id/base_url_text"
|
||||
android:tag="switchAccountButton"
|
||||
apc:mp_title="@string/nc_settings_switch_account"/>
|
||||
|
||||
|
|
Loading…
Reference in a new issue