diff --git a/app/build.gradle b/app/build.gradle index 6b9c74b..66e589c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -55,6 +55,17 @@ android { buildConfigField "String", "pdf_view_url", "\"https://pdfviewer.communiquons.org/?file=\"" } } + + flavorDimensions "versions" + productFlavors { + + // "Normal" version of the application + normal { } + + // Version with video calls features + videoCalls {} + + } } dependencies { @@ -64,8 +75,12 @@ dependencies { implementation 'com.android.support:design:28.0.0' implementation 'com.android.support:preference-v7:28.0.0' implementation 'com.android.support:support-v4:28.0.0' - implementation 'com.squareup.okhttp3:okhttp:3.12.1' - implementation 'org.whispersystems:webrtc-android:M71' + + // Library required to make video calls + videoCallsImplementation 'com.squareup.okhttp3:okhttp:3.12.1' + videoCallsImplementation 'org.whispersystems:webrtc-android:M71' + + //Test testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 298ed7c..ae2fc0a 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -7,12 +7,6 @@ - - - - - - @@ -81,32 +75,6 @@ android:name=".ui.activities.AboutActivity" android:label="@string/activity_about_title" /> - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/activities/MainActivity.java b/app/src/main/java/org/communiquons/android/comunic/client/ui/activities/AbstractMainActivity.java similarity index 88% rename from app/src/main/java/org/communiquons/android/comunic/client/ui/activities/MainActivity.java rename to app/src/main/java/org/communiquons/android/comunic/client/ui/activities/AbstractMainActivity.java index dd6d581..cede91d 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/ui/activities/MainActivity.java +++ b/app/src/main/java/org/communiquons/android/comunic/client/ui/activities/AbstractMainActivity.java @@ -3,10 +3,8 @@ package org.communiquons.android.comunic.client.ui.activities; import android.Manifest; import android.app.Activity; import android.app.AlertDialog; -import android.app.Dialog; import android.content.BroadcastReceiver; import android.content.Context; -import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; import android.net.Uri; @@ -26,24 +24,18 @@ import android.widget.Toast; import org.communiquons.android.comunic.client.BuildConfig; import org.communiquons.android.comunic.client.R; -import org.communiquons.android.comunic.client.ui.utils.PermissionsUtils; -import org.communiquons.crashreporter.CrashReporter; import org.communiquons.android.comunic.client.data.enums.VirtualDirectoryType; import org.communiquons.android.comunic.client.data.helpers.APIRequestHelper; import org.communiquons.android.comunic.client.data.helpers.AccountHelper; import org.communiquons.android.comunic.client.data.helpers.ConversationsListHelper; import org.communiquons.android.comunic.client.data.helpers.DatabaseHelper; import org.communiquons.android.comunic.client.data.helpers.DebugHelper; -import org.communiquons.android.comunic.client.data.models.CallInformation; import org.communiquons.android.comunic.client.data.models.NotificationsCount; import org.communiquons.android.comunic.client.data.models.VirtualDirectory; import org.communiquons.android.comunic.client.data.runnables.FriendRefreshLoopRunnable; import org.communiquons.android.comunic.client.data.services.NotificationsService; import org.communiquons.android.comunic.client.data.utils.PreferencesUtils; -import org.communiquons.android.comunic.client.ui.asynctasks.CreateCallForConversationTask; import org.communiquons.android.comunic.client.ui.asynctasks.FindVirtualDirectoryTask; -import org.communiquons.android.comunic.client.ui.asynctasks.GetCallConfigurationTask; -import org.communiquons.android.comunic.client.ui.asynctasks.SafeAsyncTask; import org.communiquons.android.comunic.client.ui.fragments.ConversationFragment; import org.communiquons.android.comunic.client.ui.fragments.ConversationsListFragment; import org.communiquons.android.comunic.client.ui.fragments.FriendsListFragment; @@ -56,13 +48,14 @@ import org.communiquons.android.comunic.client.ui.fragments.groups.GroupPageMain import org.communiquons.android.comunic.client.ui.fragments.groups.UserGroupsFragment; import org.communiquons.android.comunic.client.ui.fragments.userpage.UserAccessDeniedFragment; import org.communiquons.android.comunic.client.ui.fragments.userpage.UserPageFragment; -import org.communiquons.android.comunic.client.ui.listeners.OnOpenCallListener; import org.communiquons.android.comunic.client.ui.listeners.OnOpenPageListener; import org.communiquons.android.comunic.client.ui.listeners.onPostOpenListener; import org.communiquons.android.comunic.client.ui.listeners.openConversationListener; import org.communiquons.android.comunic.client.ui.listeners.updateConversationListener; +import org.communiquons.android.comunic.client.ui.utils.PermissionsUtils; import org.communiquons.android.comunic.client.ui.utils.UiUtils; import org.communiquons.android.comunic.client.ui.views.NavigationBar; +import org.communiquons.crashreporter.CrashReporter; import java.util.Objects; @@ -77,9 +70,9 @@ import static org.communiquons.android.comunic.client.ui.Constants.PreferencesKe * * @author Pierre HUBERT */ -public class MainActivity extends BaseActivity implements +public abstract class AbstractMainActivity extends BaseActivity implements openConversationListener, updateConversationListener, OnOpenPageListener, - onPostOpenListener, NavigationBar.OnNavigationItemSelectedListener, OnOpenCallListener { + onPostOpenListener, NavigationBar.OnNavigationItemSelectedListener { /** * Debug tag @@ -191,11 +184,6 @@ public class MainActivity extends BaseActivity implements IntentFilter intentFilter = new IntentFilter(NotificationsService.BROADCAST_ACTION); LocalBroadcastManager.getInstance(this).registerReceiver(mBroadcastReceiver, intentFilter); - //Get calls configuration - GetCallConfigurationTask callConfigurationTask = new GetCallConfigurationTask(this); - callConfigurationTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); - getTasksManager().addTask(callConfigurationTask); - //Request a few permissions PermissionsUtils.RequestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 0); @@ -369,12 +357,7 @@ public class MainActivity extends BaseActivity implements PopupMenu popupMenu = new PopupMenu(this, mNavBar.getItemIdentifierView(R.id.action_more)); onCreateOptionsMenu(popupMenu.getMenu()); - popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() { - @Override - public boolean onMenuItemClick(MenuItem item) { - return onOptionsItemSelected(item); - } - }); + popupMenu.setOnMenuItemClickListener(this::onOptionsItemSelected); popupMenu.show(); return false; } @@ -397,7 +380,7 @@ public class MainActivity extends BaseActivity implements if(!(activity instanceof MainActivity)) throw new RuntimeException("Specified activity is not an instance of activity!"); - ((MainActivity)activity).mNavBar.setIdentifierSelected(id); + ((AbstractMainActivity)activity).mNavBar.setIdentifierSelected(id); } @@ -469,23 +452,17 @@ public class MainActivity extends BaseActivity implements .setMessage(R.string.popup_signout_message) .setCancelable(true) .setPositiveButton(R.string.popup_signout_confirm_button, - new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { + (dialog, which) -> { - //Sign out user - accountHelper.sign_out(); + //Sign out user + accountHelper.sign_out(); - //Redirect to login activity - startActivity(new Intent(MainActivity.this, LoginActivity.class)); + //Redirect to login activity + startActivity(new Intent(AbstractMainActivity.this, LoginActivity.class)); - } }) - .setNegativeButton(R.string.popup_signout_cancel_button, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - //Nothing now - } + .setNegativeButton(R.string.popup_signout_cancel_button, (dialog, which) -> { + //Nothing now }) //Show popup @@ -537,12 +514,9 @@ public class MainActivity extends BaseActivity implements unsetFindVirtualDirectoryTask(); mFindVirtualDirectoryTask = new FindVirtualDirectoryTask(this); - mFindVirtualDirectoryTask.setOnPostExecuteListener(new SafeAsyncTask.OnPostExecuteListener() { - @Override - public void OnPostExecute(VirtualDirectory virtualDirectory) { - dialog.dismiss(); - openDirectory(virtualDirectory); - } + mFindVirtualDirectoryTask.setOnPostExecuteListener(virtualDirectory -> { + dialog.dismiss(); + openDirectory(virtualDirectory); }); mFindVirtualDirectoryTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, tag); @@ -724,7 +698,7 @@ public class MainActivity extends BaseActivity implements if (integer != null) openConversation(integer); else - Toast.makeText(MainActivity.this, R.string.err_get_private_conversation, + Toast.makeText(AbstractMainActivity.this, R.string.err_get_private_conversation, Toast.LENGTH_SHORT).show(); } }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, userID); @@ -875,40 +849,5 @@ public class MainActivity extends BaseActivity implements transaction.commit(); } - @Override - public void createCallForConversation(int convID) { - final Dialog dialog = UiUtils.create_loading_dialog(this); - //Create the call for the conversation - CreateCallForConversationTask task = new CreateCallForConversationTask(this); - task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, convID); - getTasksManager().addTask(task, true); - task.setOnPostExecuteListener(new SafeAsyncTask.OnPostExecuteListener() { - @Override - public void OnPostExecute(@Nullable CallInformation callInformation) { - - dialog.dismiss(); - - //Check for errors - if(callInformation == null) - Toast.makeText( - MainActivity.this, - R.string.err_create_call_for_conversation, - Toast.LENGTH_SHORT).show(); - - else - //Open call - openCall(callInformation.getId()); - } - }); - } - - @Override - public void openCall(int callID) { - - Intent intent = new Intent(this, CallActivity.class); - intent.putExtra(CallActivity.ARGUMENT_CALL_ID, callID); - startActivity(intent); - - } } diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/fragments/ConversationFragment.java b/app/src/main/java/org/communiquons/android/comunic/client/ui/fragments/ConversationFragment.java index 64344fe..037ce91 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/ui/fragments/ConversationFragment.java +++ b/app/src/main/java/org/communiquons/android/comunic/client/ui/fragments/ConversationFragment.java @@ -500,9 +500,7 @@ public class ConversationFragment extends Fragment //Add call button (if possible) - if(CallsHelper.IsCallSystemAvailable() && info.getMembers().size() > 1 && info.getMembers().size() <= - Objects.requireNonNull(CallsHelper.GetCallsConfiguration()).getMaximumNumberMembers() && - !mHasCallButton) { + if(CallsHelper.IsCallSystemAvailableForConversation(info) && !mHasCallButton) { mHasCallButton = true; diff --git a/app/src/normal/java/org/communiquons/android/comunic/client/data/helpers/CallsHelper.java b/app/src/normal/java/org/communiquons/android/comunic/client/data/helpers/CallsHelper.java new file mode 100644 index 0000000..87617c1 --- /dev/null +++ b/app/src/normal/java/org/communiquons/android/comunic/client/data/helpers/CallsHelper.java @@ -0,0 +1,64 @@ +package org.communiquons.android.comunic.client.data.helpers; + +import android.content.Context; +import android.support.annotation.Nullable; + +import org.communiquons.android.comunic.client.data.models.ConversationInfo; + +/** + * Calls helper + * + * Placeholder for the flavor of the application where there is no call possible + * + * @author Pierre HUBERT + */ +public class CallsHelper extends BaseHelper { + + /** + * Debug tag + */ + private static final String TAG = CallsHelper.class.getSimpleName(); + + + public CallsHelper(Context context) { + super(context); + } + + /** + * Get call configuration if required + */ + public void getCallConfigurationIfRequired(){ + // Do nothing + } + + /** + * Get Calls configuration, if available + * + * Note if IsCallSystemAvailable returned TRUE, it is guaranteed that this method WILL NOT + * return null + * + * @return Calls configuration + */ + @Nullable + public static Object GetCallsConfiguration(){ + return null; + } + + + /** + * No call possible with this flavour + */ + public static boolean IsCallSystemAvailable(){ + return false; + } + + /** + * No call for no conversation + * + * @param conversation Target conversation + * @return false + */ + public static boolean IsCallSystemAvailableForConversation(ConversationInfo conversation){ + return false; + } +} diff --git a/app/src/normal/java/org/communiquons/android/comunic/client/ui/activities/MainActivity.java b/app/src/normal/java/org/communiquons/android/comunic/client/ui/activities/MainActivity.java new file mode 100644 index 0000000..653895d --- /dev/null +++ b/app/src/normal/java/org/communiquons/android/comunic/client/ui/activities/MainActivity.java @@ -0,0 +1,10 @@ +package org.communiquons.android.comunic.client.ui.activities; + + +/** + * Main activity for abstract configuration + * + * @author Pierre HUBERT + */ +public class MainActivity extends AbstractMainActivity { +} diff --git a/app/src/normal/java/org/communiquons/android/comunic/client/ui/receivers/PendingCallsBroadcastReceiver.java b/app/src/normal/java/org/communiquons/android/comunic/client/ui/receivers/PendingCallsBroadcastReceiver.java new file mode 100644 index 0000000..40a44ee --- /dev/null +++ b/app/src/normal/java/org/communiquons/android/comunic/client/ui/receivers/PendingCallsBroadcastReceiver.java @@ -0,0 +1,23 @@ +package org.communiquons.android.comunic.client.ui.receivers; + +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; + +/** + * Pending class broadcast receiver + * + * Does nothing in this flavor + * + * @author Pierre HUBERT + */ +public class PendingCallsBroadcastReceiver extends BroadcastReceiver { + @Override + public void onReceive(Context context, Intent intent) { + // Do nothing + } + + public static void RemoveCallNotification(Context context){ + // Do nothing + } +} diff --git a/app/src/videoCalls/AndroidManifest.xml b/app/src/videoCalls/AndroidManifest.xml new file mode 100644 index 0000000..b24440b --- /dev/null +++ b/app/src/videoCalls/AndroidManifest.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/java/org/appspot/apprtc/AppRTCClient.java b/app/src/videoCalls/java/org/appspot/apprtc/AppRTCClient.java similarity index 100% rename from app/src/main/java/org/appspot/apprtc/AppRTCClient.java rename to app/src/videoCalls/java/org/appspot/apprtc/AppRTCClient.java diff --git a/app/src/main/java/org/appspot/apprtc/PeerConnectionClient.java b/app/src/videoCalls/java/org/appspot/apprtc/PeerConnectionClient.java similarity index 100% rename from app/src/main/java/org/appspot/apprtc/PeerConnectionClient.java rename to app/src/videoCalls/java/org/appspot/apprtc/PeerConnectionClient.java diff --git a/app/src/main/java/org/appspot/apprtc/RecordedAudioToFileController.java b/app/src/videoCalls/java/org/appspot/apprtc/RecordedAudioToFileController.java similarity index 100% rename from app/src/main/java/org/appspot/apprtc/RecordedAudioToFileController.java rename to app/src/videoCalls/java/org/appspot/apprtc/RecordedAudioToFileController.java diff --git a/app/src/main/java/org/appspot/apprtc/RtcEventLog.java b/app/src/videoCalls/java/org/appspot/apprtc/RtcEventLog.java similarity index 100% rename from app/src/main/java/org/appspot/apprtc/RtcEventLog.java rename to app/src/videoCalls/java/org/appspot/apprtc/RtcEventLog.java diff --git a/app/src/main/java/org/communiquons/android/comunic/client/data/enums/MemberCallStatus.java b/app/src/videoCalls/java/org/communiquons/android/comunic/client/data/enums/MemberCallStatus.java similarity index 100% rename from app/src/main/java/org/communiquons/android/comunic/client/data/enums/MemberCallStatus.java rename to app/src/videoCalls/java/org/communiquons/android/comunic/client/data/enums/MemberCallStatus.java diff --git a/app/src/main/java/org/communiquons/android/comunic/client/data/helpers/CallsHelper.java b/app/src/videoCalls/java/org/communiquons/android/comunic/client/data/helpers/CallsHelper.java similarity index 94% rename from app/src/main/java/org/communiquons/android/comunic/client/data/helpers/CallsHelper.java rename to app/src/videoCalls/java/org/communiquons/android/comunic/client/data/helpers/CallsHelper.java index 68da433..0b0a762 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/data/helpers/CallsHelper.java +++ b/app/src/videoCalls/java/org/communiquons/android/comunic/client/data/helpers/CallsHelper.java @@ -11,6 +11,7 @@ import org.communiquons.android.comunic.client.data.models.CallInformation; import org.communiquons.android.comunic.client.data.models.CallMember; import org.communiquons.android.comunic.client.data.models.CallResponse; import org.communiquons.android.comunic.client.data.models.CallsConfiguration; +import org.communiquons.android.comunic.client.data.models.ConversationInfo; import org.communiquons.android.comunic.client.data.models.NextPendingCallInformation; import org.json.JSONArray; import org.json.JSONException; @@ -18,6 +19,7 @@ import org.json.JSONObject; import org.webrtc.PeerConnection; import java.util.ArrayList; +import java.util.Objects; /** * Calls helper @@ -93,6 +95,16 @@ public class CallsHelper extends BaseHelper { return mCallsConfiguration != null && mCallsConfiguration.isEnabled(); } + /** + * Check out whether call system is available for a given conversation or not + */ + public static boolean IsCallSystemAvailableForConversation(ConversationInfo conversation){ + return CallsHelper.IsCallSystemAvailable() && + conversation.getMembers().size() > 1 && + conversation.getMembers().size() <= Objects.requireNonNull( + CallsHelper.GetCallsConfiguration()).getMaximumNumberMembers(); + } + /** * Get the list of STUN and TURN servers * diff --git a/app/src/main/java/org/communiquons/android/comunic/client/data/models/CallInformation.java b/app/src/videoCalls/java/org/communiquons/android/comunic/client/data/models/CallInformation.java similarity index 100% rename from app/src/main/java/org/communiquons/android/comunic/client/data/models/CallInformation.java rename to app/src/videoCalls/java/org/communiquons/android/comunic/client/data/models/CallInformation.java diff --git a/app/src/main/java/org/communiquons/android/comunic/client/data/models/CallMember.java b/app/src/videoCalls/java/org/communiquons/android/comunic/client/data/models/CallMember.java similarity index 100% rename from app/src/main/java/org/communiquons/android/comunic/client/data/models/CallMember.java rename to app/src/videoCalls/java/org/communiquons/android/comunic/client/data/models/CallMember.java diff --git a/app/src/main/java/org/communiquons/android/comunic/client/data/models/CallResponse.java b/app/src/videoCalls/java/org/communiquons/android/comunic/client/data/models/CallResponse.java similarity index 100% rename from app/src/main/java/org/communiquons/android/comunic/client/data/models/CallResponse.java rename to app/src/videoCalls/java/org/communiquons/android/comunic/client/data/models/CallResponse.java diff --git a/app/src/main/java/org/communiquons/android/comunic/client/data/models/CallsConfiguration.java b/app/src/videoCalls/java/org/communiquons/android/comunic/client/data/models/CallsConfiguration.java similarity index 100% rename from app/src/main/java/org/communiquons/android/comunic/client/data/models/CallsConfiguration.java rename to app/src/videoCalls/java/org/communiquons/android/comunic/client/data/models/CallsConfiguration.java diff --git a/app/src/main/java/org/communiquons/android/comunic/client/data/models/NextPendingCallInformation.java b/app/src/videoCalls/java/org/communiquons/android/comunic/client/data/models/NextPendingCallInformation.java similarity index 100% rename from app/src/main/java/org/communiquons/android/comunic/client/data/models/NextPendingCallInformation.java rename to app/src/videoCalls/java/org/communiquons/android/comunic/client/data/models/NextPendingCallInformation.java diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/activities/CallActivity.java b/app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/activities/CallActivity.java similarity index 100% rename from app/src/main/java/org/communiquons/android/comunic/client/ui/activities/CallActivity.java rename to app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/activities/CallActivity.java diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/activities/IncomingCallActivity.java b/app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/activities/IncomingCallActivity.java similarity index 100% rename from app/src/main/java/org/communiquons/android/comunic/client/ui/activities/IncomingCallActivity.java rename to app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/activities/IncomingCallActivity.java diff --git a/app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/activities/MainActivity.java b/app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/activities/MainActivity.java new file mode 100644 index 0000000..b94c012 --- /dev/null +++ b/app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/activities/MainActivity.java @@ -0,0 +1,66 @@ +package org.communiquons.android.comunic.client.ui.activities; + +import android.app.Dialog; +import android.content.Intent; +import android.os.AsyncTask; +import android.os.Bundle; +import android.widget.Toast; + +import org.communiquons.android.comunic.client.R; +import org.communiquons.android.comunic.client.ui.asynctasks.CreateCallForConversationTask; +import org.communiquons.android.comunic.client.ui.asynctasks.GetCallConfigurationTask; +import org.communiquons.android.comunic.client.ui.listeners.OnOpenCallListener; +import org.communiquons.android.comunic.client.ui.utils.UiUtils; + + +/** + * MainActivity implementation for video calls + * + * @author Pierre HUBERT + */ +public class MainActivity extends AbstractMainActivity implements OnOpenCallListener { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + //Get calls configuration + GetCallConfigurationTask callConfigurationTask = new GetCallConfigurationTask(this); + callConfigurationTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); + getTasksManager().addTask(callConfigurationTask); + } + + @Override + public void createCallForConversation(int convID) { + final Dialog dialog = UiUtils.create_loading_dialog(this); + + //Create the call for the conversation + CreateCallForConversationTask task = new CreateCallForConversationTask(this); + task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, convID); + getTasksManager().addTask(task, true); + task.setOnPostExecuteListener(callInformation -> { + + dialog.dismiss(); + + //Check for errors + if(callInformation == null) + Toast.makeText( + MainActivity.this, + R.string.err_create_call_for_conversation, + Toast.LENGTH_SHORT).show(); + + else + //Open call + openCall(callInformation.getId()); + }); + } + + @Override + public void openCall(int callID) { + + Intent intent = new Intent(this, CallActivity.class); + intent.putExtra(CallActivity.ARGUMENT_CALL_ID, callID); + startActivity(intent); + + } +} \ No newline at end of file diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/arrays/CallPeersConnectionsList.java b/app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/arrays/CallPeersConnectionsList.java similarity index 100% rename from app/src/main/java/org/communiquons/android/comunic/client/ui/arrays/CallPeersConnectionsList.java rename to app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/arrays/CallPeersConnectionsList.java diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/asynctasks/CreateCallForConversationTask.java b/app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/asynctasks/CreateCallForConversationTask.java similarity index 100% rename from app/src/main/java/org/communiquons/android/comunic/client/ui/asynctasks/CreateCallForConversationTask.java rename to app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/asynctasks/CreateCallForConversationTask.java diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/asynctasks/GetCallConfigurationTask.java b/app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/asynctasks/GetCallConfigurationTask.java similarity index 100% rename from app/src/main/java/org/communiquons/android/comunic/client/ui/asynctasks/GetCallConfigurationTask.java rename to app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/asynctasks/GetCallConfigurationTask.java diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/asynctasks/GetCallInformationTask.java b/app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/asynctasks/GetCallInformationTask.java similarity index 100% rename from app/src/main/java/org/communiquons/android/comunic/client/ui/asynctasks/GetCallInformationTask.java rename to app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/asynctasks/GetCallInformationTask.java diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/asynctasks/GetNextPendingCallTask.java b/app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/asynctasks/GetNextPendingCallTask.java similarity index 100% rename from app/src/main/java/org/communiquons/android/comunic/client/ui/asynctasks/GetNextPendingCallTask.java rename to app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/asynctasks/GetNextPendingCallTask.java diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/asynctasks/HangUpCallTask.java b/app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/asynctasks/HangUpCallTask.java similarity index 100% rename from app/src/main/java/org/communiquons/android/comunic/client/ui/asynctasks/HangUpCallTask.java rename to app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/asynctasks/HangUpCallTask.java diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/asynctasks/RespondToCallTask.java b/app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/asynctasks/RespondToCallTask.java similarity index 100% rename from app/src/main/java/org/communiquons/android/comunic/client/ui/asynctasks/RespondToCallTask.java rename to app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/asynctasks/RespondToCallTask.java diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/models/CallPeerConnection.java b/app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/models/CallPeerConnection.java similarity index 100% rename from app/src/main/java/org/communiquons/android/comunic/client/ui/models/CallPeerConnection.java rename to app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/models/CallPeerConnection.java diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/receivers/PendingCallsBroadcastReceiver.java b/app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/receivers/PendingCallsBroadcastReceiver.java similarity index 98% rename from app/src/main/java/org/communiquons/android/comunic/client/ui/receivers/PendingCallsBroadcastReceiver.java rename to app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/receivers/PendingCallsBroadcastReceiver.java index 6a7cc8b..b08feff 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/ui/receivers/PendingCallsBroadcastReceiver.java +++ b/app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/receivers/PendingCallsBroadcastReceiver.java @@ -23,7 +23,6 @@ import org.communiquons.android.comunic.client.ui.activities.BaseActivity; import org.communiquons.android.comunic.client.ui.activities.CallActivity; import org.communiquons.android.comunic.client.ui.activities.IncomingCallActivity; import org.communiquons.android.comunic.client.ui.asynctasks.GetNextPendingCallTask; -import org.communiquons.android.comunic.client.ui.asynctasks.SafeAsyncTask; import org.communiquons.android.comunic.client.ui.utils.UiUtils; import java.util.Objects; diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/receivers/RejectCallReceiver.java b/app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/receivers/RejectCallReceiver.java similarity index 100% rename from app/src/main/java/org/communiquons/android/comunic/client/ui/receivers/RejectCallReceiver.java rename to app/src/videoCalls/java/org/communiquons/android/comunic/client/ui/receivers/RejectCallReceiver.java diff --git a/app/src/main/java/org/communiquons/signalexchangerclient/ClientRequest.java b/app/src/videoCalls/java/org/communiquons/signalexchangerclient/ClientRequest.java similarity index 100% rename from app/src/main/java/org/communiquons/signalexchangerclient/ClientRequest.java rename to app/src/videoCalls/java/org/communiquons/signalexchangerclient/ClientRequest.java diff --git a/app/src/main/java/org/communiquons/signalexchangerclient/SignalExchangerCallback.java b/app/src/videoCalls/java/org/communiquons/signalexchangerclient/SignalExchangerCallback.java similarity index 100% rename from app/src/main/java/org/communiquons/signalexchangerclient/SignalExchangerCallback.java rename to app/src/videoCalls/java/org/communiquons/signalexchangerclient/SignalExchangerCallback.java diff --git a/app/src/main/java/org/communiquons/signalexchangerclient/SignalExchangerClient.java b/app/src/videoCalls/java/org/communiquons/signalexchangerclient/SignalExchangerClient.java similarity index 100% rename from app/src/main/java/org/communiquons/signalexchangerclient/SignalExchangerClient.java rename to app/src/videoCalls/java/org/communiquons/signalexchangerclient/SignalExchangerClient.java diff --git a/app/src/main/java/org/communiquons/signalexchangerclient/SignalExchangerInitConfig.java b/app/src/videoCalls/java/org/communiquons/signalexchangerclient/SignalExchangerInitConfig.java similarity index 100% rename from app/src/main/java/org/communiquons/signalexchangerclient/SignalExchangerInitConfig.java rename to app/src/videoCalls/java/org/communiquons/signalexchangerclient/SignalExchangerInitConfig.java diff --git a/app/src/main/res/layout/activity_call.xml b/app/src/videoCalls/res/layout/activity_call.xml similarity index 100% rename from app/src/main/res/layout/activity_call.xml rename to app/src/videoCalls/res/layout/activity_call.xml diff --git a/app/src/main/res/layout/activity_incoming_call.xml b/app/src/videoCalls/res/layout/activity_incoming_call.xml similarity index 100% rename from app/src/main/res/layout/activity_incoming_call.xml rename to app/src/videoCalls/res/layout/activity_incoming_call.xml