From c445edaa6ece3293f675b970854c08f24e3743cb Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Mon, 18 Dec 2017 23:31:18 +0100 Subject: [PATCH] Change color for providers text Signed-off-by: Mario Danic --- .../talk/activities/CallActivity.java | 23 +++++-------------- .../java/com/nextcloud/talk/api/NcApi.java | 1 + .../talk/controllers/RoomMenuController.java | 2 +- .../ServerSelectionController.java | 1 + .../talk/dagger/modules/RestModule.java | 1 + .../talk/events/MediaStreamEvent.java | 2 +- .../talk/events/PeerConnectionEvent.java | 9 ++++---- .../webrtc/MagicPeerConnectionWrapper.java | 2 +- .../talk/webrtc/MagicWebRTCUtils.java | 4 +++- .../layout/controller_server_selection.xml | 2 +- app/src/main/res/values/colors.xml | 2 ++ 11 files changed, 22 insertions(+), 27 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java index fac4ea0d3..0cc3294fc 100644 --- a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java +++ b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java @@ -112,25 +112,22 @@ import pub.devrel.easypermissions.AfterPermissionGranted; @AutoInjector(NextcloudTalkApplication.class) public class CallActivity extends AppCompatActivity { private static final String TAG = "CallActivity"; - + private static final String[] PERMISSIONS_CALL = { + android.Manifest.permission.CAMERA, + android.Manifest.permission.RECORD_AUDIO + }; @BindView(R.id.pip_video_view) SurfaceViewRenderer pipVideoView; - @BindView(R.id.full_screen_surface_view) SurfaceViewRenderer fullScreenVideoView; - @BindView(R.id.relative_layout) RelativeLayout relativeLayout; - @BindView(R.id.remote_renderers_layout) LinearLayout remoteRenderersLayout; - @Inject NcApi ncApi; - @Inject EventBus eventBus; - PeerConnectionFactory peerConnectionFactory; MediaConstraints audioConstraints; MediaConstraints videoConstraints; @@ -151,19 +148,11 @@ public class CallActivity extends AppCompatActivity { private String roomToken; private UserEntity userEntity; private String callSession; - private VideoCapturer videoCapturerAndroid; - private MediaStream localMediaStream; - private String credentials; private List magicPeerConnectionWrapperList = new ArrayList<>(); - private static final String[] PERMISSIONS_CALL = { - android.Manifest.permission.CAMERA, - android.Manifest.permission.RECORD_AUDIO - }; - private static int getSystemUiVisibility() { int flags = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN; flags |= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; @@ -258,7 +247,7 @@ public class CallActivity extends AppCompatActivity { // Some permission is permanently denied so we cannot request them normally. OpenAppDetailsDialogFragment.show( R.string.nc_permissions_permanently_denied, - R.string.nc_permissions_settings , this); + R.string.nc_permissions_settings, this); } else { EffortlessPermissions.requestPermissions(this, R.string.nc_permissions, 100, PERMISSIONS_CALL); @@ -820,7 +809,7 @@ public class CallActivity extends AppCompatActivity { } else if (peerConnectionEvent.getPeerConnectionEventType().equals(PeerConnectionEvent .PeerConnectionEventType.SENSOR_FAR) || peerConnectionEvent.getPeerConnectionEventType().equals(PeerConnectionEvent - .PeerConnectionEventType.SENSOR_NEAR)) { + .PeerConnectionEventType.SENSOR_NEAR)) { /*boolean enableVideo = peerConnectionEvent.getPeerConnectionEventType().equals(PeerConnectionEvent .PeerConnectionEventType.SENSOR_FAR); diff --git a/app/src/main/java/com/nextcloud/talk/api/NcApi.java b/app/src/main/java/com/nextcloud/talk/api/NcApi.java index f52dd18c6..604bb43f1 100644 --- a/app/src/main/java/com/nextcloud/talk/api/NcApi.java +++ b/app/src/main/java/com/nextcloud/talk/api/NcApi.java @@ -163,6 +163,7 @@ public interface NcApi { @GET Observable getSignalingSettings(@Header("Authorization") String authorization, @Url String url); + /* QueryMap items are as follows: - "messages" : "message" diff --git a/app/src/main/java/com/nextcloud/talk/controllers/RoomMenuController.java b/app/src/main/java/com/nextcloud/talk/controllers/RoomMenuController.java index 5085f09d6..03aa9beaa 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/RoomMenuController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/RoomMenuController.java @@ -47,7 +47,7 @@ import eu.davidea.flexibleadapter.common.SmoothScrollLinearLayoutManager; import eu.davidea.flexibleadapter.items.AbstractFlexibleItem; @AutoInjector(NextcloudTalkApplication.class) -public class RoomMenuController extends BaseController implements FlexibleAdapter.OnItemClickListener{ +public class RoomMenuController extends BaseController implements FlexibleAdapter.OnItemClickListener { @BindView(R.id.recycler_view) RecyclerView recyclerView; private Room room; diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ServerSelectionController.java b/app/src/main/java/com/nextcloud/talk/controllers/ServerSelectionController.java index 16d7ce19f..02d00d1f1 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ServerSelectionController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/ServerSelectionController.java @@ -150,6 +150,7 @@ public class ServerSelectionController extends BaseController { textFieldBoxes.getEndIconImageButton().setAlpha(0.5f); } } + private void checkServerAndProceed() { dispose(); diff --git a/app/src/main/java/com/nextcloud/talk/dagger/modules/RestModule.java b/app/src/main/java/com/nextcloud/talk/dagger/modules/RestModule.java index 58dee126f..b073e5f82 100644 --- a/app/src/main/java/com/nextcloud/talk/dagger/modules/RestModule.java +++ b/app/src/main/java/com/nextcloud/talk/dagger/modules/RestModule.java @@ -117,6 +117,7 @@ public class RestModule { CookieManager provideCookieManager() { return new CookieManager(); } + @Provides @Singleton Cache provideCache() { diff --git a/app/src/main/java/com/nextcloud/talk/events/MediaStreamEvent.java b/app/src/main/java/com/nextcloud/talk/events/MediaStreamEvent.java index 9a90f54b4..de9a3c02e 100644 --- a/app/src/main/java/com/nextcloud/talk/events/MediaStreamEvent.java +++ b/app/src/main/java/com/nextcloud/talk/events/MediaStreamEvent.java @@ -31,7 +31,7 @@ public class MediaStreamEvent { private final MediaStream mediaStream; private final String session; - public MediaStreamEvent(@Nullable MediaStream mediaStream, String session) { + public MediaStreamEvent(@Nullable MediaStream mediaStream, String session) { this.mediaStream = mediaStream; this.session = session; } diff --git a/app/src/main/java/com/nextcloud/talk/events/PeerConnectionEvent.java b/app/src/main/java/com/nextcloud/talk/events/PeerConnectionEvent.java index dc84e5ab6..f0ca7fb49 100644 --- a/app/src/main/java/com/nextcloud/talk/events/PeerConnectionEvent.java +++ b/app/src/main/java/com/nextcloud/talk/events/PeerConnectionEvent.java @@ -26,15 +26,14 @@ import lombok.Data; @Data public class PeerConnectionEvent { - public enum PeerConnectionEventType { - CLOSE_PEER, SENSOR_FAR, SENSOR_NEAR - } - private final PeerConnectionEventType peerConnectionEventType; private final String sessionId; - public PeerConnectionEvent(PeerConnectionEventType peerConnectionEventType, @Nullable String sessionId) { this.peerConnectionEventType = peerConnectionEventType; this.sessionId = sessionId; } + + public enum PeerConnectionEventType { + CLOSE_PEER, SENSOR_FAR, SENSOR_NEAR + } } diff --git a/app/src/main/java/com/nextcloud/talk/webrtc/MagicPeerConnectionWrapper.java b/app/src/main/java/com/nextcloud/talk/webrtc/MagicPeerConnectionWrapper.java index b26d3c58f..65811a9da 100644 --- a/app/src/main/java/com/nextcloud/talk/webrtc/MagicPeerConnectionWrapper.java +++ b/app/src/main/java/com/nextcloud/talk/webrtc/MagicPeerConnectionWrapper.java @@ -48,8 +48,8 @@ import java.util.List; public class MagicPeerConnectionWrapper { private static String TAG = "MagicPeerConnectionWrapper"; - private PeerConnection peerConnection; List iceCandidates = new ArrayList<>(); + private PeerConnection peerConnection; private List iceServers; private String sessionId; private String localSession; diff --git a/app/src/main/java/com/nextcloud/talk/webrtc/MagicWebRTCUtils.java b/app/src/main/java/com/nextcloud/talk/webrtc/MagicWebRTCUtils.java index 8ce5276c6..cce8aa78c 100644 --- a/app/src/main/java/com/nextcloud/talk/webrtc/MagicWebRTCUtils.java +++ b/app/src/main/java/com/nextcloud/talk/webrtc/MagicWebRTCUtils.java @@ -75,7 +75,9 @@ public class MagicWebRTCUtils { return joinString(Arrays.asList(lines), "\r\n", true /* delimiterAtEnd */); } - /** Returns the line number containing "m=audio|video", or -1 if no such line exists. */ + /** + * Returns the line number containing "m=audio|video", or -1 if no such line exists. + */ private static int findMediaDescriptionLine(boolean isAudio, String[] sdpLines) { final String mediaDescription = isAudio ? "m=audio " : "m=video "; for (int i = 0; i < sdpLines.length; ++i) { diff --git a/app/src/main/res/layout/controller_server_selection.xml b/app/src/main/res/layout/controller_server_selection.xml index 8f7cfc9da..00bcccbd4 100644 --- a/app/src/main/res/layout/controller_server_selection.xml +++ b/app/src/main/res/layout/controller_server_selection.xml @@ -90,6 +90,6 @@ android:text="@string/nc_get_from_provider" android:textAlignment="center" android:textAllCaps="true" - android:textColor="@color/nc_white_color_complete"/> + android:textColor="@color/nc_light_blue_color"/> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 9ef642be3..d4424af7d 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -7,5 +7,7 @@ #D32F2F @color/per70white #FFFFFF + #7fC0E3 +