|
@@ -90,7 +90,6 @@ import android.widget.ImageButton;
|
|
|
import android.widget.ProgressBar;
|
|
|
import android.widget.TextView;
|
|
|
import android.widget.TextView.OnEditorActionListener;
|
|
|
-import android.widget.Toast;
|
|
|
|
|
|
import com.owncloud.android.MainApp;
|
|
|
import com.owncloud.android.R;
|
|
@@ -430,7 +429,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|
|
new Handler().postDelayed(new Runnable() {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
- Snackbar.make(mLoginWebView, R.string.fallback_weblogin_text, Snackbar.LENGTH_INDEFINITE)
|
|
|
+ DisplayUtils.createSnackbar(mLoginWebView, R.string.fallback_weblogin_text, Snackbar.LENGTH_INDEFINITE)
|
|
|
.setActionTextColor(getResources().getColor(R.color.primary_dark))
|
|
|
.setAction(R.string.fallback_weblogin_back, new View.OnClickListener() {
|
|
|
@Override
|
|
@@ -969,8 +968,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|
|
try {
|
|
|
populateLoginFields(dataString);
|
|
|
} catch (IllegalArgumentException e) {
|
|
|
- Snackbar.make(findViewById(R.id.scroll), "Illegal login data URL used",
|
|
|
- Snackbar.LENGTH_SHORT).show();
|
|
|
+ DisplayUtils.showSnackMessage(findViewById(R.id.scroll), R.string.auth_illegal_login_used);
|
|
|
Log_OC.e(TAG, "Illegal login data URL used, no Login pre-fill!", e);
|
|
|
}
|
|
|
}
|
|
@@ -981,9 +979,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|
|
if (!bindService(new Intent(this, OperationsService.class),
|
|
|
mOperationsServiceConnection,
|
|
|
Context.BIND_AUTO_CREATE)) {
|
|
|
- Snackbar.make(findViewById(R.id.scroll), R.string.error_cant_bind_to_operations_service,
|
|
|
- Snackbar.LENGTH_LONG)
|
|
|
- .show();
|
|
|
+ DisplayUtils.showSnackMessage(findViewById(R.id.scroll), R.string.error_cant_bind_to_operations_service);
|
|
|
finish();
|
|
|
}
|
|
|
|
|
@@ -1378,8 +1374,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|
|
|
|
|
} catch (AccountNotFoundException e) {
|
|
|
Log_OC.e(TAG, "Account " + mAccount + " was removed!", e);
|
|
|
- Snackbar.make(findViewById(R.id.scroll), R.string.auth_account_does_not_exist,
|
|
|
- Snackbar.LENGTH_SHORT).show();
|
|
|
+ DisplayUtils.showSnackMessage(findViewById(R.id.scroll), R.string.auth_account_does_not_exist);
|
|
|
finish();
|
|
|
}
|
|
|
}
|
|
@@ -1706,8 +1701,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|
|
|
|
|
} catch (AccountNotFoundException e) {
|
|
|
Log_OC.e(TAG, "Account " + mAccount + " was removed!", e);
|
|
|
- Snackbar.make(findViewById(R.id.scroll), R.string.auth_account_does_not_exist,
|
|
|
- Snackbar.LENGTH_SHORT).show();
|
|
|
+ DisplayUtils.showSnackMessage(findViewById(R.id.scroll), R.string.auth_account_does_not_exist);
|
|
|
finish();
|
|
|
}
|
|
|
}
|
|
@@ -1769,8 +1763,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|
|
mLoginWebView = findViewById(R.id.login_webview);
|
|
|
initWebViewLogin(mServerInfo.mBaseUrl);
|
|
|
|
|
|
- Snackbar.make(mLoginWebView, getString(R.string.auth_access_failed) + ": " + result.getLogMessage(),
|
|
|
- Snackbar.LENGTH_LONG).show();
|
|
|
+ DisplayUtils.showSnackMessage(this, mLoginWebView, R.string.auth_access_failed, result.getLogMessage());
|
|
|
} else {
|
|
|
updateAuthStatusIconAndText(result);
|
|
|
showAuthStatus();
|