View Issue Details

IDProjectCategoryView StatusLast Update
0000373MantisDroidDefectpublic2012-10-10 20:52
Reportere7andy Assigned Toe7andy  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Target Version1.0.2Fixed in Version1.0.2 
Summary0000373: LoginActivity - Do not clear inputs onResume
DescriptionInput fields are cleared when the user switches between MantisDroid and other apps.
Do not do that.
TagsNo tags attached.

Activities

e7andy

2012-10-10 10:58

administrator   ~0000049

@Override
    protected void onResume() {
        super.onResume();
        readValuesFromPreferences();

        if (successfulLoginHasBeenMade()) {
            continueToMainActivity();
        }
        enableLoginButton();
        if(isControlsEmpty()) {
            initControls();
        }

        Intent intent = getIntent();
        if (intent != null) {
            boolean autoLogin = intent.getBooleanExtra(MantisDroid.AUTOLOGIN, false);
            if (autoLogin) {
                loginButton.performClick();
            }
        }
    }
    
    private boolean isControlsEmpty() {
        String username = usernameEdit.getText().toString();
        String password = passwordEdit.getText().toString();
        String mantisUrl = mantisUrlEdit.getText().toString();
        String defaultMantisUrl = getResources().getString(R.string.default_mantis_url);
        if(username.isEmpty() && password.isEmpty() && (mantisUrl.isEmpty() || mantisUrl.contains(defaultMantisUrl))) {
            return true;
        }
        return false;
    }

Issue History

Date Modified Username Field Change
2012-10-10 09:30 e7andy New Issue
2012-10-10 09:30 e7andy Status new => assigned
2012-10-10 09:30 e7andy Assigned To => e7andy
2012-10-10 10:58 e7andy Note Added: 0000049
2012-10-10 20:52 e7andy Status assigned => closed
2012-10-10 20:52 e7andy Resolution open => fixed
2012-10-10 20:52 e7andy Fixed in Version => 1.0.2