Rework assistant

This commit is contained in:
Margaux Clerc 2015-08-17 15:04:37 +02:00
parent 6780613338
commit 90d9193aa7
25 changed files with 478 additions and 551 deletions

View file

@ -99,6 +99,16 @@
</intent-filter>
</activity>
<activity android:name="org.linphone.OutgoingCallActivity"
android:theme="@style/NoTitle"
android:noHistory="true"
android:launchMode="singleTop"
android:screenOrientation="behind">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<activity android:name="org.linphone.InCallActivity"
android:theme="@style/FullScreen"
android:noHistory="true"
@ -125,7 +135,7 @@
</intent-filter>
</activity>
<activity android:name="org.linphone.setup.SetupActivity"
<activity android:name=".assistant.AssistantActivity"
android:theme="@style/NoTitle"
android:screenOrientation="nosensor">
<intent-filter>
@ -133,7 +143,7 @@
</intent-filter>
</activity>
<activity android:name="org.linphone.setup.RemoteProvisioningLoginActivity"
<activity android:name="org.linphone.assistant.RemoteProvisioningLoginActivity"
android:theme="@style/NoTitle"
android:screenOrientation="nosensor">
<intent-filter>
@ -141,7 +151,7 @@
</intent-filter>
</activity>
<activity android:name="org.linphone.setup.RemoteProvisioningActivity"
<activity android:name="org.linphone.assistant.RemoteProvisioningActivity"
android:theme="@style/NoTitle"
android:screenOrientation="nosensor">
<intent-filter>

View file

@ -5,30 +5,30 @@
android:orientation="vertical" >
<TextView
android:text="@string/assistant_create_account_title"
android:contentDescription="@string/content_description_welcome"
android:paddingTop="20dp"
style="@style/font6"
android:textAllCaps="true"
android:paddingTop="20dp"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/setup_create_account"
android:gravity="center_horizontal"/>
<TextView
android:textSize="20sp"
android:text="@string/assistant_create_account_part_1"
style="@style/font11"
android:layout_gravity="center"
android:textColor="@color/colorD"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/assistant_create_account_part_1"/>
android:layout_height="wrap_content"/>
<TextView
<TextView
android:id="@+id/assistant_error"
android:textColor="@color/colorI"
android:paddingTop="10dp"
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/setup_error"
android:textColor="#ffff0000"/>
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="match_parent"
@ -39,167 +39,165 @@
android:orientation="vertical">
<TextView
android:textSize="16sp"
android:textColor="@color/colorD"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/username"
style="@style/font13"
android:textAllCaps="true"
android:text="@string/setup_username_hint"/>
android:paddingTop="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:textCursorDrawable="@null"
android:id="@+id/setup_username"
android:layout_width="match_parent"
android:layout_height="40dp"
android:inputType="textEmailAddress"
android:padding="10dp"
android:singleLine="true"
android:textColor="@android:color/black"
android:background="@drawable/resizable_textfield" />
<EditText
android:id="@+id/assistant_username"
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"/>
<ImageView
<ImageView
android:id="@+id/assistant_username_ok"
android:src="@drawable/wizard_notok"
android:contentDescription="@string/content_description_setup_ok"
android:id="@+id/setup_username_ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="5dp"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:src="@drawable/wizard_notok"/>
android:layout_alignParentRight="true" />
</RelativeLayout>
<TextView
android:textSize="16sp"
android:paddingTop="10dp"
android:textColor="@color/colorD"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/password"
style="@style/font13"
android:textAllCaps="true"
android:text="@string/setup_password_hint"/>
android:paddingTop="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:textCursorDrawable="@null"
android:id="@+id/setup_password"
android:layout_width="match_parent"
android:layout_height="40dp"
android:inputType="textPassword"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"
android:textColor="@android:color/black"
android:background="@drawable/resizable_textfield" />
android:id="@+id/assistant_password"
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"/>
<ImageView
android:contentDescription="@string/content_description_setup_ok"
android:id="@+id/setup_password_ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="5dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/wizard_notok"/>
</RelativeLayout>
<ImageView
android:id="@+id/assistant_password_ok"
android:src="@drawable/wizard_notok"
android:contentDescription="@string/content_description_setup_ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="5dp"
android:layout_centerVertical="true"
android:layout_alignParentRight="true" />
</RelativeLayout>
<TextView
android:textSize="16sp"
android:paddingTop="10dp"
android:textColor="@color/colorD"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/assistant_password_confirm"
style="@style/font13"
android:textAllCaps="true"
android:text="@string/setup_password_confirm_hint"/>
android:paddingTop="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:textCursorDrawable="@null"
android:id="@+id/setup_password_confirm"
android:layout_width="match_parent"
android:layout_height="40dp"
android:inputType="textPassword"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"
android:textColor="@android:color/black"
android:background="@drawable/resizable_textfield" />
android:id="@+id/assistant_password_confirm"
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:textCursorDrawable="@null"
android:inputType="text"
android:layout_width="match_parent"
android:layout_height="40dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"/>
<ImageView
android:contentDescription="@string/content_description_setup_ok"
android:id="@+id/setup_confirm_password_ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="5dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/wizard_notok"/>
</RelativeLayout>
<ImageView
android:id="@+id/assistant_confirm_password_ok"
android:src="@drawable/wizard_notok"
android:contentDescription="@string/content_description_setup_ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="5dp"
android:layout_centerVertical="true"
android:layout_alignParentRight="true" />
</RelativeLayout>
<TextView
android:textSize="16sp"
android:paddingTop="10dp"
android:textColor="@color/colorD"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/email"
style="@style/font13"
android:textAllCaps="true"
android:text="@string/setup_email_hint"/>
android:paddingTop="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:textCursorDrawable="@null"
android:id="@+id/setup_email"
android:layout_width="match_parent"
android:layout_height="40dp"
android:inputType="textEmailAddress"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"
android:textColor="@android:color/black"
android:background="@drawable/resizable_textfield" />
android:id="@+id/assistant_email"
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:textCursorDrawable="@null"
android:inputType="text"
android:layout_width="match_parent"
android:layout_height="40dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"/>
<ImageView
android:contentDescription="@string/content_description_setup_ok"
android:id="@+id/setup_email_ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="5dp"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:src="@drawable/wizard_notok"/>
<ImageView
android:id="@+id/assistant_email_ok"
android:src="@drawable/wizard_notok"
android:contentDescription="@string/content_description_setup_ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="5dp"
android:layout_centerVertical="true"
android:layout_alignParentRight="true" />
</RelativeLayout>
<RelativeLayout
android:layout_marginTop="10dp"
android:layout_marginTop="20dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:id="@+id/setup_create"
android:id="@+id/assistant_create"
android:text="@string/assistant_create"
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_height="wrap_content"
android:textColor="@android:color/black"
android:contentDescription="@string/content_description_validate"
android:background="@drawable/resizable_assistant_button"
android:text="@string/setup_create"
android:layout_centerVertical="true"/>
</RelativeLayout>

View file

@ -6,40 +6,38 @@
android:orientation="vertical" >
<TextView
android:text="@string/assistant_create_account"
android:contentDescription="@string/content_description_welcome"
android:paddingTop="20dp"
style="@style/font6"
android:textAllCaps="true"
android:paddingTop="20dp"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/setup_create_account"
android:gravity="center_horizontal"/>
<TextView
android:textSize="20sp"
android:text="@string/assistant_create_account_part_2"
style="@style/font11"
android:layout_gravity="center"
android:textColor="@color/colorD"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/assistant_create_account_part_2"/>
android:layout_height="wrap_content"/>
<RelativeLayout
android:layout_marginTop="20dp"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:id="@+id/setup_check"
android:id="@+id/assistant_check"
android:text="@string/assistant_create"
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/setup_check_account_validation"
android:background="@drawable/resizable_assistant_button"
android:text="@string/setup_create"
android:layout_centerVertical="true"/>
</RelativeLayout>

View file

@ -7,14 +7,12 @@
<TextView
android:text="@string/assistant_general_account_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/colorD"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"/>
<LinearLayout
@ -27,69 +25,66 @@
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/username"
style="@style/font13"
android:textAllCaps="true"
android:text="@string/username"/>
<EditText
android:textCursorDrawable="@null"
android:id="@+id/setup_username"
android:layout_width="match_parent"
android:layout_height="40dp"
android:inputType="textEmailAddress"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"
android:textColor="@android:color/black"
android:background="@drawable/resizable_textfield" />
android:paddingTop="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/assistant_username"
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"/>
<TextView
android:textSize="16sp"
android:paddingTop="10dp"
android:textColor="@color/colorD"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/password"
style="@style/font13"
android:textAllCaps="true"
android:text="@string/password"/>
<EditText
android:textCursorDrawable="@null"
android:id="@+id/setup_password"
android:layout_width="match_parent"
android:layout_height="40dp"
android:inputType="textPassword"
android:layout_marginTop="5dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"
android:textColor="@android:color/black"
android:background="@drawable/resizable_textfield" />
android:paddingTop="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/assistant_password"
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:textCursorDrawable="@null"
android:inputType="textPassword"
android:layout_width="match_parent"
android:layout_height="40dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"/>
<TextView
android:textSize="16sp"
android:paddingTop="10dp"
android:textColor="@color/colorD"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/domain"
style="@style/font13"
android:textAllCaps="true"
android:text="@string/setup_domain_hint"/>
<EditText
android:textCursorDrawable="@null"
android:id="@+id/setup_domain"
android:layout_width="match_parent"
android:layout_height="40dp"
android:inputType="textEmailAddress"
android:layout_marginTop="5dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"
android:textColor="@android:color/black"
android:background="@drawable/resizable_textfield" />
android:paddingTop="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/assistant_domain"
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"/>
<TextView
android:text="@string/display_name"
@ -110,28 +105,26 @@
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"/>
<RelativeLayout
android:layout_marginTop="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<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

@ -5,92 +5,103 @@
android:orientation="vertical">
<TextView
android:text="@string/assistant_linphone_account_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/colorD"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/setup_linphone_account_hint"
android:gravity="center_horizontal"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="20dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:gravity="center"
android:orientation="vertical">
android:gravity="center">
<TextView
android:textSize="16sp"
android:paddingTop="10dp"
android:textColor="@color/colorD"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/username"
style="@style/font13"
android:textAllCaps="true"
android:text="@string/setup_username_hint"/>
android:paddingTop="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/assistant_username"
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:textCursorDrawable="@null"
android:id="@+id/setup_username"
android:layout_width="match_parent"
android:layout_height="40dp"
android:inputType="textEmailAddress"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"
android:textColor="@android:color/black"
android:background="@drawable/resizable_textfield" />
<TextView
android:textSize="16sp"
android:paddingTop="10dp"
android:textColor="@color/colorD"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAllCaps="true"
android:text="@string/setup_password_hint"/>
<EditText
android:textCursorDrawable="@null"
android:id="@+id/setup_password"
android:layout_width="match_parent"
android:layout_height="40dp"
android:inputType="textPassword"
android:layout_marginTop="5dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"
android:textColor="@android:color/black"
android:background="@drawable/resizable_textfield" />
android:singleLine="true"/>
<TextView
android:text="@string/password"
style="@style/font13"
android:textAllCaps="true"
android:paddingTop="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/assistant_password"
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:textCursorDrawable="@null"
android:inputType="textPassword"
android:layout_width="match_parent"
android:layout_height="40dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"/>
<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:id="@+id/setup_apply_button"
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

@ -5,22 +5,21 @@
android:orientation="vertical">
<TextView
android:text="@string/assistant_welcome"
style="@style/font6"
android:textAllCaps="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
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_title_assistant"/>
android:layout_gravity="center"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
android:layout_margin="20dp"
android:layout_gravity="center"
android:orientation="vertical">
android:layout_gravity="center">
<RelativeLayout
android:layout_width="match_parent"
@ -29,14 +28,13 @@
<Button
android:id="@+id/setup_create_account"
android:layout_centerInParent="true"
android:text="@string/assistant_create_account"
android:background="@drawable/resizable_assistant_button"
style="@style/font8"
android:contentDescription="@string/setup_create_account"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@android:color/black"
android:textAllCaps="true"
android:contentDescription="@string/setup_create_account"
android:background="@drawable/resizable_assistant_button"
android:text="@string/setup_create_account"/>
android:layout_centerInParent="true"/>
</RelativeLayout>
@ -48,14 +46,13 @@
<Button
android:id="@+id/setup_login_linphone"
android:text="@string/assistant_login_linphone"
android:background="@drawable/resizable_assistant_button"
style="@style/font8"
android:contentDescription="@string/setup_login_linphone"
android:layout_centerInParent="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAllCaps="true"
android:textColor="@android:color/black"
android:contentDescription="@string/setup_login_linphone"
android:background="@drawable/resizable_assistant_button"
android:text="@string/setup_login_linphone"/>
android:layout_height="wrap_content"/>
</RelativeLayout>
@ -67,14 +64,13 @@
<Button
android:id="@+id/setup_login_generic"
android:text="@string/assistant_login_generic"
android:background="@drawable/resizable_assistant_button"
style="@style/font8"
android:contentDescription="@string/setup_login_generic"
android:layout_centerInParent="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@android:color/black"
android:textAllCaps="true"
android:contentDescription="@string/setup_login_generic"
android:background="@drawable/resizable_assistant_button"
android:text="@string/setup_login_generic"/>
android:layout_height="wrap_content"/>
</RelativeLayout>
@ -86,14 +82,13 @@
<Button
android:id="@+id/setup_remote_provisioning"
android:text="@string/assistant_remote_provisioning"
android:background="@drawable/resizable_assistant_button"
style="@style/font8"
android:contentDescription="@string/setup_remote_provisioning"
android:layout_centerInParent="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@android:color/black"
android:textAllCaps="true"
android:contentDescription="@string/setup_remote_provisioning"
android:background="@drawable/resizable_assistant_button"
android:text="@string/setup_remote_provisioning"/>
android:layout_height="wrap_content"/>
</RelativeLayout>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:background="@color/background"
android:background="@color/colorH"
android:layout_height="match_parent">
<LinearLayout

View file

@ -1,28 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toolbar"
android:background="@color/button_addContact"
android:background="@color/colorF"
android:layout_width="match_parent"
android:layout_height="60dp">
android:layout_height="70dp">
<RelativeLayout
android:id="@+id/setup_back"
android:id="@+id/assistant_back"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentLeft="true">
<ImageView
android:src="@drawable/back"
android:contentDescription="@string/content_description_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:layout_centerInParent="true"
android:contentDescription="@string/content_description_back"
android:src="@drawable/back" />
android:layout_centerInParent="true"/>
</RelativeLayout>
<TextView
android:id="@+id/toolbar_text"
android:text="@string/setup_title"
android:text="@string/assistant_title"
style="@style/font1"
android:layout_centerInParent="true"
android:layout_width="wrap_content"
@ -30,20 +30,18 @@
android:gravity="center_vertical"/>
<RelativeLayout
android:id="@+id/setup_cancel"
android:id="@+id/assistant_cancel"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true">
<ImageView
android:src="@drawable/dialer_back"
android:contentDescription="@string/content_description_dialer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:contentDescription="@string/content_description_dialer"
android:layout_centerInParent="true"
android:src="@drawable/dialer_back" />
android:layout_centerInParent="true"/>
</RelativeLayout>
</RelativeLayout>

View file

@ -1,15 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- NEW COLORS -->
<color name="background">#ffffff</color>
<color name="background_splashscreen">#000000</color>
<color name="button_addContact">#e1e1e1</color>
<color name="button_addContactGrey">#c4c4c4</color>
<color name="footer_button">#444444</color>
<color name="footer_select">#ff5e00</color>
<color name="call_selected">#96c11f</color>
<color name="colorA">#ff5e00</color>
<color name="colorB">#000000</color>
<color name="colorC">#444444</color>

View file

@ -19,14 +19,6 @@
<string name="notification_register_failure">Fails to register to %s</string>
<string name="about_text">Linphone %s SIP (rfc 3261) compatible phone under GNU Public License V2</string>
<string name="about_link">http://www.linphone.org\n\nInstructions\nhttp://www.linphone.org/user-guide.html\n\n© 2015 Belledonne Communications</string>
<string name="setup_welcome">This assistant will help you to use a SIP account for your calls.</string>
<string name="setup_create_account">Create an account on linphone.org</string>
<string name="setup_login_linphone">I already have a linphone.org account</string>
<string name="setup_login_generic">I already have a SIP account</string>
<string name="setup_linphone_account_hint">Enter your linphone.org username and password</string>
<string name="setup_general_account_hint">Enter your SIP account username, password and domain</string>
<string name="setup_username_hint">username</string>
<string name="button_sip_contacts">SIP</string>
<string name="tunnel_host"></string>

View file

@ -1,5 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- New settings -->
<bool name="setup_use_linphone_as_first_fragment">false</bool>
<!-- Tutorial settings -->
<bool name="show_tutorials_instead_of_app">false</bool> <!-- Be careful ! Setting this to true prevent the app from working ! It will only display tutorial activities -->
@ -23,7 +31,7 @@
<bool name="hide_wizard">false</bool>
<string name="setup_forced_proxy"></string>
<bool name="setup_cancel_move_to_back">false</bool>
<bool name="setup_use_linphone_as_first_fragment">false</bool>
<bool name="setup_account_validation_mandatory">false</bool>
<bool name="hide_linphone_accounts_wizard">false</bool>
<bool name="hide_generic_accounts_wizard">false</bool>

View file

@ -6,24 +6,53 @@
<!-- splashscreen -->
<string name="app_description">free SIP VOIP client</string>
<!-- Setup -->
<string name="setup_title_assistant">Welcome</string>
<string name="setup_title">Assistant</string>
<string name="setup_create_account_part_1">1/2</string>
<string name="setup_create_account_part_2">2/2</string>
<!-- 0. Assistant -->
<string name="assistant_welcome">Welcome</string>
<string name="assistant_title">Assistant</string>
<string name="assistant_create_account">Create a linphone account</string>
<string name="assistant_login_linphone">I have a linphone account</string>
<string name="assistant_login_generic">I have a sip account</string>
<string name="assistant_remote_provisioning">Remote provisioning</string>
<string name="assistant_create_account_title">Create an account</string>
<string name="assistant_create_account_part_1">1/2</string>
<string name="assistant_create_account_part_2">2/2</string>
<string name="assistant_linphone_account_title">Configure linphohe account</string>
<string name="assistant_general_account_title">Configure Sip account</string>
<string name="assistant_remote_provisioning_title">Remote provisioning</string>
<string name="assistant_create">Create account</string>
<string name="assistant_apply">Apply</string>
<string name="assistant_password_confirm">Apply</string>
<!-- 1. Dailer -->
<string-array name="menu_entry">
<item>Account</item>
<item>Settings</item>
<item>Wizard</item>
<item>About</item>
<item>Exit</item>
</string-array>
<!-- 2. History -->
<!-- Call -->
<string name="incoming_call">incoming call</string>
<string name="outgoing_call">outgoing call</string>
<!-- Common -->
<string name="username">Username</string>
<string name="display_name">Display name</string>
<string name="password">Password</string>
<string name="domain">Domain</string>
<string name="remote_provisioning_url">Provisioning url</string>
<string name="email">Email</string>
<!-- Content description -->
<string name="content_description_edit">Edit button</string>
<string name="content_description_valid">Valid button</string>
<string name="content_description_validate">Valid button</string>
<string name="content_description_add_contact">Add to contacts</string>
<string name="content_description_new_contact">New contact</string>
@ -109,9 +138,6 @@
<string name="state_paused">paused</string>
<string name="state_paused_by_remote">paused by remote</string>
<string name="state_streams_running"></string>
<string name="state_incoming_received">incoming</string>
<string name="state_outgoing_ringing">ringing</string>
<string name="state_outgoing_progress">calling</string>
<string name="mutemic_button_txt">Mute</string>
<string name="speaker_button_txt">Speaker</string>
<string name="bluetooth_button_txt">Bluetooth</string>
@ -300,7 +326,6 @@
<string name="status_error">Registration failed</string>
<string name="addressHint">Number or address</string>
<string name="conference">Conference</string>
<string name="incoming">Incoming call</string>
<string name="draft">Draft</string>
<string name="new_fast_chat">Enter a SIP address to chat with…</string>
<string name="no_call_history">No call in your history.</string>
@ -317,7 +342,6 @@
<string name="call_stats_video_resolution">Video size:</string>
<!--Used by Android to help blind people by describing them images-->
<string name="setup_apply">Apply</string>
<string name="setup_password_hint">password</string>
<string name="setup_domain_hint">domain</string>
<string name="setup_password_confirm_hint">confirm password</string>
@ -422,7 +446,6 @@
<string name="wait">Please wait...</string>
<string name="importing_messages">Updating messages database</string>
<string name="default_account_flag">Default account</string>
<string name="setup_remote_provisioning">Download provisioning</string>
<string name="setup_remote_provisioning_hint">This assistant will download an existing configuration.</string>
<string name="setup_remote_provisioning_url_hint">provisioning url</string>
<string name="setup_remote_provisioning_login_hint">The configuration you downloaded doesn\'t include your account. Please fill it in.</string>

View file

@ -27,6 +27,7 @@ import java.util.Collection;
import java.util.List;
import org.linphone.LinphoneManager.AddressType;
import org.linphone.assistant.AssistantActivity;
import org.linphone.compatibility.Compatibility;
import org.linphone.core.CallDirection;
import org.linphone.core.LinphoneAddress;
@ -45,8 +46,7 @@ import org.linphone.core.LinphoneCoreListenerBase;
import org.linphone.core.LinphoneProxyConfig;
import org.linphone.core.Reason;
import org.linphone.mediastream.Log;
import org.linphone.setup.RemoteProvisioningLoginActivity;
import org.linphone.setup.SetupActivity;
import org.linphone.assistant.RemoteProvisioningLoginActivity;
import org.linphone.ui.AddressText;
import android.annotation.SuppressLint;
@ -54,24 +54,17 @@ import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.app.SearchManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.database.ContentObserver;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Bundle;
import android.provider.ContactsContract;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.OrientationEventListener;
import android.view.Surface;
import android.view.View;
@ -81,17 +74,14 @@ import android.view.WindowManager;
import android.view.animation.AnimationUtils;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.BaseExpandableListAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import android.support.v4.widget.DrawerLayout;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.view.GravityCompat;
/**
* @author Sylvain Berfini
@ -122,7 +112,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
private LinphoneCoreListenerBase mListener;
private String[] mParams;
private String mTitle;
private RelativeLayout mDrawerList;
private RelativeLayout mDrawerList, exitLayout, headerLayout;
private DrawerLayout mDrawerLayout;
private ActionBarDrawerToggle mDrawerToggle;
ListView mDrawerListB;
@ -165,7 +155,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
if (LinphonePreferences.instance().getAccountCount() > 0) {
LinphonePreferences.instance().firstLaunchSuccessful();
} else {
startActivityForResult(new Intent().setClass(this, SetupActivity.class), FIRST_LOGIN_ACTIVITY);
startActivityForResult(new Intent().setClass(this, AssistantActivity.class), FIRST_LOGIN_ACTIVITY);
}
}
@ -239,12 +229,8 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
public void callState(LinphoneCore lc, LinphoneCall call, LinphoneCall.State state, String message) {
if (state == State.IncomingReceived) {
startActivity(new Intent(LinphoneActivity.instance(), IncomingCallActivity.class));
} else if (state == State.OutgoingInit) {
if (call.getCurrentParamsCopy().getVideoEnabled()) {
startVideoActivity(call);
} else {
startIncallActivity(call);
}
} else if (state == State.OutgoingInit || state == State.OutgoingProgress) {
startActivity(new Intent(LinphoneActivity.instance(), OutgoingCallActivity.class));
} else if (state == State.CallEnd || state == State.Error || state == State.CallReleased) {
// Convert LinphoneCore message for internalization
if (message != null && call.getReason() == Reason.Declined) {
@ -299,138 +285,63 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
mParams = getResources().getStringArray(R.array.menu_entry);
mDrawerList = (RelativeLayout) findViewById(R.id.left_drawer);
mDrawerListB = (ListView) findViewById(R.id.list_drawer);
List<DrawerItem> dataList = new ArrayList<DrawerItem>();
dataList.add(new DrawerItem("About"));
dataList.add(new DrawerItem("Settings"));
dataList.add(new DrawerItem("Help"));
CustomDrawerAdapter adapter;
adapter = new CustomDrawerAdapter(this, R.layout.custom_drawer_item,
dataList);
mDrawerListB.setAdapter(adapter);
// set a custom shadow that overlays the main content when the drawer opens
//mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START);
// set up the drawer's list view with items and click listener
// enable ActionBar app icon to behave as action to toggle nav drawer
//getActionBar().setDisplayHomeAsUpEnabled(true);
//getActionBar().setHomeButtonEnabled(true);
// ActionBarDrawerToggle ties together the the proper interactions
// between the sliding drawer and the action bar app icon
//mDrawerLayout.setDrawerListener(mDrawerToggle);
}
class DrawerItem {
String ItemName;
int imgResID;
String title;
boolean isAccount;
public DrawerItem(boolean isAccount) {
this(null, 0);
this.isAccount = isAccount;
}
public DrawerItem(String itemName, int imgResID) {
ItemName = itemName;
this.imgResID = imgResID;
}
public DrawerItem(String title) {
this(null, 0);
this.title = title;
}
public String getItemName() {
return ItemName;
}
public void setItemName(String itemName) {
ItemName = itemName;
}
public int getImgResID() {
return imgResID;
}
public void setImgResID(int imgResID) {
this.imgResID = imgResID;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public boolean isAccount() {
return isAccount;
}
}
public class CustomDrawerAdapter extends ArrayAdapter<DrawerItem> {
Context context;
List<DrawerItem> drawerItemList;
int layoutResID;
public CustomDrawerAdapter(Context context, int layoutResourceID,
List<DrawerItem> listItems) {
super(context, layoutResourceID, listItems);
this.context = context;
this.drawerItemList = listItems;
this.layoutResID = layoutResourceID;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
DrawerItemHolder drawerHolder;
View view = convertView;
if (view == null) {
LayoutInflater inflater = ((Activity) context).getLayoutInflater();
drawerHolder = new DrawerItemHolder();
view = inflater.inflate(layoutResID, parent, false);
drawerHolder.ItemName = (TextView) view.findViewById(R.id.drawer_itemName);
drawerHolder.icon = (ImageView) view.findViewById(R.id.drawer_icon);
//drawerHolder. = (ImageView) view
// .findViewById(R.id.s);
// drawerHolder.title = (TextView) view.findViewById(R.id.drawerTitle);
List<String> dataList = new ArrayList<String>();
mDrawerListB.setAdapter(new ArrayAdapter<String>(this,R.layout.drawer_list_item, mParams));
mDrawerListB.setOnItemClickListener(new DrawerItemClickListener());
ImageView menubar = (ImageView) findViewById(R.id.menu_bar);
menubar.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
mDrawerLayout.openDrawer(mDrawerList);
}
});
return view;
exitLayout = (RelativeLayout) findViewById(R.id.exitLayout);
exitLayout.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
exit();
}
});
headerLayout = (RelativeLayout) findViewById(R.id.headerLayout);
LinphoneProxyConfig proxy = LinphoneManager.getLc().getDefaultProxyConfig();
if(proxy != null){
try {
LinphoneAddress identity = LinphoneCoreFactory.instance().createLinphoneAddress(proxy.getIdentity());
TextView address = (TextView) findViewById(R.id.address);
address.setText(identity.asStringUriOnly());
TextView displayName = (TextView) findViewById(R.id.display_name);
if(identity.getDisplayName() != null)
displayName.setText(identity.getDisplayName());
else
displayName.setText(identity.getUserName());
} catch (Exception e) {
e.printStackTrace();
}
} else {
headerLayout.setVisibility(View.GONE);
}
headerLayout.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
displayAccountSettings(0);
mDrawerLayout.closeDrawer(mDrawerList);
}
});
private class DrawerItemHolder {
TextView ItemName, title;
ImageView icon;
LinearLayout itemLayout;
RelativeLayout headerLayout, exitLayout;
}
}
private class DrawerItemClickListener implements ListView.OnItemClickListener {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
selectItem(position);
}
}
private void selectItem(int position) {
// update the main content by replacing fragments
@ -458,16 +369,13 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
case 3:
displayAbout();
break;
case 4:
exit();
break;
default:
break;
}
mDrawerListB.setItemChecked(position, true);
//
mDrawerLayout.closeDrawer(mDrawerListB);
mDrawerLayout.closeDrawer(mDrawerList);
}
@Override
@ -841,7 +749,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
}
public void displayAssistant() {
startActivity(new Intent(LinphoneActivity.this, SetupActivity.class));
startActivity(new Intent(LinphoneActivity.this, AssistantActivity.class));
}
public boolean displayChatMessageNotification(String address){
@ -1346,15 +1254,16 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
LinphoneCall.State callState = call.getState();
if (callState == State.IncomingReceived) {
startActivity(new Intent(this, IncomingCallActivity.class));
} else if (callState == State.OutgoingInit) {
startActivity(new Intent(this, OutgoingCallActivity.class));
} else {
if (call.getCurrentParamsCopy().getVideoEnabled()) {
startVideoActivity(call);
} else {
startIncallActivity(call);
}
if (call.getCurrentParamsCopy().getVideoEnabled()) {
startVideoActivity(call);
} else {
startIncallActivity(call);
}
}
}
}
}
@ -1428,7 +1337,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
if (call.getCurrentParamsCopy().getVideoEnabled()) {
startVideoActivity(call);
} else {
startIncallActivity(call);
//startIncallActivity(call);
}
}
}

View file

@ -21,7 +21,7 @@ package org.linphone;
import static android.content.Intent.ACTION_MAIN;
import org.linphone.mediastream.Log;
import org.linphone.setup.RemoteProvisioningActivity;
import org.linphone.assistant.RemoteProvisioningActivity;
import org.linphone.tutorials.TutorialLauncherActivity;
import android.app.Activity;

View file

@ -49,8 +49,8 @@ import android.widget.Toast;
public class AssistantActivity extends Activity implements OnClickListener {
private static AssistantActivity instance;
private RelativeLayout back, cancel;
private SetupFragmentsEnum currentFragment;
private SetupFragmentsEnum firstFragment;
private AssistantFragmentsEnum currentFragment;
private AssistantFragmentsEnum firstFragment;
private Fragment fragment;
private LinphonePreferences mPrefs;
private boolean accountCreated = false;
@ -69,12 +69,12 @@ public class AssistantActivity extends Activity implements OnClickListener {
initUI();
firstFragment = getResources().getBoolean(R.bool.setup_use_linphone_as_first_fragment) ?
SetupFragmentsEnum.LINPHONE_LOGIN : SetupFragmentsEnum.MENU;
AssistantFragmentsEnum.LINPHONE_LOGIN : AssistantFragmentsEnum.MENU;
if (findViewById(R.id.fragmentContainer) != null) {
if (savedInstanceState == null) {
display(firstFragment);
} else {
currentFragment = (SetupFragmentsEnum) savedInstanceState.getSerializable("CurrentFragment");
currentFragment = (AssistantFragmentsEnum) savedInstanceState.getSerializable("CurrentFragment");
}
}
mPrefs = LinphonePreferences.instance();
@ -170,15 +170,15 @@ public class AssistantActivity extends Activity implements OnClickListener {
setResult(Activity.RESULT_CANCELED);
finish();
}
} else if (currentFragment == SetupFragmentsEnum.GENERIC_LOGIN
|| currentFragment == SetupFragmentsEnum.LINPHONE_LOGIN
|| currentFragment == SetupFragmentsEnum.CREATE_ACCOUNT
|| currentFragment == SetupFragmentsEnum.REMOTE_PROVISIONING) {
} else if (currentFragment == AssistantFragmentsEnum.GENERIC_LOGIN
|| currentFragment == AssistantFragmentsEnum.LINPHONE_LOGIN
|| currentFragment == AssistantFragmentsEnum.CREATE_ACCOUNT
|| currentFragment == AssistantFragmentsEnum.REMOTE_PROVISIONING) {
MenuFragment fragment = new MenuFragment();
changeFragment(fragment);
currentFragment = SetupFragmentsEnum.MENU;
currentFragment = AssistantFragmentsEnum.MENU;
back.setVisibility(View.GONE);
} else if (currentFragment == SetupFragmentsEnum.MENU) {
} else if (currentFragment == AssistantFragmentsEnum.MENU) {
finish();
}
}
@ -190,7 +190,7 @@ public class AssistantActivity extends Activity implements OnClickListener {
EchoCancellerCalibrationFragment fragment = new EchoCancellerCalibrationFragment();
fragment.enableEcCalibrationResultSending(sendEcCalibrationResult);
changeFragment(fragment);
currentFragment = SetupFragmentsEnum.ECHO_CANCELLER_CALIBRATION;
currentFragment = AssistantFragmentsEnum.ECHO_CANCELLER_CALIBRATION;
back.setVisibility(View.VISIBLE);
cancel.setEnabled(false);
} else {
@ -230,7 +230,7 @@ public class AssistantActivity extends Activity implements OnClickListener {
logIn(username, password, displayName, domain, false);
}
private void display(SetupFragmentsEnum fragment) {
private void display(AssistantFragmentsEnum fragment) {
switch (fragment) {
case MENU:
displayMenu();
@ -247,35 +247,35 @@ public class AssistantActivity extends Activity implements OnClickListener {
public void displayMenu() {
fragment = new MenuFragment();
changeFragment(fragment);
currentFragment = SetupFragmentsEnum.MENU;
currentFragment = AssistantFragmentsEnum.MENU;
back.setVisibility(View.GONE);
}
public void displayLoginGeneric() {
fragment = new GenericLoginFragment();
changeFragment(fragment);
currentFragment = SetupFragmentsEnum.GENERIC_LOGIN;
currentFragment = AssistantFragmentsEnum.GENERIC_LOGIN;
back.setVisibility(View.VISIBLE);
}
public void displayLoginLinphone() {
fragment = new LinphoneLoginFragment();
changeFragment(fragment);
currentFragment = SetupFragmentsEnum.LINPHONE_LOGIN;
currentFragment = AssistantFragmentsEnum.LINPHONE_LOGIN;
back.setVisibility(View.VISIBLE);
}
public void displayWizard() {
fragment = new CreateAccountFragment();
changeFragment(fragment);
currentFragment = SetupFragmentsEnum.CREATE_ACCOUNT;
currentFragment = AssistantFragmentsEnum.CREATE_ACCOUNT;
back.setVisibility(View.VISIBLE);
}
public void displayRemoteProvisioning() {
fragment = new RemoteProvisioningFragment();
changeFragment(fragment);
currentFragment = SetupFragmentsEnum.REMOTE_PROVISIONING;
currentFragment = AssistantFragmentsEnum.REMOTE_PROVISIONING;
back.setVisibility(View.VISIBLE);
}
@ -368,7 +368,7 @@ public class AssistantActivity extends Activity implements OnClickListener {
fragment.setArguments(extras);
changeFragment(fragment);
currentFragment = SetupFragmentsEnum.CREATE_ACCOUNT_CONFIRM;
currentFragment = AssistantFragmentsEnum.CREATE_ACCOUNT_CONFIRM;
back.setVisibility(View.GONE);
}

View file

@ -78,7 +78,7 @@ public class CreateAccountConfirmFragment extends Fragment {
Runnable runOk = new Runnable() {
public void run() {
SetupActivity.instance().isAccountVerified(username);
AssistantActivity.instance().isAccountVerified(username);
}
};

View file

@ -83,8 +83,8 @@ public class CreateAccountFragment extends Fragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
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);
username = (EditText) view.findViewById(R.id.assistant_username);
ImageView usernameOkIV = (ImageView) view.findViewById(R.id.assistant_username_ok);
addXMLRPCUsernameHandler(username, usernameOkIV);
inputFilterCharacters = new String(acceptedChars);
@ -106,20 +106,20 @@ public class CreateAccountFragment extends Fragment {
};
username.setFilters(new InputFilter[] { filter });
password = (EditText) view.findViewById(R.id.setup_password);
passwordConfirm = (EditText) view.findViewById(R.id.setup_password_confirm);
password = (EditText) view.findViewById(R.id.assistant_password);
passwordConfirm = (EditText) view.findViewById(R.id.assistant_password_confirm);
ImageView passwordOkIV = (ImageView) view.findViewById(R.id.setup_password_ok);
ImageView passwordOkIV = (ImageView) view.findViewById(R.id.assistant_password_ok);
addXMLRPCPasswordHandler(password, passwordOkIV);
ImageView passwordConfirmOkIV = (ImageView) view.findViewById(R.id.setup_confirm_password_ok);
ImageView passwordConfirmOkIV = (ImageView) view.findViewById(R.id.assistant_confirm_password_ok);
addXMLRPCConfirmPasswordHandler(password, passwordConfirm, passwordConfirmOkIV);
email = (EditText) view.findViewById(R.id.setup_email);
ImageView emailOkIV = (ImageView) view.findViewById(R.id.setup_email_ok);
email = (EditText) view.findViewById(R.id.assistant_email);
ImageView emailOkIV = (ImageView) view.findViewById(R.id.assistant_email_ok);
addXMLRPCEmailHandler(email, emailOkIV);
errorMessage = (TextView) view.findViewById(R.id.setup_error);
errorMessage = (TextView) view.findViewById(R.id.assistant_error);
createAccount = (Button) view.findViewById(R.id.assistant_create);
createAccount.setEnabled(false);
@ -239,7 +239,7 @@ public class CreateAccountFragment extends Fragment {
}
};
final Context context = SetupActivity.instance() == null ? LinphoneService.instance().getApplicationContext() : SetupActivity.instance();
final Context context = AssistantActivity.instance() == null ? LinphoneService.instance().getApplicationContext() : AssistantActivity.instance();
try {
XMLRPCClient client = new XMLRPCClient(new URL(context.getString(R.string.wizard_url)));
@ -253,8 +253,8 @@ public class CreateAccountFragment extends Fragment {
Runnable runOk = new Runnable() {
public void run() {
SetupActivity.instance().saveCreatedAccount(username, password, null, context.getString(R.string.default_domain));
SetupActivity.instance().displayWizardConfirm(username);
AssistantActivity.instance().saveCreatedAccount(username, password, null, context.getString(R.string.default_domain));
AssistantActivity.instance().displayWizardConfirm(username);
}
};

View file

@ -53,7 +53,7 @@ public class EchoCancellerCalibrationFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.setup_ec_calibration, container, false);
View view = inflater.inflate(R.layout.assistant_ec_calibration, container, false);
mListener = new LinphoneCoreListenerBase(){
@Override
@ -68,7 +68,7 @@ public class EchoCancellerCalibrationFragment extends Fragment {
if (mSendEcCalibrationResult) {
sendEcCalibrationResult(status, delay_ms);
} else {
SetupActivity.instance().isEchoCalibrationFinished();
AssistantActivity.instance().isEchoCalibrationFinished();
}
}
};
@ -92,7 +92,7 @@ public class EchoCancellerCalibrationFragment extends Fragment {
XMLRPCCallback listener = new XMLRPCCallback() {
Runnable runFinished = new Runnable() {
public void run() {
SetupActivity.instance().isEchoCalibrationFinished();
AssistantActivity.instance().isEchoCalibrationFinished();
}
};

View file

@ -32,18 +32,19 @@ import android.widget.Toast;
* @author Sylvain Berfini
*/
public class GenericLoginFragment extends Fragment implements OnClickListener {
private EditText login, password, domain;
private EditText login, password, displayName, domain;
private Button apply;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.setup_generic_login, container, false);
View view = inflater.inflate(R.layout.assistant_generic_login, container, false);
login = (EditText) view.findViewById(R.id.setup_username);
password = (EditText) view.findViewById(R.id.setup_password);
domain = (EditText) view.findViewById(R.id.setup_domain);
apply = (Button) view.findViewById(R.id.setup_apply);
login = (EditText) view.findViewById(R.id.assistant_username);
password = (EditText) view.findViewById(R.id.assistant_password);
displayName = (EditText) view.findViewById(R.id.assistant_display_name);
domain = (EditText) view.findViewById(R.id.assistant_domain);
apply = (Button) view.findViewById(R.id.assistant_apply);
apply.setOnClickListener(this);
return view;
@ -53,13 +54,13 @@ public class GenericLoginFragment extends Fragment implements OnClickListener {
public void onClick(View v) {
int id = v.getId();
if (id == R.id.setup_apply) {
if (id == R.id.assistant_apply) {
if (login.getText() == null || login.length() == 0 || password.getText() == null || password.length() == 0 || domain.getText() == null || domain.length() == 0) {
Toast.makeText(getActivity(), getString(R.string.first_launch_no_login_password), Toast.LENGTH_LONG).show();
return;
}
SetupActivity.instance().genericLogIn(login.getText().toString(), password.getText().toString(), domain.getText().toString());
AssistantActivity.instance().genericLogIn(login.getText().toString(), password.getText().toString(), displayName.getText().toString(), domain.getText().toString());
}
}
}

View file

@ -32,7 +32,7 @@ import android.widget.Toast;
* @author Sylvain Berfini
*/
public class LinphoneLoginFragment extends Fragment implements OnClickListener {
private EditText login, password;
private EditText login, password, displayName;
private Button apply;
@Override
@ -40,13 +40,14 @@ public class LinphoneLoginFragment extends Fragment implements OnClickListener {
Bundle savedInstanceState) {
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);
apply = (Button) view.findViewById(R.id.setup_apply);
login = (EditText) view.findViewById(R.id.assistant_username);
password = (EditText) view.findViewById(R.id.assistant_password);
displayName = (EditText) view.findViewById(R.id.assistant_display_name);
apply = (Button) view.findViewById(R.id.assistant_apply);
apply.setOnClickListener(this);
if (getResources().getBoolean(R.bool.setup_use_linphone_as_first_fragment)) {
view.findViewById(R.id.setup_apply_button).setVisibility(View.GONE);
view.findViewById(R.id.assistant_apply).setVisibility(View.GONE);
}
return view;
@ -58,14 +59,14 @@ public class LinphoneLoginFragment extends Fragment implements OnClickListener {
return;
}
SetupActivity.instance().linphoneLogIn(login.getText().toString(), password.getText().toString(), getResources().getBoolean(R.bool.setup_account_validation_mandatory));
AssistantActivity.instance().linphoneLogIn(login.getText().toString(), password.getText().toString(), displayName.getText().toString(), getResources().getBoolean(R.bool.setup_account_validation_mandatory));
}
@Override
public void onClick(View v) {
int id = v.getId();
if (id == R.id.setup_apply) {
if (id == R.id.assistant_apply) {
linphoneLogIn();
}
}

View file

@ -68,15 +68,14 @@ public class MenuFragment extends Fragment implements OnClickListener {
@Override
public void onClick(View v) {
int id = v.getId();
if (id == R.id.setup_login_generic) {
SetupActivity.instance().displayLoginGeneric();
AssistantActivity.instance().displayLoginGeneric();
} else if (id == R.id.setup_login_linphone) {
SetupActivity.instance().displayLoginLinphone();
AssistantActivity.instance().displayLoginLinphone();
} else if (id == R.id.setup_create_account) {
SetupActivity.instance().displayWizard();
AssistantActivity.instance().displayWizard();
} else if (id == R.id.setup_remote_provisioning) {
SetupActivity.instance().displayRemoteProvisioning();
AssistantActivity.instance().displayRemoteProvisioning();
}
}
}

View file

@ -22,10 +22,10 @@ public class RemoteProvisioningFragment extends Fragment implements OnClickListe
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.setup_remote_provisioning, container, false);
View view = inflater.inflate(R.layout.assistant_remote_provisioning, container, false);
remoteProvisioningUrl = (EditText) view.findViewById(R.id.setup_remote_provisioning_url);
apply = (Button) view.findViewById(R.id.setup_apply);
apply = (Button) view.findViewById(R.id.assistant_apply);
apply.setOnClickListener(this);
return view;
@ -35,7 +35,7 @@ public class RemoteProvisioningFragment extends Fragment implements OnClickListe
public void onClick(View v) {
int id = v.getId();
if (id == R.id.setup_apply) {
if (id == R.id.assistant_apply) {
String url = remoteProvisioningUrl.getText().toString();
LinphonePreferences.instance().setRemoteProvisioningUrl(url);

View file

@ -44,13 +44,13 @@ public class RemoteProvisioningLoginActivity extends Activity implements OnClick
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.setup_remote_provisioning_login);
setContentView(R.layout.assistant_remote_provisioning_login);
login = (EditText) findViewById(R.id.setup_username);
password = (EditText) findViewById(R.id.setup_password);
domain = (EditText) findViewById(R.id.setup_domain);
cancel = (RelativeLayout) findViewById(R.id.setup_cancel);
cancel = (RelativeLayout) findViewById(R.id.assistant_cancel);
cancel.setOnClickListener(this);
String defaultDomain = getIntent().getStringExtra("Domain");
@ -94,7 +94,7 @@ public class RemoteProvisioningLoginActivity extends Activity implements OnClick
public void onClick(View v) {
int id = v.getId();
if (id == R.id.setup_cancel) {
if (id == R.id.assistant_cancel) {
cancelWizard(false);
}
}

View file

@ -5,9 +5,9 @@ import junit.framework.Assert;
import org.linphone.LinphoneActivity;
import org.linphone.LinphoneManager;
import org.linphone.LinphonePreferences;
import org.linphone.assistant.AssistantActivity;
import org.linphone.core.LinphoneProxyConfig;
import org.linphone.mediastream.video.capture.hwconf.Hacks;
import org.linphone.setup.SetupActivity;
import android.test.suitebuilder.annotation.LargeTest;
import android.test.suitebuilder.annotation.MediumTest;
@ -26,7 +26,7 @@ public class AccountAssistant extends SampleTest {
@LargeTest
public void testAWizardDisplayedAfterInstall() {
solo.waitForActivity("SetupActivity", 3000);
solo.assertCurrentActivity("Expected Setup Activity", SetupActivity.class);
solo.assertCurrentActivity("Expected Setup Activity", AssistantActivity.class);
}
@SmallTest
@ -34,7 +34,7 @@ public class AccountAssistant extends SampleTest {
@LargeTest
public void testBLoginWithLinphoneAccount() {
solo.waitForActivity("SetupActivity", 3000);
solo.assertCurrentActivity("Expected Setup Activity", SetupActivity.class);
solo.assertCurrentActivity("Expected Setup Activity", AssistantActivity.class);
solo.clickOnView(solo.getView(org.linphone.R.id.setup_next));
solo.clickOnText(aContext.getString(org.linphone.R.string.setup_login_linphone));