More unused code removed
This commit is contained in:
parent
3802deee19
commit
e82537dbb6
21 changed files with 15 additions and 80 deletions
|
@ -616,7 +616,7 @@ public class LinphoneActivity extends LinphoneGenericActivity
|
|||
&& mCurrentFragment == FragmentsAvailable.HISTORY_DETAIL) {
|
||||
HistoryDetailFragment historyDetailFragment = (HistoryDetailFragment) fragment2;
|
||||
historyDetailFragment.changeDisplayedHistory(
|
||||
sipUri, displayName, pictureUri, status, callTime, callDate);
|
||||
sipUri, displayName, status, callTime, callDate);
|
||||
} else {
|
||||
Bundle extras = new Bundle();
|
||||
extras.putString("SipUri", sipUri);
|
||||
|
|
|
@ -146,7 +146,6 @@ import org.linphone.utils.MediaScannerListener;
|
|||
public class LinphoneManager implements CoreListener, SensorEventListener, AccountCreatorListener {
|
||||
|
||||
private static final int LINPHONE_VOLUME_STREAM = STREAM_VOICE_CALL;
|
||||
private static final int dbStep = 4;
|
||||
|
||||
private static LinphoneManager sInstance;
|
||||
private static boolean sExited;
|
||||
|
@ -361,7 +360,6 @@ public class LinphoneManager implements CoreListener, SensorEventListener, Accou
|
|||
new OpenH264DownloadHelperListener() {
|
||||
ProgressDialog progress;
|
||||
final int ctxt = 0;
|
||||
int box = 1;
|
||||
|
||||
@Override
|
||||
public void OnProgress(final int current, final int max) {
|
||||
|
@ -672,7 +670,7 @@ public class LinphoneManager implements CoreListener, SensorEventListener, Accou
|
|||
}
|
||||
}
|
||||
|
||||
private final synchronized void destroyCore() {
|
||||
private synchronized void destroyCore() {
|
||||
sExited = true;
|
||||
ContactsManagerDestroy();
|
||||
BluetoothManagerDestroy();
|
||||
|
|
|
@ -91,8 +91,6 @@ public class AssistantActivity extends Activity
|
|||
private static AssistantActivity sInstance;
|
||||
|
||||
public DialPlan country;
|
||||
public String phone_number;
|
||||
public String email;
|
||||
|
||||
private ImageView mBack, mCancel;
|
||||
private AssistantFragmentsEnum mCurrentFragment;
|
||||
|
|
|
@ -150,10 +150,6 @@ public class CreateAccountFragment extends Fragment
|
|||
mPhoneNumberInfo.setOnClickListener(this);
|
||||
mSelectCountry.setOnClickListener(this);
|
||||
|
||||
String previousPhone = AssistantActivity.instance().phone_number;
|
||||
if (previousPhone != null) {
|
||||
mPhoneNumberEdit.setText(previousPhone);
|
||||
}
|
||||
DialPlan c = AssistantActivity.instance().country;
|
||||
if (c != null) {
|
||||
mSelectCountry.setText(c.getCountry());
|
||||
|
|
|
@ -143,11 +143,6 @@ public class LinphoneLoginFragment extends Fragment
|
|||
mSelectCountry.setOnClickListener(this);
|
||||
mPhoneNumberInfo.setOnClickListener(this);
|
||||
|
||||
String previousPhone = AssistantActivity.instance().phone_number;
|
||||
if (previousPhone != null) {
|
||||
mPhoneNumberEdit.setText(previousPhone);
|
||||
}
|
||||
|
||||
// Allow user to enter a mUsername instead use the mPhone number as mUsername
|
||||
if (getResources().getBoolean(R.bool.assistant_allow_username)) {
|
||||
mUseUsername.setVisibility(View.VISIBLE);
|
||||
|
|
|
@ -1686,7 +1686,7 @@ public class CallActivity extends LinphoneGenericActivity
|
|||
int count = LinphoneManager.getInstance().getUnreadMessageCount();
|
||||
|
||||
if (count > 0) {
|
||||
mMissedChats.setText(count + "");
|
||||
mMissedChats.setText(String.valueOf(count));
|
||||
mMissedChats.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mMissedChats.clearAnimation();
|
||||
|
|
|
@ -53,18 +53,12 @@ import org.linphone.utils.LinphoneGenericActivity;
|
|||
import org.linphone.utils.LinphoneUtils;
|
||||
|
||||
public class CallOutgoingActivity extends LinphoneGenericActivity implements OnClickListener {
|
||||
private static CallOutgoingActivity sInstance;
|
||||
|
||||
private TextView mName, mNumber;
|
||||
private ImageView mContactPicture, mMicro, mSpeaker, mHangUp;
|
||||
private Call mCall;
|
||||
private CoreListenerStub mListener;
|
||||
private boolean mIsMicMuted, mIsSpeakerEnabled;
|
||||
|
||||
public static boolean isInstanciated() {
|
||||
return sInstance != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
@ -151,13 +145,11 @@ public class CallOutgoingActivity extends LinphoneGenericActivity implements OnC
|
|||
}
|
||||
}
|
||||
};
|
||||
sInstance = this;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
sInstance = this;
|
||||
Core lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
||||
if (lc != null) {
|
||||
lc.addListener(mListener);
|
||||
|
@ -218,12 +210,6 @@ public class CallOutgoingActivity extends LinphoneGenericActivity implements OnC
|
|||
super.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
sInstance = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
int id = v.getId();
|
||||
|
|
|
@ -29,12 +29,9 @@ import android.widget.RelativeLayout;
|
|||
import android.widget.TextView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import org.linphone.R;
|
||||
import org.linphone.core.ChatMessage;
|
||||
|
||||
public class ChatMessageOldViewHolder extends RecyclerView.ViewHolder
|
||||
implements View.OnClickListener {
|
||||
public String messageId;
|
||||
public ChatMessage message;
|
||||
public final LinearLayout eventLayout;
|
||||
public final TextView eventMessage;
|
||||
|
||||
|
|
|
@ -190,7 +190,6 @@ public class ChatMessagesOldAdapter extends SelectableAdapter<ChatMessageOldView
|
|||
}
|
||||
}
|
||||
|
||||
holder.messageId = message.getMessageId();
|
||||
message.setUserData(holder);
|
||||
|
||||
RelativeLayout.LayoutParams layoutParams =
|
||||
|
|
|
@ -45,7 +45,6 @@ public class ChatRoomViewHolder extends RecyclerView.ViewHolder
|
|||
public final TextView unreadMessages;
|
||||
public final CheckBox delete;
|
||||
public final RelativeLayout avatarLayout;
|
||||
public ChatRoom room;
|
||||
|
||||
private final Context mContext;
|
||||
private final ClickListener mListener;
|
||||
|
@ -67,8 +66,7 @@ public class ChatRoomViewHolder extends RecyclerView.ViewHolder
|
|||
}
|
||||
|
||||
public void bindChatRoom(ChatRoom room) {
|
||||
this.room = room;
|
||||
ChatMessage lastMessage = this.room.getLastMessageInHistory();
|
||||
ChatMessage lastMessage = room.getLastMessageInHistory();
|
||||
|
||||
if (lastMessage != null) {
|
||||
StringBuilder messageContent = new StringBuilder();
|
||||
|
@ -79,20 +77,20 @@ public class ChatRoomViewHolder extends RecyclerView.ViewHolder
|
|||
messageContent.insert(0, c.getStringBuffer() + " ");
|
||||
}
|
||||
}
|
||||
lastMessageView.setText(getSender(this.room) + messageContent);
|
||||
lastMessageView.setText(getSender(room) + messageContent);
|
||||
date.setText(
|
||||
LinphoneUtils.timestampToHumanDate(
|
||||
mContext,
|
||||
this.room.getLastUpdateTime(),
|
||||
room.getLastUpdateTime(),
|
||||
R.string.messages_list_date_format));
|
||||
} else {
|
||||
date.setText("");
|
||||
lastMessageView.setText("");
|
||||
}
|
||||
|
||||
displayName.setText(getContact(this.room));
|
||||
unreadMessages.setText(String.valueOf(this.room.getUnreadMessagesCount()));
|
||||
getAvatar(this.room);
|
||||
displayName.setText(getContact(room));
|
||||
unreadMessages.setText(String.valueOf(room.getUnreadMessagesCount()));
|
||||
getAvatar(room);
|
||||
}
|
||||
|
||||
public void onClick(View v) {
|
||||
|
|
|
@ -30,8 +30,6 @@ abstract class ChatScrollListener extends RecyclerView.OnScrollListener {
|
|||
private int mPreviousTotalItemCount = 0;
|
||||
// True if we are still waiting for the last set of data to load.
|
||||
private boolean mLoading = true;
|
||||
// Sets the starting page index
|
||||
private final int mStartingPageIndex = 0;
|
||||
|
||||
private final LinearLayoutManager mLayoutManager;
|
||||
|
||||
|
|
|
@ -148,7 +148,6 @@ public class Compatibility {
|
|||
int iconLevel,
|
||||
Bitmap largeIcon,
|
||||
PendingIntent intent,
|
||||
boolean isOngoingEvent,
|
||||
int priority) {
|
||||
if (Version.sdkAboveOrEqual(Version.API26_O_80)) {
|
||||
return ApiTwentySixPlus.createNotification(
|
||||
|
|
|
@ -23,11 +23,9 @@ import android.view.View;
|
|||
import java.io.Serializable;
|
||||
import org.linphone.core.Address;
|
||||
import org.linphone.core.Factory;
|
||||
import org.linphone.core.SearchResult;
|
||||
|
||||
public class ContactAddress implements Serializable {
|
||||
private LinphoneContact mContact;
|
||||
private SearchResult mResult;
|
||||
private String mAddress;
|
||||
private String mPhoneNumber;
|
||||
private boolean mIsLinphoneContact;
|
||||
|
@ -72,10 +70,6 @@ public class ContactAddress implements Serializable {
|
|||
return mContact;
|
||||
}
|
||||
|
||||
public void setResult(SearchResult result) {
|
||||
this.mResult = result;
|
||||
}
|
||||
|
||||
public String getAddressAsDisplayableString() {
|
||||
Address addr = getAddress();
|
||||
if (addr != null && addr.getUsername() != null) return addr.asStringUriOnly();
|
||||
|
|
|
@ -71,10 +71,6 @@ public class SearchContactsAdapter extends RecyclerView.Adapter<SearchContactVie
|
|||
mOnlySipContact = enable;
|
||||
}
|
||||
|
||||
public void setListener(SearchContactViewHolder.ClickListener listener) {
|
||||
mListener = listener;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public SearchContactViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
|
|
|
@ -50,7 +50,7 @@ public class HistoryDetailFragment extends Fragment implements OnClickListener {
|
|||
private View mView;
|
||||
private ImageView mContactPicture, mCallDirection;
|
||||
private TextView mContactName, mContactAddress, mTime, mDate;
|
||||
private String mSipUri, mDisplayName, mPictureUri;
|
||||
private String mSipUri, mDisplayName;
|
||||
private RelativeLayout mWaitLayout;
|
||||
private LinphoneContact mContact;
|
||||
private ChatRoom mChatRoom;
|
||||
|
@ -61,7 +61,6 @@ public class HistoryDetailFragment extends Fragment implements OnClickListener {
|
|||
LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
mSipUri = getArguments().getString("SipUri");
|
||||
mDisplayName = getArguments().getString("DisplayName");
|
||||
mPictureUri = getArguments().getString("PictureUri");
|
||||
String status = getArguments().getString("Call.Status");
|
||||
String callTime = getArguments().getString("CallTime");
|
||||
String callDate = getArguments().getString("CallDate");
|
||||
|
@ -183,19 +182,13 @@ public class HistoryDetailFragment extends Fragment implements OnClickListener {
|
|||
}
|
||||
|
||||
public void changeDisplayedHistory(
|
||||
String sipUri,
|
||||
String displayName,
|
||||
String pictureUri,
|
||||
String status,
|
||||
String callTime,
|
||||
String callDate) {
|
||||
String sipUri, String displayName, String status, String callTime, String callDate) {
|
||||
if (displayName == null) {
|
||||
displayName = LinphoneUtils.getUsernameFromAddress(sipUri);
|
||||
}
|
||||
|
||||
this.mSipUri = sipUri;
|
||||
this.mDisplayName = displayName;
|
||||
this.mPictureUri = pictureUri;
|
||||
mSipUri = sipUri;
|
||||
mDisplayName = displayName;
|
||||
displayHistory(status, callTime, callDate);
|
||||
}
|
||||
|
||||
|
|
|
@ -97,7 +97,6 @@ public class NotificationsManager {
|
|||
R.mipmap.ic_launcher,
|
||||
bm,
|
||||
pendingIntent,
|
||||
true,
|
||||
Notification.PRIORITY_MIN);
|
||||
|
||||
if (isServiceNotificationDisplayed()) {
|
||||
|
|
|
@ -29,7 +29,6 @@ public class Purchasable {
|
|||
private String mTitle;
|
||||
private String mDescription;
|
||||
private String mPrice;
|
||||
private long mExpire;
|
||||
private String mPurchasePayload, mPurchasePayloadSignature;
|
||||
private String mUserData;
|
||||
|
||||
|
@ -70,7 +69,7 @@ public class Purchasable {
|
|||
|
||||
public String getExpireDate() {
|
||||
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss", Locale.getDefault());
|
||||
Date date = new Date(mExpire);
|
||||
Date date = new Date(0);
|
||||
return dateFormat.format(date);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.ConnectivityManager;
|
||||
import org.linphone.LinphoneManager;
|
||||
|
||||
/** Intercept network state changes and update linphone core through LinphoneManager. */
|
||||
|
@ -30,10 +29,6 @@ public class NetworkManager extends BroadcastReceiver {
|
|||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
ConnectivityManager cm =
|
||||
(ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
Boolean lNoConnectivity =
|
||||
intent.getBooleanExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, false);
|
||||
if (LinphoneManager.isInstanciated()) {
|
||||
LinphoneManager.getInstance().connectivityChanged();
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@ import android.preference.Preference;
|
|||
import android.preference.Preference.OnPreferenceChangeListener;
|
||||
import android.preference.Preference.OnPreferenceClickListener;
|
||||
import android.preference.PreferenceCategory;
|
||||
import android.preference.PreferenceScreen;
|
||||
import android.view.WindowManager;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -335,7 +334,6 @@ public class AccountPreferencesFragment extends PreferencesListFragment
|
|||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
PreferenceScreen screen = getPreferenceScreen();
|
||||
mN = getArguments().getInt("Account", 0);
|
||||
if (mN == mPrefs.getAccountCount()) {
|
||||
mIsNewAccount = true;
|
||||
|
|
|
@ -1249,10 +1249,6 @@ public class LinphonePreferences {
|
|||
return getConfig().getString("assistant", "xmlrpc_url", null);
|
||||
}
|
||||
|
||||
public void setXmlrpcUrl(String url) {
|
||||
getConfig().setString("assistant", "xmlrpc_url", url);
|
||||
}
|
||||
|
||||
public String getInappPopupTime() {
|
||||
return getConfig().getString("app", "inapp_popup_time", null);
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#99c4c4c4"
|
||||
android:focusable="true"
|
||||
android:clickable="true">
|
||||
|
||||
<ProgressBar
|
||||
|
|
Loading…
Reference in a new issue