Add custom options for rebranding
These are: use create account view at first start, hide assistant from side menu and hide options from side menu. (cherry picked from commit a9eafaa9f34e82151531cf0fd5d37ed88f52b8dc)
This commit is contained in:
parent
dc35dfeefe
commit
50373ebe53
3 changed files with 20 additions and 2 deletions
|
@ -27,7 +27,10 @@
|
|||
|
||||
<!-- Assistant -->
|
||||
<bool name="assistant_allow_username">true</bool> <!-- Allow to use an username instead of the phone number for account creation -->
|
||||
|
||||
<!-- Only on should be set to true at a time! If not the first one will be used -->
|
||||
<bool name="assistant_use_linphone_login_as_first_fragment">false</bool><!-- Start assistant in loginFragment view instead of menu -->
|
||||
<bool name="assistant_use_create_linphone_account_as_first_fragment">false</bool><!-- Start Linphone creation account in loginFragment view instead of menu -->
|
||||
|
||||
<bool name="replace_assistant_with_old_interface">false</bool>
|
||||
<bool name="hide_assistant">false</bool>
|
||||
|
@ -91,6 +94,10 @@
|
|||
<bool name="allow_only_one_sip_address">false</bool>
|
||||
<bool name="display_contact_organization">true</bool>
|
||||
|
||||
<!-- Side Menu -->
|
||||
<bool name="hide_assistant_from_side_menu">false</bool>
|
||||
<bool name="hide_settings_from_side_menu">false</bool>
|
||||
|
||||
<!-- Others Parameters-->
|
||||
<string name="about_bugreport_email">linphone-android@belledonne-communications.com</string>
|
||||
<bool name="enable_call_notification">true</bool>
|
||||
|
|
|
@ -1564,8 +1564,12 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
|
|||
public void initSideMenu() {
|
||||
sideMenu = findViewById(R.id.side_menu);
|
||||
sideMenuItems = new ArrayList<>();
|
||||
if (!getResources().getBoolean(R.bool.hide_assistant_from_side_menu)) {
|
||||
sideMenuItems.add(getResources().getString(R.string.menu_assistant));
|
||||
}
|
||||
if (!getResources().getBoolean(R.bool.hide_settings_from_side_menu)) {
|
||||
sideMenuItems.add(getResources().getString(R.string.menu_settings));
|
||||
}
|
||||
if (getResources().getBoolean(R.bool.enable_in_app_purchase)) {
|
||||
sideMenuItems.add(getResources().getString(R.string.inapp));
|
||||
}
|
||||
|
|
|
@ -124,6 +124,10 @@ public class AssistantActivity extends Activity implements OnClickListener, Acti
|
|||
displayCreateAccount();
|
||||
} else {
|
||||
firstFragment = getResources().getBoolean(R.bool.assistant_use_linphone_login_as_first_fragment) ? AssistantFragmentsEnum.LINPHONE_LOGIN : AssistantFragmentsEnum.WELCOME;
|
||||
if (firstFragment == AssistantFragmentsEnum.WELCOME) {
|
||||
firstFragment = getResources().getBoolean(R.bool.assistant_use_create_linphone_account_as_first_fragment) ? AssistantFragmentsEnum.CREATE_ACCOUNT : AssistantFragmentsEnum.WELCOME;
|
||||
}
|
||||
|
||||
if (findViewById(R.id.fragment_container) != null) {
|
||||
if (savedInstanceState == null) {
|
||||
display(firstFragment);
|
||||
|
@ -439,6 +443,9 @@ public class AssistantActivity extends Activity implements OnClickListener, Acti
|
|||
case LINPHONE_LOGIN:
|
||||
displayLoginLinphone(null, null);
|
||||
break;
|
||||
case CREATE_ACCOUNT:
|
||||
displayCreateAccount();
|
||||
break;
|
||||
default:
|
||||
throw new IllegalStateException("Can't handle " + fragment);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue