Migrated to androidX

This commit is contained in:
Sylvain Berfini 2018-11-23 16:30:14 +01:00
parent cd0148d4b0
commit 6d9339b463
45 changed files with 78 additions and 112 deletions

View file

@ -109,10 +109,10 @@ dependencies {
implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.android.billingclient:billing:1.2'
implementation 'org.apache.commons:commons-compress:1.16.1'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.google.android.material:material:1.1.0-alpha01'
if (isLocalAarAvailable()) {
implementation project(":linphone-sdk-android")
} else {

View file

@ -282,7 +282,7 @@
</service>
<provider
android:name="android.support.v4.content.FileProvider"
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">

View file

@ -36,11 +36,11 @@ import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.provider.Settings;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v4.widget.DrawerLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.LayoutInflater;

View file

@ -36,8 +36,8 @@ import android.content.pm.PackageManager;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;

View file

@ -36,9 +36,9 @@ import android.os.Bundle;
import android.os.CountDownTimer;
import android.os.Handler;
import android.os.SystemClock;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v4.widget.DrawerLayout;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import android.text.Html;
import android.view.Gravity;
import android.view.KeyEvent;

View file

@ -26,7 +26,7 @@ import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.support.v4.app.ActivityCompat;
import androidx.core.app.ActivityCompat;
import android.view.KeyEvent;
import android.view.WindowManager;
import android.widget.ImageView;
@ -56,7 +56,6 @@ import org.linphone.views.CallIncomingButtonListener;
import org.linphone.views.CallIncomingDeclineButton;
import java.util.ArrayList;
import java.util.List;
public class CallIncomingActivity extends LinphoneGenericActivity {
private static CallIncomingActivity instance;

View file

@ -23,7 +23,7 @@ import android.Manifest;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.support.v4.app.ActivityCompat;
import androidx.core.app.ActivityCompat;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.LayoutInflater;
@ -53,7 +53,6 @@ import org.linphone.core.Reason;
import org.linphone.mediastream.Log;
import java.util.ArrayList;
import java.util.List;
public class CallOutgoingActivity extends LinphoneGenericActivity implements OnClickListener {
private static CallOutgoingActivity instance;

View file

@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
package org.linphone.chat;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import androidx.recyclerview.widget.RecyclerView;
import android.text.Spanned;
import android.text.method.LinkMovementMethod;
import android.view.View;
@ -63,8 +63,6 @@ public class ChatMessageViewHolder extends RecyclerView.ViewHolder implements Vi
public ImageView outgoingImdn;
public TextView messageText;
public RecyclerView pictures;
public CheckBox delete;
private ClickListener mListener;
@ -93,8 +91,6 @@ public class ChatMessageViewHolder extends RecyclerView.ViewHolder implements Vi
outgoingImdn = view.findViewById(R.id.imdn);
messageText = view.findViewById(R.id.message);
pictures = view.findViewById(R.id.pictures);
delete = view.findViewById(R.id.delete_message);
}
@ -118,7 +114,6 @@ public class ChatMessageViewHolder extends RecyclerView.ViewHolder implements Vi
timeText.setVisibility(View.VISIBLE);
outgoingImdn.setVisibility(View.GONE);
avatarLayout.setVisibility(View.GONE);
pictures.setVisibility(View.GONE);
sendInProgress.setVisibility(View.GONE);
ChatMessage.State status = message.getState();
@ -188,14 +183,5 @@ public class ChatMessageViewHolder extends RecyclerView.ViewHolder implements Vi
fileContents.add(c);
}
}
/*if (fileContents.size() > 0) {
pictures.setVisibility(View.VISIBLE);
mAdapter = new ChatBubbleFilesAdapter(mContext, message, fileContents);
pictures.setAdapter(mAdapter);
pictures.setHasFixedSize(true);
mLayoutManager = new StaggeredGridLayoutManager(1, StaggeredGridLayoutManager.HORIZONTAL);
pictures.setLayoutManager(mLayoutManager);
}*/
}
}

View file

@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
package org.linphone.chat;
import android.content.Context;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

View file

@ -35,8 +35,8 @@ import android.os.Handler;
import android.os.Looper;
import android.os.Parcelable;
import android.provider.MediaStore;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.ContextMenu;

View file

@ -21,9 +21,9 @@ package org.linphone.chat;
import android.app.Fragment;
import android.os.Bundle;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

View file

@ -22,7 +22,7 @@ package org.linphone.chat;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.support.v7.widget.RecyclerView;
import androidx.recyclerview.widget.RecyclerView;
import android.view.View;
import android.widget.CheckBox;
import android.widget.ImageView;

View file

@ -22,9 +22,9 @@ package org.linphone.chat;
import android.app.Fragment;
import android.content.Context;
import android.os.Bundle;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -44,7 +44,6 @@ import org.linphone.core.CoreListenerStub;
import org.linphone.core.EventLog;
import org.linphone.core.ProxyConfig;
import org.linphone.fragments.FragmentsAvailable;
import org.linphone.mediastream.Log;
import org.linphone.utils.SelectableHelper;
import java.io.File;

View file

@ -19,8 +19,8 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
public abstract class ChatScrollListener extends RecyclerView.OnScrollListener {
// The minimum amount of items to have below your current scroll position

View file

@ -21,7 +21,7 @@ package org.linphone.chat;
import android.app.Fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import androidx.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

View file

@ -19,8 +19,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
package org.linphone.chat;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -33,7 +33,6 @@ import org.linphone.R;
import org.linphone.contacts.ContactAddress;
import org.linphone.contacts.LinphoneContact;
import org.linphone.core.ChatRoom;
import org.linphone.core.ChatRoomCapabilities;
import org.linphone.core.Participant;
import org.linphone.views.ContactAvatar;

View file

@ -23,9 +23,9 @@ import android.app.Dialog;
import android.app.Fragment;
import android.content.Context;
import android.os.Bundle;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.LayoutInflater;

View file

@ -21,7 +21,7 @@ package org.linphone.chat;
import android.app.Fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import androidx.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

View file

@ -24,9 +24,7 @@ import android.app.Notification;
import android.app.PendingIntent;
import android.content.Context;
import android.graphics.Bitmap;
import android.support.v4.content.ContextCompat;
import android.view.ViewTreeObserver;
import android.view.ViewTreeObserver.OnGlobalLayoutListener;
import androidx.core.content.ContextCompat;
import org.linphone.R;

View file

@ -20,8 +20,8 @@ package org.linphone.contacts;
*/
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -33,7 +33,6 @@ import android.widget.SectionIndexer;
import android.widget.TextView;
import org.linphone.R;
import org.linphone.mediastream.Log;
import org.linphone.views.ContactAvatar;
import org.linphone.utils.SelectableAdapter;
import org.linphone.utils.SelectableHelper;

View file

@ -23,9 +23,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import android.app.Fragment;
import android.content.Context;
import android.os.Bundle;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

View file

@ -19,8 +19,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
package org.linphone.contacts;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

View file

@ -25,7 +25,7 @@ import android.content.Intent;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import androidx.core.content.ContextCompat;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;

View file

@ -26,7 +26,7 @@ import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.content.ContextCompat;
import androidx.core.content.ContextCompat;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;

View file

@ -21,7 +21,7 @@ package org.linphone.history;
import android.annotation.SuppressLint;
import android.content.Context;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

View file

@ -22,9 +22,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import android.app.Fragment;
import android.content.Context;
import android.os.Bundle;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;

View file

@ -19,7 +19,7 @@ package org.linphone.history;
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import android.support.v7.widget.RecyclerView;
import androidx.recyclerview.widget.RecyclerView;
import android.view.View;
import android.widget.CheckBox;
import android.widget.ImageView;

View file

@ -19,7 +19,7 @@ package org.linphone.utils;
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import android.support.v7.widget.RecyclerView;
import androidx.recyclerview.widget.RecyclerView;
import android.util.SparseBooleanArray;
import java.util.ArrayList;

View file

@ -21,7 +21,7 @@ package org.linphone.utils;
import android.app.Dialog;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import androidx.recyclerview.widget.RecyclerView;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

View file

@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import android.content.Context;
import android.support.annotation.Nullable;
import androidx.annotation.Nullable;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;

View file

@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import android.content.Context;
import android.support.annotation.Nullable;
import androidx.annotation.Nullable;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;

View file

@ -6,7 +6,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.widget.DrawerLayout
<androidx.drawerlayout.widget.DrawerLayout
android:id="@+id/side_menu"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -441,7 +441,7 @@
</RelativeLayout>
</android.support.v4.widget.DrawerLayout>
</androidx.drawerlayout.widget.DrawerLayout>
<fragment
android:id="@+id/status"

View file

@ -12,7 +12,7 @@
android:layout_height="35dp"
tools:layout="@layout/status" />
<android.support.v4.widget.DrawerLayout
<androidx.drawerlayout.widget.DrawerLayout
android:id="@+id/side_menu"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -287,6 +287,6 @@
</LinearLayout>
</RelativeLayout>
</android.support.v4.widget.DrawerLayout>
</androidx.drawerlayout.widget.DrawerLayout>
</RelativeLayout>

View file

@ -12,7 +12,7 @@
android:layout_height="35dp"
tools:layout="@layout/status" />
<android.support.v4.widget.DrawerLayout
<androidx.drawerlayout.widget.DrawerLayout
android:id="@+id/side_menu"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -292,6 +292,6 @@
</RelativeLayout>
</android.support.v4.widget.DrawerLayout>
</androidx.drawerlayout.widget.DrawerLayout>
</RelativeLayout>

View file

@ -12,7 +12,7 @@
android:layout_height="40dp"
tools:layout="@layout/status" />
<android.support.v4.widget.DrawerLayout
<androidx.drawerlayout.widget.DrawerLayout
android:id="@+id/side_menu"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -291,6 +291,6 @@
</RelativeLayout>
</android.support.v4.widget.DrawerLayout>
</androidx.drawerlayout.widget.DrawerLayout>
</RelativeLayout>

View file

@ -6,7 +6,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.widget.DrawerLayout
<androidx.drawerlayout.widget.DrawerLayout
android:id="@+id/side_menu"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -441,7 +441,7 @@
</RelativeLayout>
</android.support.v4.widget.DrawerLayout>
</androidx.drawerlayout.widget.DrawerLayout>
<fragment
android:id="@+id/status"

View file

@ -176,7 +176,7 @@
android:layout_height="wrap_content"
android:layout_above="@id/footer"/>
<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/chat_message_list"
android:divider="@android:color/transparent"
android:choiceMode="multipleChoice"

View file

@ -110,26 +110,13 @@
android:paddingBottom="10dp"
android:paddingTop="10dp">
<android.support.v7.widget.RecyclerView
android:id="@+id/pictures"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:divider="@android:color/transparent"
android:choiceMode="multipleChoice"
android:transcriptMode="normal"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:cacheColorHint="@color/transparent"
android:listSelector="@color/transparent"/>
<TextView
android:id="@+id/message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/chat_bubble_message_font"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_below="@id/pictures"/>
android:layout_marginRight="10dp"/>
</RelativeLayout>

View file

@ -173,7 +173,7 @@
android:layout_height="match_parent"
android:id="@+id/relativeLayout">
<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/contactsList"
android:layout_width="match_parent"
android:layout_height="match_parent"

View file

@ -99,7 +99,7 @@
</RelativeLayout>
<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/chat_room_participants"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -107,7 +107,7 @@
android:divider="@color/colorE"
android:dividerHeight="1dp">
</android.support.v7.widget.RecyclerView>
</androidx.recyclerview.widget.RecyclerView>
<LinearLayout
android:id="@+id/leaveGroupLayout"

View file

@ -65,7 +65,7 @@
<include layout="@layout/edit_list"/>
<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/chatList"
android:layout_width="match_parent"
android:layout_height="match_parent"

View file

@ -112,7 +112,7 @@
android:layout_height="match_parent">
<!--android:fastScrollAlwaysVisible="true"-->
<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/contactsList"
android:layout_width="match_parent"
android:layout_height="match_parent"

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.appcompat.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/context_bar"
android:background="@color/colorA"
android:layout_width="match_parent"
@ -132,4 +132,4 @@
android:padding="15dp"/>
<include layout="@layout/edit_list"/>
</LinearLayout>
</android.support.v7.widget.Toolbar>
</androidx.appcompat.widget.Toolbar>

View file

@ -76,7 +76,7 @@
<include layout="@layout/edit_list"/>
<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/history_list"
android:layout_width="match_parent"
android:layout_height="match_parent"

View file

@ -12,7 +12,7 @@
android:layout_height="40dp"
tools:layout="@layout/status" />
<android.support.v4.widget.DrawerLayout
<androidx.drawerlayout.widget.DrawerLayout
android:id="@+id/side_menu"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -281,6 +281,6 @@
</LinearLayout>
</RelativeLayout>
</android.support.v4.widget.DrawerLayout>
</androidx.drawerlayout.widget.DrawerLayout>
</RelativeLayout>