diff --git a/res/layout/frag_call.xml b/res/layout/frag_call.xml index a829293c9cc8d1064a144781144753064482ae6e..813438d2ca6af2150859c57e48a5c3b7677fdf1d 100644 --- a/res/layout/frag_call.xml +++ b/res/layout/frag_call.xml @@ -36,8 +36,8 @@ android:layout_height="wrap_content" android:layout_centerVertical="true" android:layout_toLeftOf="@+id/dialpad_btn" - android:maxWidth="80dp" android:singleLine="true" + android:textSize="12sp" android:textAppearance="?android:attr/textAppearanceLarge" android:textColor="@color/white" /> diff --git a/res/layout/frag_contact_list.xml b/res/layout/frag_contact_list.xml index 3ffebaa7030c8c31e4407b43a8631e3e16cf7e24..fbcbded6641a915716c1879aabf1601aaa1b0f20 100644 --- a/res/layout/frag_contact_list.xml +++ b/res/layout/frag_contact_list.xml @@ -43,7 +43,6 @@ as that of the covered work. android:layout_height="68dp" > <RelativeLayout - android:id="@+id/coucou" android:layout_width="match_parent" android:layout_height="@dimen/contact_drawer_handle_height" android:layout_alignParentBottom="true" @@ -87,6 +86,7 @@ as that of the covered work. android:id="@+id/contacts_list" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="@color/sfl_dark_blue" android:drawSelectorOnTop="true" android:fastScrollEnabled="true" android:scrollbarStyle="outsideOverlay" /> diff --git a/src/org/sflphone/adapters/ContactPictureTask.java b/src/org/sflphone/adapters/ContactPictureTask.java index 36102c9b9ae11597d13e5f23b7ad610a7d7a205d..8c5d9bb6642f479538f17cc0b0472381301fdf5c 100644 --- a/src/org/sflphone/adapters/ContactPictureTask.java +++ b/src/org/sflphone/adapters/ContactPictureTask.java @@ -44,7 +44,9 @@ import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.BitmapShader; import android.graphics.Canvas; +import android.graphics.Color; import android.graphics.Paint; +import android.graphics.Paint.Style; import android.graphics.RectF; import android.graphics.Shader; import android.net.Uri; @@ -55,6 +57,7 @@ public class ContactPictureTask implements Runnable { private ImageView view; private CallContact contact; private ContentResolver cr; + private static int PADDING = 5; // private final String TAG = ContactPictureTask.class.getSimpleName(); @@ -82,6 +85,8 @@ public class ContactPictureTask implements Runnable { photo_bmp = null; } + int dpiPadding = (int) (PADDING * view.getResources().getDisplayMetrics().density); + if (photo_bmp == null) { photo_bmp = decodeSampledBitmapFromResource(view.getResources(), R.drawable.ic_contact_picture, view.getWidth(), view.getHeight()); } @@ -102,7 +107,14 @@ public class ContactPictureTask implements Runnable { paint.setAntiAlias(true); paint.setShader(shader); Canvas internalCanvas = new Canvas(externalBMP); - internalCanvas.drawOval(new RectF(0, 0, w, h), paint); + + Paint paintLine = new Paint(); + paintLine.setAntiAlias(true); + paintLine.setDither(true); + paintLine.setStyle(Style.STROKE); + paintLine.setColor(Color.WHITE); + internalCanvas.drawCircle(externalBMP.getWidth() / 2, externalBMP.getHeight() / 2, externalBMP.getWidth() / 2 - dpiPadding / 2, paintLine); + internalCanvas.drawOval(new RectF(PADDING, PADDING, externalBMP.getWidth() - dpiPadding, externalBMP.getHeight() - dpiPadding), paint); view.post(new Runnable() { @Override @@ -118,8 +130,8 @@ public class ContactPictureTask implements Runnable { // First decode with inJustDecodeBounds=true to check dimensions final BitmapFactory.Options options = new BitmapFactory.Options(); -// options.inJustDecodeBounds = true; -// BitmapFactory.decodeResource(res, resId, options); + // options.inJustDecodeBounds = true; + // BitmapFactory.decodeResource(res, resId, options); // Calculate inSampleSize options.inSampleSize = calculateInSampleSize(options, reqWidth, reqHeight); diff --git a/src/org/sflphone/client/HomeActivity.java b/src/org/sflphone/client/HomeActivity.java index 2f03211dcfee0f01c80cd08d7b21d9025fc0878f..b2049e0f2ae299d6b80a4a3b02a83fbe8a1db0c3 100644 --- a/src/org/sflphone/client/HomeActivity.java +++ b/src/org/sflphone/client/HomeActivity.java @@ -404,8 +404,6 @@ public class HomeActivity extends Activity implements DialingFragment.Callbacks, public void incomingCall(Intent call) { SipCall infos = call.getParcelableExtra("newcall"); - // mCallElementList.addCall(infos); - launchCallActivity(infos); } diff --git a/src/org/sflphone/service/ISipService.aidl b/src/org/sflphone/service/ISipService.aidl index 886700cd62bb9d2f3cc6b947eff9399b9c464fc9..18831411eba0052ce4916cbe7a8b8c08650b5427 100644 --- a/src/org/sflphone/service/ISipService.aidl +++ b/src/org/sflphone/service/ISipService.aidl @@ -31,6 +31,11 @@ interface ISipService { void setActiveCodecList(in List codecs, in String accountID); Map getRingtoneList(); + + // FIXME + List getAudioInputDeviceList(); + List getAudioOutputDeviceList(); + /* History */ List getHistory(); diff --git a/src/org/sflphone/service/SipService.java b/src/org/sflphone/service/SipService.java index 3ebab129361eeca8df533fc7abe0609bed468016..90e7f2befc5c23367186ac67153741c3fcbeb235 100644 --- a/src/org/sflphone/service/SipService.java +++ b/src/org/sflphone/service/SipService.java @@ -225,14 +225,8 @@ public class SipService extends Service { try { System.loadLibrary("gnustl_shared"); - System.loadLibrary("expat"); - System.loadLibrary("yaml"); - System.loadLibrary("ccgnu2"); System.loadLibrary("crypto"); System.loadLibrary("ssl"); - System.loadLibrary("ccrtp1"); - System.loadLibrary("samplerate"); - System.loadLibrary("speexresampler"); System.loadLibrary("sflphone"); isPjSipStackStarted = true; @@ -1172,8 +1166,7 @@ public class SipService extends Service { nm.cancel(NOTIFICATION_ID); // clear previous notifications. NotificationCompat.Builder builder = new NotificationCompat.Builder(getBaseContext()); - // - // builder.setContent(view); + builder.setContentIntent(contentIntent).setOngoing(true).setSmallIcon(R.drawable.ic_launcher) .setContentTitle(getCurrent_calls().size() + " ongoing calls").setTicker("Pending calls").setWhen(System.currentTimeMillis()) .setAutoCancel(false); @@ -1318,6 +1311,52 @@ public class SipService extends Service { }); } + /** + * Not working yet + */ + @Override + public List getAudioInputDeviceList() throws RemoteException { + class AudioInputDevices extends SipRunnableWithReturn { + + @Override + protected List doRun() throws SameThreadException { + Log.i(TAG, "SipService.getCredentials() thread running..."); + StringVect map = configurationManagerJNI.getAudioInputDeviceList(); + ArrayList<HashMap<String, String>> result = new ArrayList<HashMap<String,String>>(); + return result; + } + } + + AudioInputDevices runInstance = new AudioInputDevices(); + getExecutor().execute(runInstance); + while (!runInstance.isDone()) { + } + return (List) runInstance.getVal(); + } + + /** + * Not working yet + */ + @Override + public List getAudioOutputDeviceList() throws RemoteException { + class AudioOutputDevices extends SipRunnableWithReturn { + + @Override + protected List doRun() throws SameThreadException { + Log.i(TAG, "SipService.getCredentials() thread running..."); + StringVect map = configurationManagerJNI.getAudioOutputDeviceList(); + ArrayList<HashMap<String, String>> result = new ArrayList<HashMap<String,String>>(); + return result; + } + } + + AudioOutputDevices runInstance = new AudioOutputDevices(); + getExecutor().execute(runInstance); + while (!runInstance.isDone()) { + } + return (List) runInstance.getVal(); + } + };