Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f7d61e3 authored by Nishith  Khanna's avatar Nishith Khanna
Browse files

Add create account functionality

parent 6e1758ec
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -56,12 +56,29 @@
                    android:paddingRight="@dimen/location_text_margin_right"
                    android:gravity="center"
                    android:textSize="16sp"
                    android:layout_marginBottom="@dimen/summary_margin_bottom"
                    android:textAllCaps="true"
                    android:textColor="@color/white"
                    android:background="@color/accent"
                    android:maxLines="1"
                    android:ellipsize="end"
                    android:text="@string/e_account_manager_setup_configure"/>

                <Button
                    android:id="@+id/create_account"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingLeft="@dimen/content_margin_left"
                    android:paddingRight="@dimen/location_text_margin_right"
                    android:gravity="center"
                    android:textSize="16sp"
                    android:textAllCaps="true"
                    android:textColor="@color/white"
                    android:background="@color/accent"
                    android:maxLines="1"
                    android:ellipsize="end"
                    android:text="@string/create_account"/>

            </LinearLayout>
        </ScrollView>
    </FrameLayout>
+1 −0
Original line number Diff line number Diff line
@@ -106,6 +106,7 @@
    <string name="e_account_manager_setup_title">Sync your cloud account</string>
    <string name="e_account_manager_setup_summary">Log in with your e.email or murena.io ID to connect your personal account with this phone. This will enable to synchronize your emails, contacts, calendar events, pictures, videos, notes and tasks across this phone and your personal cloud.</string>
    <string name="e_account_manager_setup_configure">Log in</string>
    <string name="create_account">Create Account</string>

    <!-- Backup Restore -->
    <string name="intro_restore_title">Restore apps and data</string>
+15 −0
Original line number Diff line number Diff line
@@ -40,6 +40,21 @@ public class EAccountManagerActivity extends SubBaseActivity {
                launchAccountManagerSetup();
            }
        });
        findViewById(R.id.create_account).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(SetupWizardApp.ACTION_CREATE_E_ACCOUNT);
                startSubactivity(intent, SetupWizardApp.REQUEST_CODE_CREATE_E_ACCOUNT);
            }
        });
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if(resultCode == RESULT_OK) {
            onNavigateNext();
        }
    }

    @Override
+2 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ public class SetupWizardApp extends Application {
    public static final String ACTION_EMERGENCY_DIAL = "com.android.phone.EmergencyDialer.DIAL";
    public static final String ACTION_NEXT = "com.android.wizard.NEXT";
    public static final String ACTION_LOAD = "com.android.wizard.LOAD";
    public static final String ACTION_CREATE_E_ACCOUNT = "foundation.e.accountmanager.ui.setup.CreateAccountActivity";


    public static final String EXTRA_FIRST_RUN = "firstRun";
@@ -73,6 +74,7 @@ public class SetupWizardApp extends Application {
    public static final int REQUEST_CODE_SETUP_BIOMETRIC = 7;
    public static final int REQUEST_CODE_SETUP_LOCKSCREEN = 9;
    public static final int REQUEST_CODE_RESTORE = 10;
    public static final int REQUEST_CODE_CREATE_E_ACCOUNT = 1;

    public static final int RADIO_READY_TIMEOUT = 10 * 1000;