diff --git a/.gitignore b/.gitignore
index 14a3111..17d7449 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,4 +20,5 @@ app/.classpath
app/.settings
app/.project
.project
-.settings
\ No newline at end of file
+.settings
+.vscode
diff --git a/app/app.iml b/app/app.iml
index 9c3fd05..0c62e2a 100644
--- a/app/app.iml
+++ b/app/app.iml
@@ -62,13 +62,6 @@
-
-
-
-
-
-
-
@@ -76,17 +69,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 05bf0c5..9264b66 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -130,7 +130,7 @@
android:name="com.csipsimple.ui.SipHome"
android:label="@string/app_name"
android:launchMode="singleTask"
- android:theme="@style/DarkTheme"
+ android:theme="@style/Theme.AppCompat"
android:uiOptions="splitActionBarWhenNarrow" >
@@ -173,7 +173,7 @@
android:label="@string/app_name"
android:launchMode="singleTask"
android:targetActivity="com.csipsimple.ui.SipHome"
- android:theme="@style/DarkTheme"
+ android:theme="@style/Theme.AppCompat"
android:uiOptions="splitActionBarWhenNarrow" >
@@ -249,24 +249,24 @@
+ android:theme="@style/Theme.AppCompat" />
+ android:theme="@style/Theme.AppCompat" />
+ android:theme="@style/Theme.AppCompat" />
+ android:theme="@style/Theme.AppCompat.Dialog" />
+ android:theme="@style/Theme.AppCompat" >
@@ -288,7 +288,7 @@
android:enabled="@bool/use_cupcake_prefs"
android:label="@string/prefs"
android:permission="android.permission.CONFIGURE_SIP"
- android:theme="@style/DarkTheme" >
+ android:theme="@style/Theme.AppCompat" >
@@ -298,18 +298,18 @@
+ android:theme="@style/Theme.AppCompat" />
+ android:theme="@style/Theme.AppCompat" />
+ android:theme="@style/Theme.AppCompat.Dialog" >
@@ -320,19 +320,19 @@
android:name="com.csipsimple.ui.prefs.Codecs"
android:configChanges="orientation"
android:label="@string/codecs"
- android:theme="@style/DarkTheme" />
+ android:theme="@style/Theme.AppCompat" />
+ android:theme="@style/Theme.AppCompat.Dialog" />
+ android:theme="@style/Theme.AppCompat" />
+ android:theme="@style/Theme.AppCompat.Dialog" >
@@ -384,7 +384,7 @@
android:launchMode="singleTask"
android:permission="android.permission.CALL_PRIVILEGED"
android:targetActivity="com.csipsimple.ui.outgoingcall.OutgoingCallChooser"
- android:theme="@style/DarkTheme.Dialog" >
+ android:theme="@style/Theme.AppCompat.Dialog" >
@@ -402,7 +402,7 @@
android:launchMode="singleTask"
android:permission="android.permission.CALL_PRIVILEGED"
android:targetActivity="com.csipsimple.ui.outgoingcall.OutgoingCallChooser"
- android:theme="@style/DarkTheme.Dialog" >
+ android:theme="@style/Theme.AppCompat.Dialog" >
@@ -440,7 +440,7 @@
android:permission="android.permission.CONFIGURE_SIP"
android:process=":sipStack"
android:taskAffinity=""
- android:theme="@style/DarkTheme.NoTitle" >
+ android:theme="@style/Theme.AppCompat" >
@@ -451,13 +451,13 @@
android:name="com.csipsimple.ui.PickupSipUri"
android:configChanges="orientation"
android:label="@string/pickup_sip_uri"
- android:theme="@style/DarkTheme" />
+ android:theme="@style/Theme.AppCompat" />
+ android:theme="@style/Theme.AppCompat.Dialog" />
@@ -479,7 +479,7 @@
+ android:theme="@style/Theme.AppCompat" >
@@ -500,7 +500,7 @@
+ android:theme="@style/Theme.AppCompat" >
@@ -511,7 +511,7 @@
android:name="com.csipsimple.ui.messages.MessageActivity"
android:configChanges="orientation"
android:launchMode="singleTop"
- android:theme="@style/DarkTheme"
+ android:theme="@style/Theme.AppCompat"
android:windowSoftInputMode="stateHidden" />
@@ -540,10 +540,10 @@
+ android:theme="@style/Theme.AppCompat" />
+ android:theme="@style/Theme.AppCompat" />
@@ -567,7 +567,7 @@
+ android:theme="@style/Theme.AppCompat" />
= 23 && ContextCompat.checkSelfPermission(this.getContext(), Manifest.permission.READ_VOICEMAIL) == PackageManager.PERMISSION_GRANTED){
+ vmNumber = tm.getVoiceMailNumber();
+ }else{
+ vmNumber = tm.getVoiceMailNumber();
+ }
if (!TextUtils.isEmpty(vmNumber)) {
if(service != null) {
@@ -864,10 +871,10 @@ public void onVisibilityChanged(boolean visible) {
// != autoCompleteFragment) {
// Execute a transaction, replacing any existing fragment
// with this one inside the frame.
- FragmentTransaction ft = getFragmentManager().beginTransaction();
- ft.replace(R.id.details, autoCompleteFragment, TAG_AUTOCOMPLETE_SIDE_FRAG);
- ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
- ft.commitAllowingStateLoss();
+// FragmentTransaction ft = getFragmentManager().beginTransaction();
+// ft.replace(R.id.details, autoCompleteFragment, TAG_AUTOCOMPLETE_SIDE_FRAG);
+// ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
+// ft.commitAllowingStateLoss();
// }
}
diff --git a/app/src/main/java/com/csipsimple/ui/help/Faq.java b/app/src/main/java/com/csipsimple/ui/help/Faq.java
index f6b140c..79082ee 100644
--- a/app/src/main/java/com/csipsimple/ui/help/Faq.java
+++ b/app/src/main/java/com/csipsimple/ui/help/Faq.java
@@ -25,6 +25,7 @@
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
+import android.support.v4.app.DialogFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -32,11 +33,10 @@
import android.webkit.WebViewClient;
import android.widget.LinearLayout;
-import com.actionbarsherlock.app.SherlockDialogFragment;
import com.csipsimple.R;
import com.csipsimple.utils.CustomDistribution;
-public class Faq extends SherlockDialogFragment {
+public class Faq extends DialogFragment {
private final static String FAQ_URL = CustomDistribution.getFaqLink();
public static Faq newInstance() {
diff --git a/app/src/main/java/com/csipsimple/ui/help/Help.java b/app/src/main/java/com/csipsimple/ui/help/Help.java
index fa1ee87..060120c 100644
--- a/app/src/main/java/com/csipsimple/ui/help/Help.java
+++ b/app/src/main/java/com/csipsimple/ui/help/Help.java
@@ -29,6 +29,7 @@
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
+import android.support.v4.app.DialogFragment;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
@@ -39,7 +40,6 @@
import android.widget.ListView;
import android.widget.TextView;
-import com.actionbarsherlock.app.SherlockDialogFragment;
import com.csipsimple.R;
import com.csipsimple.api.SipConfigManager;
import com.csipsimple.api.SipManager;
@@ -53,7 +53,7 @@
import java.util.ArrayList;
import java.util.List;
-public class Help extends SherlockDialogFragment implements OnItemClickListener {
+public class Help extends DialogFragment implements OnItemClickListener {
private static final String THIS_FILE = "Help";
@@ -189,7 +189,7 @@ public void onItemClick(AdapterView> av, View v, int position, long id) {
HelpArrayAdapter haa = (HelpArrayAdapter) av.getAdapter();
HelpEntry he = haa.getItem(position);
- SherlockDialogFragment newFragment;
+ DialogFragment newFragment;
switch (he.choiceTag) {
case FAQ:
newFragment = Faq.newInstance();
diff --git a/app/src/main/java/com/csipsimple/ui/help/Legal.java b/app/src/main/java/com/csipsimple/ui/help/Legal.java
index c6e4cf0..4bf1d54 100644
--- a/app/src/main/java/com/csipsimple/ui/help/Legal.java
+++ b/app/src/main/java/com/csipsimple/ui/help/Legal.java
@@ -25,15 +25,15 @@
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
+import android.support.v4.app.DialogFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
-import com.actionbarsherlock.app.SherlockDialogFragment;
import com.csipsimple.R;
-public class Legal extends SherlockDialogFragment {
+public class Legal extends DialogFragment {
public static Legal newInstance() {
diff --git a/app/src/main/java/com/csipsimple/ui/incall/DtmfDialogFragment.java b/app/src/main/java/com/csipsimple/ui/incall/DtmfDialogFragment.java
index 919cc30..cca3449 100644
--- a/app/src/main/java/com/csipsimple/ui/incall/DtmfDialogFragment.java
+++ b/app/src/main/java/com/csipsimple/ui/incall/DtmfDialogFragment.java
@@ -26,19 +26,19 @@
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.os.Bundle;
+import android.support.v4.app.DialogFragment;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
-import com.actionbarsherlock.app.SherlockDialogFragment;
import com.csipsimple.R;
import com.csipsimple.utils.Log;
import com.csipsimple.widgets.Dialpad;
import com.csipsimple.widgets.Dialpad.OnDialKeyListener;
-public class DtmfDialogFragment extends SherlockDialogFragment implements OnDialKeyListener {
+public class DtmfDialogFragment extends DialogFragment implements OnDialKeyListener {
private static final String EXTRA_CALL_ID = "call_id";
@@ -95,10 +95,10 @@ public void onTrigger(int keyCode, int dialTone) {
sb.append(nbr);
dialPadTextView.setText(sb.toString());
}
- if(getSherlockActivity() instanceof OnDtmfListener) {
+ if(getActivity() instanceof OnDtmfListener) {
Integer callId = getArguments().getInt(EXTRA_CALL_ID);
if(callId != null) {
- ((OnDtmfListener) getSherlockActivity()).OnDtmf(callId, keyCode, dialTone);
+ ((OnDtmfListener) getActivity()).OnDtmf(callId, keyCode, dialTone);
}else {
Log.w(THIS_FILE, "Impossible to find the call associated to this view");
}
diff --git a/app/src/main/java/com/csipsimple/ui/incall/InCallActivity.java b/app/src/main/java/com/csipsimple/ui/incall/InCallActivity.java
index fcdde9f..b9616b3 100644
--- a/app/src/main/java/com/csipsimple/ui/incall/InCallActivity.java
+++ b/app/src/main/java/com/csipsimple/ui/incall/InCallActivity.java
@@ -41,6 +41,7 @@
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
import android.os.RemoteException;
+import android.support.v7.app.AppCompatActivity;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.TextUtils;
@@ -53,7 +54,6 @@
import android.widget.BaseAdapter;
import android.widget.RelativeLayout;
-import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.csipsimple.R;
import com.csipsimple.api.ISipService;
import com.csipsimple.api.MediaState;
diff --git a/app/src/main/java/com/csipsimple/ui/incall/InCallCard.java b/app/src/main/java/com/csipsimple/ui/incall/InCallCard.java
index 336a268..e259cc6 100644
--- a/app/src/main/java/com/csipsimple/ui/incall/InCallCard.java
+++ b/app/src/main/java/com/csipsimple/ui/incall/InCallCard.java
@@ -25,10 +25,14 @@
import android.content.Intent;
import android.os.Handler;
import android.os.Message;
+import android.support.v7.view.menu.MenuBuilder;
+import android.support.v7.widget.ActionMenuView;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.FloatMath;
import android.view.LayoutInflater;
+import android.view.MenuInflater;
+import android.view.MenuItem;
import android.view.SurfaceView;
import android.view.View;
import android.view.View.OnClickListener;
@@ -41,12 +45,6 @@
import android.widget.RelativeLayout;
import android.widget.TextView;
-import com.actionbarsherlock.internal.view.menu.ActionMenuPresenter;
-import com.actionbarsherlock.internal.view.menu.ActionMenuView;
-import com.actionbarsherlock.internal.view.menu.MenuBuilder;
-import com.actionbarsherlock.internal.view.menu.MenuBuilder.Callback;
-import com.actionbarsherlock.view.MenuInflater;
-import com.actionbarsherlock.view.MenuItem;
import com.csipsimple.R;
import com.csipsimple.api.SipCallSession;
import com.csipsimple.api.SipCallSession.MediaState;
@@ -70,7 +68,7 @@
import java.util.List;
import java.util.Map;
-public class InCallCard extends FrameLayout implements OnClickListener, Callback {
+public class InCallCard extends FrameLayout implements OnClickListener, MenuBuilder.Callback {
private static final String THIS_FILE = "InCallCard";
@@ -94,8 +92,8 @@ public class InCallCard extends FrameLayout implements OnClickListener, Callback
private boolean canVideo = false;
private boolean cachedZrtpVerified;
private boolean cachedZrtpActive;
+// private ActionMenuPresenter mActionMenuPresenter;
- private ActionMenuPresenter mActionMenuPresenter;
private Map incallPlugins;
@@ -131,11 +129,11 @@ private void initControllerView() {
btnMenuBuilder.setCallback(this);
MenuInflater inflater = new MenuInflater(getContext());
inflater.inflate(R.menu.in_call_card_menu, btnMenuBuilder);
-
- mActionMenuPresenter = new ActionMenuPresenter(getContext());
- mActionMenuPresenter.setReserveOverflow(true);
-
- btnMenuBuilder.addMenuPresenter(mActionMenuPresenter);
+//
+// mActionMenuPresenter = new ActionMenuPresenter(getContext());
+// mActionMenuPresenter.setReserveOverflow(true);
+//
+// btnMenuBuilder.addMenuPresenter(mActionMenuPresenter);
updateMenuView();
}
@@ -151,19 +149,19 @@ private void updateMenuView() {
final FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(
FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.WRAP_CONTENT);
ViewGroup menuViewWrapper = (ViewGroup) findViewById(R.id.call_action_bar);
- mActionMenuPresenter.setReserveOverflow(true);
- mActionMenuPresenter.setWidthLimit(w, true);
- // Use width limit (this means we don't care item limits
- mActionMenuPresenter.setItemLimit(20);
- ActionMenuView menuView = (ActionMenuView) mActionMenuPresenter.getMenuView(menuViewWrapper);
+// mActionMenuPresenter.setReserveOverflow(true);
+// mActionMenuPresenter.setWidthLimit(w, true);
+// // Use width limit (this means we don't care item limits
+// mActionMenuPresenter.setItemLimit(20);
+// ActionMenuView menuView = (ActionMenuView) mActionMenuPresenter.getMenuView(menuViewWrapper);
//UtilityWrapper.getInstance().setBackgroundDrawable(menuView, null);
//change tqc
- menuView.setBackgroundDrawable(null);
- menuViewWrapper.addView(menuView, layoutParams);
+// menuView.setBackgroundDrawable(null);
+// menuViewWrapper.addView(menuView, layoutParams);
added = true;
}else {
- mActionMenuPresenter.setWidthLimit(w, true);
- mActionMenuPresenter.updateMenuView(true);
+// mActionMenuPresenter.setWidthLimit(w, true);
+// mActionMenuPresenter.updateMenuView(true);
}
}
diff --git a/app/src/main/java/com/csipsimple/ui/incall/InCallControls.java b/app/src/main/java/com/csipsimple/ui/incall/InCallControls.java
index ef7f7fd..41ccda9 100644
--- a/app/src/main/java/com/csipsimple/ui/incall/InCallControls.java
+++ b/app/src/main/java/com/csipsimple/ui/incall/InCallControls.java
@@ -26,18 +26,16 @@
package com.csipsimple.ui.incall;
import android.content.Context;
+import android.support.v7.view.menu.MenuBuilder;
+import android.support.v7.view.menu.MenuItemImpl;
+import android.support.v7.view.menu.MenuView;
+import android.support.v7.widget.ActionMenuView;
import android.util.AttributeSet;
+import android.view.MenuInflater;
+import android.view.MenuItem;
import android.view.View;
import android.widget.FrameLayout;
-import com.actionbarsherlock.internal.view.menu.ActionMenuPresenter;
-import com.actionbarsherlock.internal.view.menu.ActionMenuView;
-import com.actionbarsherlock.internal.view.menu.MenuBuilder;
-import com.actionbarsherlock.internal.view.menu.MenuBuilder.Callback;
-import com.actionbarsherlock.internal.view.menu.MenuItemImpl;
-import com.actionbarsherlock.internal.view.menu.MenuView;
-import com.actionbarsherlock.view.MenuInflater;
-import com.actionbarsherlock.view.MenuItem;
import com.csipsimple.R;
import com.csipsimple.api.MediaState;
import com.csipsimple.api.SipCallSession;
@@ -47,7 +45,7 @@
/**
* Manages in call controls not relative to a particular call such as media route
*/
-public class InCallControls extends FrameLayout implements Callback {
+public class InCallControls extends FrameLayout implements MenuBuilder.Callback {
private static final String THIS_FILE = "InCallControls";
IOnCallActionTrigger onTriggerListener;
@@ -73,30 +71,30 @@ public InCallControls(Context context, AttributeSet attrs, int style) {
supportMultipleCalls = SipConfigManager.getPreferenceBooleanValue(getContext(), SipConfigManager.SUPPORT_MULTIPLE_CALLS, false);
}
- final FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT,
- (int) getResources().getDimension(R.dimen.incall_bottom_bar_height));
- ActionMenuPresenter mActionMenuPresenter = new ActionMenuPresenter(getContext()) {
- public void bindItemView(MenuItemImpl item, MenuView.ItemView itemView) {
- super.bindItemView(item, itemView);
- View actionItemView = (View) itemView;
- actionItemView.setBackgroundResource(R.drawable.btn_compound_background);
- }
- };
- mActionMenuPresenter.setReserveOverflow(true);
- // Full width
- mActionMenuPresenter.setWidthLimit(
- getContext().getResources().getDisplayMetrics().widthPixels, true);
- // We use width limit, no need to limit items.
- mActionMenuPresenter.setItemLimit(20);
- btnMenuBuilder = new MenuBuilder(getContext());
- btnMenuBuilder.setCallback(this);
- MenuInflater inflater = new MenuInflater(getContext());
- inflater.inflate(R.menu.in_call_controls_menu, btnMenuBuilder);
- btnMenuBuilder.addMenuPresenter(mActionMenuPresenter);
- ActionMenuView menuView = (ActionMenuView) mActionMenuPresenter.getMenuView(this);
- menuView.setBackgroundResource(R.drawable.abs__ab_bottom_transparent_dark_holo);
-
- this.addView(menuView, layoutParams);
+// final FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT,
+// (int) getResources().getDimension(R.dimen.incall_bottom_bar_height));
+// ActionMenuPresenter mActionMenuPresenter = new ActionMenuPresenter(getContext()) {
+// public void bindItemView(MenuItemImpl item, MenuView.ItemView itemView) {
+// super.bindItemView(item, itemView);
+// View actionItemView = (View) itemView;
+// actionItemView.setBackgroundResource(R.drawable.btn_compound_background);
+// }
+// };
+// mActionMenuPresenter.setReserveOverflow(true);
+// // Full width
+// mActionMenuPresenter.setWidthLimit(
+// getContext().getResources().getDisplayMetrics().widthPixels, true);
+// // We use width limit, no need to limit items.
+// mActionMenuPresenter.setItemLimit(20);
+// btnMenuBuilder = new MenuBuilder(getContext());
+// btnMenuBuilder.setCallback(this);
+// MenuInflater inflater = new MenuInflater(getContext());
+// inflater.inflate(R.menu.in_call_controls_menu, btnMenuBuilder);
+// btnMenuBuilder.addMenuPresenter(mActionMenuPresenter);
+// ActionMenuView menuView = (ActionMenuView) mActionMenuPresenter.getMenuView(this);
+// menuView.setBackgroundResource(R.drawable.abs__ab_bottom_transparent_dark_holo);
+//
+// this.addView(menuView, layoutParams);
}
@Override
diff --git a/app/src/main/java/com/csipsimple/ui/messages/ConversationsListFragment.java b/app/src/main/java/com/csipsimple/ui/messages/ConversationsListFragment.java
index 995e68a..031f979 100644
--- a/app/src/main/java/com/csipsimple/ui/messages/ConversationsListFragment.java
+++ b/app/src/main/java/com/csipsimple/ui/messages/ConversationsListFragment.java
@@ -23,19 +23,25 @@
package com.csipsimple.ui.messages;
import android.app.AlertDialog;
+//import android.app.FragmentTransaction;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri.Builder;
import android.os.Bundle;
+
import android.support.v4.app.FragmentTransaction;
import android.support.v4.content.CursorLoader;
import android.support.v4.content.Loader;
+
import android.text.TextUtils;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
@@ -43,10 +49,6 @@
import android.widget.ListView;
import android.widget.TextView;
-import com.actionbarsherlock.view.Menu;
-import com.actionbarsherlock.view.MenuInflater;
-import com.actionbarsherlock.view.MenuItem;
-import com.actionbarsherlock.view.MenuItem.OnMenuItemClickListener;
import com.csipsimple.R;
import com.csipsimple.api.SipMessage;
import com.csipsimple.service.SipNotifications;
@@ -197,7 +199,7 @@ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
MenuItem writeMenu = menu.add(R.string.menu_compose_new);
writeMenu.setIcon(R.drawable.ic_menu_msg_compose_holo_dark).setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
- writeMenu.setOnMenuItemClickListener(new OnMenuItemClickListener() {
+ writeMenu.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
onClickAddMessage();
@@ -209,7 +211,7 @@ public boolean onMenuItemClick(MenuItem item) {
MenuItem deleteAllMenu = menu.add(R.string.menu_delete_all);
deleteAllMenu.setIcon(android.R.drawable.ic_menu_delete).setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
- deleteAllMenu.setOnMenuItemClickListener(new OnMenuItemClickListener() {
+ deleteAllMenu.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
confirmDeleteThread(null);
diff --git a/app/src/main/java/com/csipsimple/ui/messages/MessageActivity.java b/app/src/main/java/com/csipsimple/ui/messages/MessageActivity.java
index 973ef1c..3c7acad 100644
--- a/app/src/main/java/com/csipsimple/ui/messages/MessageActivity.java
+++ b/app/src/main/java/com/csipsimple/ui/messages/MessageActivity.java
@@ -23,9 +23,9 @@
package com.csipsimple.ui.messages;
import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.view.MenuItem;
-import com.actionbarsherlock.app.SherlockFragmentActivity;
-import com.actionbarsherlock.view.MenuItem;
import com.csipsimple.ui.messages.MessageFragment.OnQuitListener;
import com.csipsimple.utils.Compatibility;
diff --git a/app/src/main/java/com/csipsimple/ui/messages/MessageFragment.java b/app/src/main/java/com/csipsimple/ui/messages/MessageFragment.java
index 5fc4c76..adb88cd 100644
--- a/app/src/main/java/com/csipsimple/ui/messages/MessageFragment.java
+++ b/app/src/main/java/com/csipsimple/ui/messages/MessageFragment.java
@@ -33,6 +33,7 @@
import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;
+import android.support.v4.app.ListFragment;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.CursorLoader;
import android.support.v4.content.Loader;
@@ -40,6 +41,9 @@
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
@@ -49,11 +53,6 @@
import android.widget.ListView;
import android.widget.TextView;
-import com.actionbarsherlock.app.SherlockListFragment;
-import com.actionbarsherlock.view.Menu;
-import com.actionbarsherlock.view.MenuInflater;
-import com.actionbarsherlock.view.MenuItem;
-import com.actionbarsherlock.view.MenuItem.OnMenuItemClickListener;
import com.csipsimple.R;
import com.csipsimple.api.ISipService;
import com.csipsimple.api.SipMessage;
@@ -69,7 +68,7 @@
import com.csipsimple.utils.contacts.ContactsWrapper;
import com.csipsimple.widgets.AccountChooserButton;
-public class MessageFragment extends SherlockListFragment implements LoaderManager.LoaderCallbacks, OnClickListener {
+public class MessageFragment extends ListFragment implements LoaderManager.LoaderCallbacks, OnClickListener {
private static final String THIS_FILE = "ComposeMessage";
private String remoteFrom;
private TextView fromText;
@@ -248,12 +247,12 @@ private void setupFrom(String from, String fullFrom) {
if (remoteFrom != from) {
remoteFrom = from;
fromText.setText(remoteFrom);
- CallerInfo callerInfo = CallerInfo.getCallerInfoFromSipUri(getActivity(), fullFrom);
- if (callerInfo != null && callerInfo.contactExists) {
- fullFromText.setText(callerInfo.name);
- } else {
- fullFromText.setText(SipUri.getDisplayedSimpleContact(fullFrom));
- }
+ CallerInfo callerInfo = CallerInfo.getCallerInfoFromSipUri(getActivity(), fullFrom);
+ if (callerInfo != null && callerInfo.contactExists) {
+ fullFromText.setText(callerInfo.name);
+ } else {
+ fullFromText.setText(SipUri.getDisplayedSimpleContact(fullFrom));
+ }
loadMessageContent();
notifications.setViewingMessageFrom(remoteFrom);
}
@@ -318,7 +317,7 @@ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
int actionRoom = getResources().getBoolean(R.bool.menu_in_bar) ? MenuItem.SHOW_AS_ACTION_IF_ROOM : MenuItem.SHOW_AS_ACTION_NEVER;
MenuItem addContactMenu = menu.add(R.string.menu_add_to_contacts);
addContactMenu.setIcon(R.drawable.ic_add_contact_holo_dark).setShowAsAction(actionRoom);
- addContactMenu.setOnMenuItemClickListener(new OnMenuItemClickListener() {
+ addContactMenu.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
Intent it = ContactsWrapper.getInstance().getAddContactIntent(null, remoteFrom);
diff --git a/app/src/main/java/com/csipsimple/ui/prefs/Codecs.java b/app/src/main/java/com/csipsimple/ui/prefs/Codecs.java
index c51e972..d34b6f5 100644
--- a/app/src/main/java/com/csipsimple/ui/prefs/Codecs.java
+++ b/app/src/main/java/com/csipsimple/ui/prefs/Codecs.java
@@ -30,10 +30,9 @@
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.view.ViewPager;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.AppCompatActivity;
-import com.actionbarsherlock.app.ActionBar;
-import com.actionbarsherlock.app.ActionBar.Tab;
-import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.csipsimple.R;
import com.csipsimple.api.SipConfigManager;
import com.csipsimple.utils.Log;
@@ -65,23 +64,23 @@ protected void onCreate(Bundle savedInstanceState) {
useCodecsPerSpeed = SipConfigManager.getPreferenceBooleanValue(this, SipConfigManager.CODECS_PER_BANDWIDTH);
showVideoCodecs = SipConfigManager.getPreferenceBooleanValue(this, SipConfigManager.USE_VIDEO);
if(useCodecsPerSpeed) {
- Tab audioNb = ab.newTab().setText( R.string.slow ).setIcon(R.drawable.ic_prefs_media);
- Tab audioWb = ab.newTab().setText( R.string.fast ).setIcon(R.drawable.ic_prefs_media);
+ ActionBar.Tab audioNb = ab.newTab().setText( R.string.slow ).setIcon(R.drawable.ic_prefs_media);
+ ActionBar.Tab audioWb = ab.newTab().setText( R.string.fast ).setIcon(R.drawable.ic_prefs_media);
tabAdapter.addTab(audioWb, CodecsFragment.class);
tabAdapter.addTab(audioNb, CodecsFragment.class);
if(showVideoCodecs) {
- Tab videoNb = ab.newTab().setText( R.string.slow ).setIcon(R.drawable.ic_prefs_media_video);
- Tab videoWb = ab.newTab().setText( R.string.fast ).setIcon(R.drawable.ic_prefs_media_video);
+ ActionBar.Tab videoNb = ab.newTab().setText( R.string.slow ).setIcon(R.drawable.ic_prefs_media_video);
+ ActionBar.Tab videoWb = ab.newTab().setText( R.string.fast ).setIcon(R.drawable.ic_prefs_media_video);
tabAdapter.addTab(videoWb, CodecsFragment.class);
tabAdapter.addTab(videoNb, CodecsFragment.class);
}
}else {
- Tab audioTab = ab.newTab().setIcon(R.drawable.ic_prefs_media);
+ ActionBar.Tab audioTab = ab.newTab().setIcon(R.drawable.ic_prefs_media);
tabAdapter.addTab(audioTab, CodecsFragment.class);
if(showVideoCodecs) {
- Tab videoTab = ab.newTab().setIcon(R.drawable.ic_prefs_media_video);
+ ActionBar.Tab videoTab = ab.newTab().setIcon(R.drawable.ic_prefs_media_video);
tabAdapter.addTab(videoTab, CodecsFragment.class);
}
}
@@ -141,19 +140,19 @@ public int getCount() {
@Override
- public void onTabReselected(Tab tab, FragmentTransaction ft) {
+ public void onTabReselected(ActionBar.Tab tab, FragmentTransaction ft) {
// Nothing to do
}
@Override
- public void onTabSelected(Tab tab, FragmentTransaction ft) {
+ public void onTabSelected(ActionBar.Tab tab, FragmentTransaction ft) {
if (mViewPager.getCurrentItem() != tab.getPosition()) {
mViewPager.setCurrentItem(tab.getPosition(), true);
}
}
@Override
- public void onTabUnselected(Tab tab, FragmentTransaction ft) {
+ public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction ft) {
// Nothing to do
}
diff --git a/app/src/main/java/com/csipsimple/ui/prefs/CodecsFragment.java b/app/src/main/java/com/csipsimple/ui/prefs/CodecsFragment.java
index f020591..f73a143 100644
--- a/app/src/main/java/com/csipsimple/ui/prefs/CodecsFragment.java
+++ b/app/src/main/java/com/csipsimple/ui/prefs/CodecsFragment.java
@@ -25,6 +25,7 @@
import android.content.DialogInterface;
import android.graphics.Color;
import android.os.Bundle;
+import android.support.v4.app.ListFragment;
import android.text.SpannableString;
import android.text.method.LinkMovementMethod;
import android.text.util.Linkify;
@@ -43,7 +44,6 @@
import android.widget.SimpleAdapter.ViewBinder;
import android.widget.TextView;
-import com.actionbarsherlock.app.SherlockListFragment;
import com.csipsimple.R;
import com.csipsimple.api.SipConfigManager;
import com.csipsimple.utils.Log;
@@ -58,7 +58,7 @@
import java.util.List;
import java.util.Map;
-public class CodecsFragment extends SherlockListFragment implements OnCheckedChangeListener {
+public class CodecsFragment extends ListFragment implements OnCheckedChangeListener {
protected static final String THIS_FILE = "CodecsFragment";
diff --git a/app/src/main/java/com/csipsimple/ui/prefs/PrefsFast.java b/app/src/main/java/com/csipsimple/ui/prefs/PrefsFast.java
index 4660b89..0baa5e2 100644
--- a/app/src/main/java/com/csipsimple/ui/prefs/PrefsFast.java
+++ b/app/src/main/java/com/csipsimple/ui/prefs/PrefsFast.java
@@ -22,18 +22,18 @@
package com.csipsimple.ui.prefs;
import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.RadioButton;
-import com.actionbarsherlock.app.SherlockActivity;
import com.csipsimple.R;
import com.csipsimple.api.SipConfigManager;
import com.csipsimple.utils.PreferencesWrapper;
-public class PrefsFast extends SherlockActivity implements OnClickListener {
+public class PrefsFast extends AppCompatActivity implements OnClickListener {
private CheckBox globIntegrate;
private RadioButton globProfileAlways;
diff --git a/app/src/main/java/com/csipsimple/ui/prefs/PrefsFilters.java b/app/src/main/java/com/csipsimple/ui/prefs/PrefsFilters.java
index fbd5ecd..30d177f 100644
--- a/app/src/main/java/com/csipsimple/ui/prefs/PrefsFilters.java
+++ b/app/src/main/java/com/csipsimple/ui/prefs/PrefsFilters.java
@@ -23,8 +23,8 @@
import android.content.Intent;
import android.os.Bundle;
+import android.view.MenuItem;
-import com.actionbarsherlock.view.MenuItem;
import com.csipsimple.api.SipProfile;
import com.csipsimple.ui.account.AccountsChooserListActivity;
import com.csipsimple.ui.filters.AccountFilters;
@@ -38,7 +38,7 @@ public class PrefsFilters extends AccountsChooserListActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- getSherlock().getActionBar().setDisplayHomeAsUpEnabled(true);
+ getActionBar().setDisplayHomeAsUpEnabled(true);
}
@Override
diff --git a/app/src/main/java/com/csipsimple/ui/prefs/PrefsLogic.java b/app/src/main/java/com/csipsimple/ui/prefs/PrefsLogic.java
index a467c8a..2157b82 100644
--- a/app/src/main/java/com/csipsimple/ui/prefs/PrefsLogic.java
+++ b/app/src/main/java/com/csipsimple/ui/prefs/PrefsLogic.java
@@ -26,9 +26,9 @@
import android.preference.ListPreference;
import android.preference.Preference;
import android.telephony.TelephonyManager;
+import android.view.Menu;
+import android.view.MenuItem;
-import com.actionbarsherlock.view.Menu;
-import com.actionbarsherlock.view.MenuItem;
import com.csipsimple.R;
import com.csipsimple.api.SipConfigManager;
import com.csipsimple.api.SipManager;
diff --git a/app/src/main/java/com/csipsimple/ui/prefs/cupcake/MainPrefs.java b/app/src/main/java/com/csipsimple/ui/prefs/cupcake/MainPrefs.java
index 3b629e5..06a708d 100644
--- a/app/src/main/java/com/csipsimple/ui/prefs/cupcake/MainPrefs.java
+++ b/app/src/main/java/com/csipsimple/ui/prefs/cupcake/MainPrefs.java
@@ -21,10 +21,14 @@
package com.csipsimple.ui.prefs.cupcake;
+import android.app.ListActivity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
@@ -32,10 +36,6 @@
import android.widget.ListView;
import android.widget.TextView;
-import com.actionbarsherlock.app.SherlockListActivity;
-import com.actionbarsherlock.view.Menu;
-import com.actionbarsherlock.view.MenuInflater;
-import com.actionbarsherlock.view.MenuItem;
import com.csipsimple.R;
import com.csipsimple.api.SipManager;
import com.csipsimple.ui.prefs.PrefsFilters;
@@ -46,7 +46,7 @@
import java.util.ArrayList;
import java.util.List;
-public class MainPrefs extends SherlockListActivity {
+public class MainPrefs extends ListActivity {
private static final String THIS_FILE = "Main prefs";
private PrefGroupAdapter adapter;
@@ -147,7 +147,7 @@ public View getView(int position, View convertView, ViewGroup parent) {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
- MenuInflater inflater = getSupportMenuInflater();
+ MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.main_prefs, menu);
return super.onCreateOptionsMenu(menu);
}
diff --git a/app/src/main/java/com/csipsimple/ui/prefs/cupcake/PrefsLoaderActivity.java b/app/src/main/java/com/csipsimple/ui/prefs/cupcake/PrefsLoaderActivity.java
index 23f382f..888efcb 100644
--- a/app/src/main/java/com/csipsimple/ui/prefs/cupcake/PrefsLoaderActivity.java
+++ b/app/src/main/java/com/csipsimple/ui/prefs/cupcake/PrefsLoaderActivity.java
@@ -21,10 +21,10 @@
package com.csipsimple.ui.prefs.cupcake;
+import android.app.ActionBar;
import android.os.Bundle;
+import android.view.MenuItem;
-import com.actionbarsherlock.app.ActionBar;
-import com.actionbarsherlock.view.MenuItem;
import com.csipsimple.ui.prefs.GenericPrefs;
import com.csipsimple.ui.prefs.PrefsLogic;
import com.csipsimple.utils.Compatibility;
@@ -44,7 +44,7 @@ protected int getXmlPreferences() {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(PrefsLogic.getTitleResourceForType(getPreferenceType()));
- ActionBar ab = getSupportActionBar();
+ ActionBar ab = getActionBar();
if(ab != null) {
ab.setDisplayHomeAsUpEnabled(true);
}
diff --git a/app/src/main/java/com/csipsimple/ui/prefs/hc/MainPrefs.java b/app/src/main/java/com/csipsimple/ui/prefs/hc/MainPrefs.java
index 6fed10a..29c0fd7 100644
--- a/app/src/main/java/com/csipsimple/ui/prefs/hc/MainPrefs.java
+++ b/app/src/main/java/com/csipsimple/ui/prefs/hc/MainPrefs.java
@@ -24,12 +24,12 @@
import android.annotation.TargetApi;
import android.content.Intent;
import android.os.Bundle;
+import android.preference.PreferenceActivity;
import android.text.TextUtils;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
-import com.actionbarsherlock.app.SherlockPreferenceActivity;
-import com.actionbarsherlock.view.Menu;
-import com.actionbarsherlock.view.MenuInflater;
-import com.actionbarsherlock.view.MenuItem;
import com.csipsimple.R;
import com.csipsimple.api.SipManager;
import com.csipsimple.ui.prefs.CodecsFragment;
@@ -37,10 +37,12 @@
import com.csipsimple.ui.prefs.PrefsLogic;
import com.csipsimple.utils.PreferencesWrapper;
+import org.apache.http.Header;
+
import java.util.List;
@TargetApi(11)
-public class MainPrefs extends SherlockPreferenceActivity {
+public class MainPrefs extends PreferenceActivity {
private PreferencesWrapper prefsWrapper;
private List mFragments;
@@ -78,7 +80,7 @@ protected void onCreate(Bundle savedInstanceState) {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
- MenuInflater inflater = getSupportMenuInflater();
+ MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.main_prefs, menu);
return super.onCreateOptionsMenu(menu);
}
diff --git a/app/src/main/java/com/csipsimple/ui/warnings/WarningFragment.java b/app/src/main/java/com/csipsimple/ui/warnings/WarningFragment.java
index 8ed8841..250a23b 100644
--- a/app/src/main/java/com/csipsimple/ui/warnings/WarningFragment.java
+++ b/app/src/main/java/com/csipsimple/ui/warnings/WarningFragment.java
@@ -22,13 +22,13 @@
package com.csipsimple.ui.warnings;
import android.os.Bundle;
+import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
-import com.actionbarsherlock.app.SherlockFragment;
import com.csipsimple.R;
import com.csipsimple.ui.warnings.WarningUtils.OnWarningChanged;
import com.csipsimple.ui.warnings.WarningUtils.WarningBlockView;
@@ -38,7 +38,7 @@
import java.util.List;
-public class WarningFragment extends SherlockFragment implements OnWarningChanged {
+public class WarningFragment extends Fragment implements OnWarningChanged {
private static final String THIS_FILE = "WarningFragment";
private List warnList = new ArrayList();
diff --git a/app/src/main/java/com/csipsimple/widgets/AccountChooserButton.java b/app/src/main/java/com/csipsimple/widgets/AccountChooserButton.java
index 58d668e..830ff89 100644
--- a/app/src/main/java/com/csipsimple/widgets/AccountChooserButton.java
+++ b/app/src/main/java/com/csipsimple/widgets/AccountChooserButton.java
@@ -117,7 +117,7 @@ public AccountChooserButton(Context context, AttributeSet attrs) {
textView = (TextView) findViewById(R.id.quickaction_text);
imageView = (ImageView) findViewById(R.id.quickaction_icon);
-// mMenuBuilder = new MenuBuilder(getContext());
+ mMenuBuilder = new MenuBuilder(getContext());
// Init accounts
setAccount(null);
@@ -208,7 +208,7 @@ public void onClick(View v) {
// mPopupMenu = new MenuPopupHelper(getContext(), mMenuBuilder, this, false);
// mPopupMenu.setForceShowIcon(true);
// }
-// mMenuBuilder.removeGroup(R.id.menu_accbtn_accounts);
+ mMenuBuilder.removeGroup(R.id.menu_accbtn_accounts);
Cursor c = getContext().getContentResolver().query(SipProfile.ACCOUNT_URI, ACC_PROJECTION, SipProfile.FIELD_ACTIVE + "=?", new String[] {
"1"
@@ -467,8 +467,7 @@ public boolean onMenuItemClick(MenuItem item) {
}
public MenuItem addExtraMenuItem(int titleRes) {
-// return mMenuBuilder.add(R.id.menu_accbtn_extras, MenuBuilder.NONE, 100, titleRes);
- return null;
+ return mMenuBuilder.add(R.id.menu_accbtn_extras, MenuBuilder.NONE, 100, titleRes);
}
}
diff --git a/app/src/main/java/com/csipsimple/widgets/CheckableListItemView.java b/app/src/main/java/com/csipsimple/widgets/CheckableListItemView.java
index d946934..e459489 100644
--- a/app/src/main/java/com/csipsimple/widgets/CheckableListItemView.java
+++ b/app/src/main/java/com/csipsimple/widgets/CheckableListItemView.java
@@ -50,6 +50,7 @@ public CheckableListItemView(Context context, AttributeSet attrs) {
@Override
public void requestLayout() {
+ super.requestLayout();
// We will assume that once measured this will not need to resize
// itself, so there is no need to pass the layout request to the parent
// view (ListView).
@@ -71,7 +72,8 @@ public void setChecked(boolean aChecked) {
return;
}
checked = aChecked;
- setBackgroundResource(checked? R.drawable.abs__list_longpressed_holo : R.drawable.transparent);
+ // setBackgroundResource(checked? R.drawable.abs__list_longpressed_holo : R.drawable.transparent);
+ setBackgroundResource( R.drawable.transparent);
}
@Override
diff --git a/app/src/main/java/com/csipsimple/widgets/ShortcutWidgetConfigure.java b/app/src/main/java/com/csipsimple/widgets/ShortcutWidgetConfigure.java
index 0be7cd4..e724488 100644
--- a/app/src/main/java/com/csipsimple/widgets/ShortcutWidgetConfigure.java
+++ b/app/src/main/java/com/csipsimple/widgets/ShortcutWidgetConfigure.java
@@ -21,6 +21,7 @@
package com.csipsimple.widgets;
+import android.app.ListActivity;
import android.appwidget.AppWidgetManager;
import android.content.Context;
import android.content.Intent;
@@ -31,7 +32,6 @@
import android.widget.ListView;
import android.widget.SimpleAdapter;
-import com.actionbarsherlock.app.SherlockListActivity;
import com.csipsimple.R;
import com.csipsimple.api.SipManager;
import com.csipsimple.utils.Log;
@@ -41,7 +41,7 @@
import java.util.List;
import java.util.Map;
-public class ShortcutWidgetConfigure extends SherlockListActivity {
+public class ShortcutWidgetConfigure extends ListActivity {
private static final String WIDGET_PREFS = "widget_shortcut_prefs";
private static final String THIS_FILE = "ShortcutWidgetConfigure";
diff --git a/app/src/main/java/com/csipsimple/wizards/WizardChooser.java b/app/src/main/java/com/csipsimple/wizards/WizardChooser.java
index 7974d9a..e172b69 100644
--- a/app/src/main/java/com/csipsimple/wizards/WizardChooser.java
+++ b/app/src/main/java/com/csipsimple/wizards/WizardChooser.java
@@ -21,6 +21,7 @@
package com.csipsimple.wizards;
+import android.app.ExpandableListActivity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
@@ -32,14 +33,13 @@
import android.widget.SimpleExpandableListAdapter;
import android.widget.TextView;
-import com.actionbarsherlock.app.SherlockExpandableListActivity;
import com.csipsimple.R;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-public class WizardChooser extends SherlockExpandableListActivity {
+public class WizardChooser extends ExpandableListActivity {
private ArrayList>> childDatas;
// private static final String THIS_FILE = "SIP ADD ACC W";