Rename and delete

This commit is contained in:
Margaux Clerc 2015-08-17 15:01:41 +02:00
parent 690cfecbba
commit 6780613338
23 changed files with 124 additions and 754 deletions

View file

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/micro_on_over" />
<item android:state_enabled="false"
android:drawable="@drawable/micro_on_disabled" />
<item
android:drawable="@drawable/micro_on_default" />
</selector>

View file

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/speaker_off_over" />
<item android:state_enabled="false"
android:drawable="@drawable/speaker_off_disabled" />
<item
android:drawable="@drawable/speaker_off_default" />
</selector>

View file

@ -1,249 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/topLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true">
<LinearLayout
android:id="@+id/fragmentContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" />
<TableLayout
android:id="@+id/calls"
android:paddingTop="40dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="top" />
<fragment
android:id="@+id/status"
android:name="org.linphone.StatusFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:layout="@layout/status" />
</FrameLayout>
<ImageView
android:id="@+id/switchCamera"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_switch_camera"
android:layout_marginTop="40dp"
android:src="@drawable/switch_camera"
android:visibility="invisible" />
<org.linphone.ui.Numpad
android:contentDescription="@string/content_description_numpad"
android:id="@+id/numpad"
android:background="@drawable/dialer_alt_background"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="100dp" />
<LinearLayout
android:id="@+id/menu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:gravity="bottom"
android:orientation="horizontal" >
<TextView
android:contentDescription="@string/content_description_pause"
android:id="@+id/pause"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/pause_off"
android:gravity="center"
android:paddingTop="30dp" />
<TextView
android:contentDescription="@string/content_description_conference"
android:id="@+id/conference"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/conference"
android:gravity="center"
android:paddingTop="30dp" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center">
<TextView
android:id="@+id/video"
android:background="@drawable/video_off"
android:text="@string/button_video"
android:gravity="center"
android:paddingTop="30dp"
android:textColor="@drawable/text_incall_button_color"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<ProgressBar
android:id="@+id/videoInProgress"
style="?android:attr/progressBarStyle"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</RelativeLayout>
<TextView
android:id="@+id/micro"
android:background="@drawable/micro_on"
android:text="@string/button_micro"
android:gravity="center"
android:paddingTop="30dp"
android:textColor="@drawable/text_incall_button_color"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView
android:contentDescription="@string/content_description_hang_up"
android:id="@+id/hangUp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.94"
android:background="@drawable/hangup"
android:gravity="center"
android:paddingTop="30dp" />
<TextView
android:id="@+id/speaker"
android:background="@drawable/speaker_off"
android:text="@string/button_speaker"
android:gravity="center"
android:paddingTop="30dp"
android:textColor="@drawable/text_incall_button_color"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
<LinearLayout
android:id="@+id/routesLayout"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="1">
<TextView
android:id="@+id/routeBluetooth"
android:visibility="invisible"
android:text="@string/button_bluetooth"
android:gravity="center"
android:paddingTop="35dp"
android:textColor="@drawable/text_incall_button_color"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/routeReceiver"
android:visibility="invisible"
android:text="@string/button_receiver"
android:gravity="center"
android:paddingTop="35dp"
android:textColor="@drawable/text_incall_button_color"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/routeSpeaker"
android:visibility="invisible"
android:text="@string/button_speaker"
android:gravity="center"
android:paddingTop="35dp"
android:textColor="@drawable/text_incall_button_color"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/audioRoute"
android:text="@string/button_route"
android:gravity="center"
android:paddingTop="30dp"
android:textColor="@drawable/text_incall_button_color"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="1">
<TextView
android:id="@+id/transfer"
android:background="@drawable/options_transfer"
android:text="@string/button_transfer"
android:gravity="center"
android:paddingTop="35dp"
android:visibility="invisible"
android:textColor="@drawable/text_incall_button_color"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/addCall"
android:background="@drawable/options_add_call_alt"
android:text="@string/button_add_call"
android:gravity="center"
android:paddingTop="35dp"
android:visibility="invisible"
android:textColor="@drawable/text_incall_button_color"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/options"
android:background="@drawable/options"
android:text="@string/button_options"
android:gravity="center"
android:paddingTop="30dp"
android:textColor="@drawable/text_incall_button_color"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<TextView
android:id="@+id/dialer"
android:contentDescription="@string/content_description_dialer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/dialer_alt"
android:gravity="center"
android:paddingTop="30dp" />
</LinearLayout>
</RelativeLayout>

View file

@ -1,191 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/topLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true">
<LinearLayout
android:id="@+id/fragmentContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" />
<TableLayout
android:id="@+id/calls"
android:paddingTop="40dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="top" />
<fragment
android:id="@+id/status"
android:name="org.linphone.StatusFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:layout="@layout/status" />
</FrameLayout>
<ImageView
android:id="@+id/switchCamera"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:contentDescription="@string/content_description_switch_camera"
android:layout_marginTop="40dp"
android:visibility="invisible"
android:src="@drawable/switch_camera" />
<org.linphone.ui.Numpad
android:id="@+id/numpad"
android:background="@drawable/dialer_alt_background"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_marginBottom="150dp"
android:layout_centerInParent="true" />
<RelativeLayout
android:id="@+id/menu"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_gravity="bottom"
android:gravity="bottom"
android:orientation="horizontal" >
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center">
<TextView
android:id="@+id/video"
android:background="@drawable/video_off"
android:text="@string/button_video"
android:gravity="center"
android:paddingTop="45dp"
android:textColor="@drawable/text_incall_button_color"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ProgressBar
android:id="@+id/videoInProgress"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:visibility="gone" />
</RelativeLayout>
<TextView
android:id="@+id/micro"
android:background="@drawable/micro_on"
android:text="@string/button_micro"
android:gravity="center"
android:paddingTop="45dp"
android:textColor="@drawable/text_incall_button_color"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/speaker"
android:background="@drawable/speaker_off"
android:text="@string/button_speaker"
android:gravity="center"
android:paddingTop="45dp"
android:textColor="@drawable/text_incall_button_color"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/options"
android:background="@drawable/options"
android:text="@string/button_options"
android:gravity="center"
android:paddingTop="45dp"
android:textColor="@drawable/text_incall_button_color"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/addCall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@drawable/options_add_call_alt"
android:visibility="gone"
android:gravity="center"
android:paddingTop="45dp"
android:text="@string/button_add_call"
android:textColor="@drawable/text_incall_button_color" />
<TextView
android:id="@+id/transfer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@drawable/options_transfer"
android:visibility="gone"
android:gravity="center"
android:paddingTop="45dp"
android:text="@string/button_transfer"
android:textColor="@drawable/text_incall_button_color" />
</LinearLayout>
<LinearLayout
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/conference"
android:contentDescription="@string/content_description_conference"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/conference" />
<TextView
android:id="@+id/pause"
android:contentDescription="@string/content_description_pause"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/pause_off" />
<TextView
android:id="@+id/dialer"
android:contentDescription="@string/content_description_dialer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/dialer_alt" />
<TextView
android:id="@+id/hangUp"
android:contentDescription="@string/content_description_hang_up"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/hangup" />
</LinearLayout>
</RelativeLayout>
</RelativeLayout>

View file

@ -1,190 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/topLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true">
<LinearLayout
android:id="@+id/fragmentContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" />
<TableLayout
android:id="@+id/calls"
android:paddingTop="40dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="top" />
<fragment
android:id="@+id/status"
android:name="org.linphone.StatusFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:layout="@layout/status" />
</FrameLayout>
<ImageView
android:id="@+id/switchCamera"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:contentDescription="@string/content_description_switch_camera"
android:layout_marginTop="40dp"
android:visibility="invisible"
android:src="@drawable/switch_camera" />
<org.linphone.ui.Numpad
android:id="@+id/numpad"
android:background="@drawable/dialer_alt_background"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_marginBottom="150dp"
android:layout_centerInParent="true" />
<RelativeLayout
android:id="@+id/menu"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_gravity="bottom"
android:gravity="bottom"
android:orientation="horizontal" >
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center">
<TextView
android:id="@+id/video"
android:background="@drawable/video_off"
android:text="@string/button_video"
android:gravity="center"
android:paddingTop="45dp"
android:textColor="@drawable/text_incall_button_color"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ProgressBar
android:id="@+id/videoInProgress"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:visibility="gone" />
</RelativeLayout>
<TextView
android:id="@+id/micro"
android:background="@drawable/micro_on"
android:text="@string/button_micro"
android:gravity="center"
android:paddingTop="45dp"
android:textColor="@drawable/text_incall_button_color"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/speaker"
android:background="@drawable/speaker_off"
android:text="@string/button_speaker"
android:gravity="center"
android:paddingTop="45dp"
android:textColor="@drawable/text_incall_button_color"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/options"
android:background="@drawable/options"
android:text="@string/button_options"
android:gravity="center"
android:paddingTop="45dp"
android:textColor="@drawable/text_incall_button_color"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/addCall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@drawable/options_add_call_alt"
android:visibility="gone"
android:gravity="center"
android:paddingTop="45dp"
android:text="@string/button_add_call"
android:textColor="@drawable/text_incall_button_color" />
<TextView
android:id="@+id/transfer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@drawable/options_transfer"
android:visibility="gone"
android:gravity="center"
android:paddingTop="45dp"
android:text="@string/button_transfer"
android:textColor="@drawable/text_incall_button_color" />
</LinearLayout>
<LinearLayout
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/conference"
android:contentDescription="@string/content_description_conference"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/conference" />
<TextView
android:id="@+id/pause"
android:contentDescription="@string/content_description_pause"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/pause_off" />
<TextView
android:id="@+id/dialer"
android:contentDescription="@string/content_description_dialer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/dialer_alt" />
<TextView
android:id="@+id/hangUp"
android:contentDescription="@string/content_description_hang_up"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/hangup" />
</LinearLayout>
</RelativeLayout>
</RelativeLayout>

View file

@ -7,10 +7,8 @@
<TextView
android:contentDescription="@string/content_description_welcome"
android:paddingTop="20dp"
android:textSize="30sp"
android:textStyle="bold"
style="@style/font6"
android:layout_gravity="center"
android:textColor="@color/footer_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/setup_create_account"
@ -19,10 +17,10 @@
<TextView
android:textSize="20sp"
android:layout_gravity="center"
android:textColor="@color/footer_button"
android:textColor="@color/colorD"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/setup_create_account_part_1"/>
android:text="@string/assistant_create_account_part_1"/>
<TextView
android:paddingTop="10dp"

View file

@ -8,10 +8,8 @@
<TextView
android:contentDescription="@string/content_description_welcome"
android:paddingTop="20dp"
android:textSize="30sp"
android:textStyle="bold"
style="@style/font6"
android:layout_gravity="center"
android:textColor="@color/footer_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/setup_create_account"
@ -20,10 +18,10 @@
<TextView
android:textSize="20sp"
android:layout_gravity="center"
android:textColor="@color/footer_button"
android:textColor="@color/colorD"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/setup_create_account_part_2"/>
android:text="@string/assistant_create_account_part_2"/>
<RelativeLayout
android:layout_marginTop="20dp"

View file

@ -5,15 +5,16 @@
android:orientation="vertical" >
<TextView
android:text="@string/assistant_general_account_title"
android:contentDescription="@string/content_description_welcome"
android:paddingTop="20dp"
android:textSize="30sp"
android:textStyle="bold"
android:layout_gravity="center"
android:textColor="@color/footer_button"
android:textColor="@color/colorD"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/setup_general_account_hint"
android:gravity="center_horizontal"/>
<LinearLayout
@ -32,7 +33,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAllCaps="true"
android:text="@string/setup_username_hint"/>
android:text="@string/username"/>
<EditText
android:textCursorDrawable="@null"
@ -53,7 +54,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAllCaps="true"
android:text="@string/setup_password_hint"/>
android:text="@string/password"/>
<EditText
android:textCursorDrawable="@null"
@ -89,6 +90,26 @@
android:singleLine="true"
android:textColor="@android:color/black"
android:background="@drawable/resizable_textfield" />
<TextView
android:text="@string/display_name"
style="@style/font13"
android:textAllCaps="true"
android:paddingTop="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/assistant_display_name"
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:textCursorDrawable="@null"
android:inputType="textEmailAddress"
android:layout_width="match_parent"
android:layout_height="40dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"/>
<RelativeLayout
android:layout_marginTop="20dp"

View file

@ -10,7 +10,7 @@
android:textSize="30sp"
android:textStyle="bold"
android:layout_gravity="center"
android:textColor="@color/footer_button"
android:textColor="@color/colorD"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/setup_linphone_account_hint"

View file

@ -5,15 +5,14 @@
android:orientation="vertical">
<TextView
android:text="@string/assistant_remote_provisioning_title"
android:contentDescription="@string/content_description_welcome"
style="@style/font6"
android:textAllCaps="true"
android:paddingTop="20dp"
android:textSize="30sp"
android:textStyle="bold"
android:layout_gravity="center"
android:textColor="@color/footer_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/setup_remote_provisioning_hint"
android:gravity="center_horizontal"/>
<LinearLayout
@ -26,48 +25,44 @@
android:orientation="vertical">
<TextView
android:textSize="16sp"
android:paddingTop="10dp"
android:textColor="@color/colorD"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/remote_provisioning_url"
style="@style/font13"
android:textAllCaps="true"
android:text="@string/setup_remote_provisioning_url_hint"/>
<EditText
android:textCursorDrawable="@null"
android:id="@+id/setup_remote_provisioning_url"
android:layout_width="match_parent"
android:layout_height="40dp"
android:inputType="textUri"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"
android:textColor="@android:color/black"
android:background="@drawable/resizable_textfield" />
<RelativeLayout
android:id="@+id/setup_apply_button"
android:layout_marginTop="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:paddingTop="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/setup_remote_provisioning_url"
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:textCursorDrawable="@null"
android:inputType="textEmailAddress"
android:layout_width="match_parent"
android:layout_height="40dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"/>
<RelativeLayout
android:layout_marginTop="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/setup_apply"
android:id="@+id/assistant_apply"
android:text="@string/assistant_apply"
android:background="@drawable/resizable_assistant_button"
style="@style/font8"
android:contentDescription="@string/content_description_validate"
android:layout_width="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:textAllCaps="true"
android:layout_centerInParent="true"
android:layout_height="wrap_content"
android:textColor="@android:color/black"
android:contentDescription="@string/content_description_validate"
android:background="@drawable/resizable_assistant_button"
android:text="@string/setup_apply"
android:layout_centerVertical="true"/>
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
</LinearLayout>

View file

@ -1,4 +1,4 @@
package org.linphone.setup;
package org.linphone.assistant;
/*
SetupActivity.java
Copyright (C) 2012 Belledonne Communications, Grenoble, France
@ -46,8 +46,8 @@ import android.widget.Toast;
/**
* @author Sylvain Berfini
*/
public class SetupActivity extends Activity implements OnClickListener {
private static SetupActivity instance;
public class AssistantActivity extends Activity implements OnClickListener {
private static AssistantActivity instance;
private RelativeLayout back, cancel;
private SetupFragmentsEnum currentFragment;
private SetupFragmentsEnum firstFragment;
@ -63,8 +63,11 @@ public class SetupActivity extends Activity implements OnClickListener {
if (getResources().getBoolean(R.bool.isTablet) && getRequestedOrientation() != ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
}
setContentView(R.layout.assistant);
initUI();
firstFragment = getResources().getBoolean(R.bool.setup_use_linphone_as_first_fragment) ?
SetupFragmentsEnum.LINPHONE_LOGIN : SetupFragmentsEnum.MENU;
if (findViewById(R.id.fragmentContainer) != null) {
@ -76,8 +79,6 @@ public class SetupActivity extends Activity implements OnClickListener {
}
mPrefs = LinphonePreferences.instance();
initUI();
mListener = new LinphoneCoreListenerBase(){
@Override
public void registrationState(LinphoneCore lc, LinphoneProxyConfig cfg, LinphoneCore.RegistrationState state, String smessage) {
@ -88,7 +89,7 @@ public class SetupActivity extends Activity implements OnClickListener {
launchEchoCancellerCalibration(true);
}
} else if (state == RegistrationState.RegistrationFailed) {
Toast.makeText(SetupActivity.this, getString(R.string.first_launch_bad_login_password), Toast.LENGTH_LONG).show();
Toast.makeText(AssistantActivity.this, getString(R.string.first_launch_bad_login_password), Toast.LENGTH_LONG).show();
}
}
}
@ -124,23 +125,21 @@ public class SetupActivity extends Activity implements OnClickListener {
super.onSaveInstanceState(outState);
}
public static SetupActivity instance() {
public static AssistantActivity instance() {
return instance;
}
private void initUI() {
back = (RelativeLayout) findViewById(R.id.setup_back);
back = (RelativeLayout) findViewById(R.id.assistant_back);
back.setOnClickListener(this);
cancel = (RelativeLayout) findViewById(R.id.setup_cancel);
cancel = (RelativeLayout) findViewById(R.id.assistant_cancel);
cancel.setOnClickListener(this);
}
private void changeFragment(Fragment newFragment) {
FragmentTransaction transaction = getFragmentManager().beginTransaction();
// transaction.addToBackStack("");
transaction.replace(R.id.fragmentContainer, newFragment);
transaction.commitAllowingStateLoss();
}
@ -148,7 +147,7 @@ public class SetupActivity extends Activity implements OnClickListener {
public void onClick(View v) {
int id = v.getId();
if (id == R.id.setup_cancel) {
if (id == R.id.assistant_cancel) {
LinphonePreferences.instance().firstLaunchSuccessful();
if (getResources().getBoolean(R.bool.setup_cancel_move_to_back)) {
moveTaskToBack(true);
@ -156,7 +155,7 @@ public class SetupActivity extends Activity implements OnClickListener {
setResult(Activity.RESULT_CANCELED);
finish();
}
} else if (id == R.id.setup_back) {
} else if (id == R.id.assistant_back) {
onBackPressed();
}
}
@ -173,11 +172,12 @@ public class SetupActivity extends Activity implements OnClickListener {
}
} else if (currentFragment == SetupFragmentsEnum.GENERIC_LOGIN
|| currentFragment == SetupFragmentsEnum.LINPHONE_LOGIN
|| currentFragment == SetupFragmentsEnum.WIZARD
|| currentFragment == SetupFragmentsEnum.CREATE_ACCOUNT
|| currentFragment == SetupFragmentsEnum.REMOTE_PROVISIONING) {
MenuFragment fragment = new MenuFragment();
changeFragment(fragment);
currentFragment = SetupFragmentsEnum.MENU;
back.setVisibility(View.GONE);
} else if (currentFragment == SetupFragmentsEnum.MENU) {
finish();
}
@ -201,33 +201,33 @@ public class SetupActivity extends Activity implements OnClickListener {
}
}
private void logIn(String username, String password, String domain, boolean sendEcCalibrationResult) {
private void logIn(String username, String password, String displayName, String domain, boolean sendEcCalibrationResult) {
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm != null && getCurrentFocus() != null) {
imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
}
saveCreatedAccount(username, password, domain);
saveCreatedAccount(username, password, displayName, domain);
if (LinphoneManager.getLc().getDefaultProxyConfig() != null) {
launchEchoCancellerCalibration(sendEcCalibrationResult);
}
}
public void checkAccount(String username, String password, String domain) {
saveCreatedAccount(username, password, domain);
public void checkAccount(String username, String password, String displayName, String domain) {
saveCreatedAccount(username, password, displayName, domain);
}
public void linphoneLogIn(String username, String password, boolean validate) {
public void linphoneLogIn(String username, String password, String displayName, boolean validate) {
if (validate) {
checkAccount(username, password, getString(R.string.default_domain));
checkAccount(username, password, displayName, getString(R.string.default_domain));
} else {
logIn(username, password, getString(R.string.default_domain), true);
logIn(username, password, displayName, getString(R.string.default_domain), true);
}
}
public void genericLogIn(String username, String password, String domain) {
logIn(username, password, domain, false);
public void genericLogIn(String username, String password, String displayName, String domain) {
logIn(username, password, displayName, domain, false);
}
private void display(SetupFragmentsEnum fragment) {
@ -241,39 +241,45 @@ public class SetupActivity extends Activity implements OnClickListener {
default:
throw new IllegalStateException("Can't handle " + fragment);
}
back.setVisibility(View.VISIBLE);
}
public void displayMenu() {
fragment = new MenuFragment();
changeFragment(fragment);
currentFragment = SetupFragmentsEnum.MENU;
back.setVisibility(View.GONE);
}
public void displayLoginGeneric() {
fragment = new GenericLoginFragment();
changeFragment(fragment);
currentFragment = SetupFragmentsEnum.GENERIC_LOGIN;
back.setVisibility(View.VISIBLE);
}
public void displayLoginLinphone() {
fragment = new LinphoneLoginFragment();
changeFragment(fragment);
currentFragment = SetupFragmentsEnum.LINPHONE_LOGIN;
back.setVisibility(View.VISIBLE);
}
public void displayWizard() {
fragment = new WizardFragment();
fragment = new CreateAccountFragment();
changeFragment(fragment);
currentFragment = SetupFragmentsEnum.WIZARD;
currentFragment = SetupFragmentsEnum.CREATE_ACCOUNT;
back.setVisibility(View.VISIBLE);
}
public void displayRemoteProvisioning() {
fragment = new RemoteProvisioningFragment();
changeFragment(fragment);
currentFragment = SetupFragmentsEnum.REMOTE_PROVISIONING;
back.setVisibility(View.VISIBLE);
}
public void saveCreatedAccount(String username, String password, String domain) {
public void saveCreatedAccount(String username, String password, String displayName, String domain) {
if (accountCreated)
return;
@ -294,6 +300,11 @@ public class SetupActivity extends Activity implements OnClickListener {
} catch (LinphoneCoreException e) {
e.printStackTrace();
}
if(displayName != null && !displayName.equals("")){
address.setDisplayName(displayName);
}
boolean isMainAccountLinphoneDotOrg = domain.equals(getString(R.string.default_domain));
boolean useLinphoneDotOrgCustomPorts = getResources().getBoolean(R.bool.use_linphone_server_ports);
AccountBuilder builder = new AccountBuilder(LinphoneManager.getLc())
@ -350,14 +361,14 @@ public class SetupActivity extends Activity implements OnClickListener {
}
public void displayWizardConfirm(String username) {
WizardConfirmFragment fragment = new WizardConfirmFragment();
CreateAccountConfirmFragment fragment = new CreateAccountConfirmFragment();
Bundle extras = new Bundle();
extras.putString("Username", username);
fragment.setArguments(extras);
changeFragment(fragment);
currentFragment = SetupFragmentsEnum.WIZARD_CONFIRM;
currentFragment = SetupFragmentsEnum.CREATE_ACCOUNT_CONFIRM;
back.setVisibility(View.GONE);
}

View file

@ -1,4 +1,4 @@
package org.linphone.setup;
package org.linphone.assistant;
/*
SetupFragments.java
Copyright (C) 2012 Belledonne Communications, Grenoble, France
@ -20,10 +20,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/**
* @author Sylvain Berfini
*/
public enum SetupFragmentsEnum {
public enum AssistantFragmentsEnum {
MENU,
WIZARD,
WIZARD_CONFIRM,
CREATE_ACCOUNT,
CREATE_ACCOUNT_CONFIRM,
LINPHONE_LOGIN,
GENERIC_LOGIN,
REMOTE_PROVISIONING,

View file

@ -1,4 +1,4 @@
package org.linphone.setup;
package org.linphone.assistant;
/*
WizardConfirmFragment.java
Copyright (C) 2012 Belledonne Communications, Grenoble, France
@ -29,7 +29,6 @@ import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.Toast;
import de.timroes.axmlrpc.XMLRPCCallback;
import de.timroes.axmlrpc.XMLRPCClient;
@ -38,18 +37,18 @@ import de.timroes.axmlrpc.XMLRPCServerException;
/**
* @author Sylvain Berfini
*/
public class WizardConfirmFragment extends Fragment {
public class CreateAccountConfirmFragment extends Fragment {
private String username;
private Handler mHandler = new Handler();
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.setup_wizard_confirm, container, false);
View view = inflater.inflate(R.layout.assistant_account_creation_confirm, container, false);
username = getArguments().getString("Username");
Button checkAccount = (Button) view.findViewById(R.id.setup_check);
Button checkAccount = (Button) view.findViewById(R.id.assistant_check);
checkAccount.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {

View file

@ -1,4 +1,4 @@
package org.linphone.setup;
package org.linphone.assistant;
/*
WizardFragment.java
Copyright (C) 2012 Belledonne Communications, Grenoble, France
@ -54,7 +54,7 @@ import de.timroes.axmlrpc.XMLRPCServerException;
/**
* @author Sylvain Berfini
*/
public class WizardFragment extends Fragment {
public class CreateAccountFragment extends Fragment {
private Handler mHandler = new Handler();
private EditText username, password, passwordConfirm, email;
@ -81,7 +81,7 @@ public class WizardFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.setup_wizard, container, false);
View view = inflater.inflate(R.layout.assistant_account_creation, container, false);
username = (EditText) view.findViewById(R.id.setup_username);
ImageView usernameOkIV = (ImageView) view.findViewById(R.id.setup_username_ok);
@ -121,7 +121,7 @@ public class WizardFragment extends Fragment {
errorMessage = (TextView) view.findViewById(R.id.setup_error);
createAccount = (Button) view.findViewById(R.id.setup_create);
createAccount = (Button) view.findViewById(R.id.assistant_create);
createAccount.setEnabled(false);
createAccount.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
@ -253,7 +253,7 @@ public class WizardFragment extends Fragment {
Runnable runOk = new Runnable() {
public void run() {
SetupActivity.instance().saveCreatedAccount(username, password, context.getString(R.string.default_domain));
SetupActivity.instance().saveCreatedAccount(username, password, null, context.getString(R.string.default_domain));
SetupActivity.instance().displayWizardConfirm(username);
}
};

View file

@ -1,4 +1,4 @@
package org.linphone.setup;
package org.linphone.assistant;
/*
EchoCancellerCalibrationFragment.java

View file

@ -1,4 +1,4 @@
package org.linphone.setup;
package org.linphone.assistant;
/*
GenericLoginFragment.java
Copyright (C) 2012 Belledonne Communications, Grenoble, France
@ -27,7 +27,6 @@ import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.Toast;
/**
* @author Sylvain Berfini

View file

@ -1,4 +1,4 @@
package org.linphone.setup;
package org.linphone.assistant;
/*
LinphoneLoginFragment.java
Copyright (C) 2012 Belledonne Communications, Grenoble, France
@ -27,7 +27,6 @@ import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.Toast;
/**
* @author Sylvain Berfini
@ -39,7 +38,7 @@ public class LinphoneLoginFragment extends Fragment implements OnClickListener {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.setup_linphone_login, container, false);
View view = inflater.inflate(R.layout.assistant_linphone_login, container, false);
login = (EditText) view.findViewById(R.id.setup_username);
password = (EditText) view.findViewById(R.id.setup_password);

View file

@ -1,4 +1,4 @@
package org.linphone.setup;
package org.linphone.assistant;
/*
MenuFragment.java
Copyright (C) 2012 Belledonne Communications, Grenoble, France

View file

@ -1,4 +1,4 @@
package org.linphone.setup;
package org.linphone.assistant;
/*
RemoteProvisioningActivity.java
Copyright (C) 2014 Belledonne Communications, Grenoble, France

View file

@ -1,4 +1,4 @@
package org.linphone.setup;
package org.linphone.assistant;
import org.linphone.LinphoneActivity;
import org.linphone.LinphoneLauncherActivity;
@ -14,7 +14,6 @@ import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
public class RemoteProvisioningFragment extends Fragment implements OnClickListener {
private EditText remoteProvisioningUrl;

View file

@ -1,4 +1,4 @@
package org.linphone.setup;
package org.linphone.assistant;
/*
RemoteProvisioningLoginActivity.java
Copyright (C) 2014 Belledonne Communications, Grenoble, France
@ -33,7 +33,6 @@ import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;
import android.widget.RelativeLayout;
import android.widget.Toast;
/**
* @author Sylvain Berfini