fix spacing

This commit is contained in:
tom79 2019-04-17 15:53:33 +02:00
parent 9cd9b890fb
commit 0d49cfaa4e
3 changed files with 5 additions and 2 deletions

View File

@ -26,6 +26,7 @@ import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -137,6 +138,7 @@ public class WebviewConnectActivity extends BaseActivity {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url){
super.shouldOverrideUrlLoading(view,url);
Log.v(Helper.TAG,"url!= " +url );
if( url.contains(Helper.REDIRECT_CONTENT_WEB)){
String val[] = url.split("code=");
if (val.length< 2){
@ -147,7 +149,7 @@ public class WebviewConnectActivity extends BaseActivity {
return false;
}
String code = val[1];
Log.v(Helper.TAG,"code!= " +code );
final String action = "/oauth/token";
final HashMap<String, String> parameters = new HashMap<>();
parameters.put(Helper.CLIENT_ID, clientId);

View File

@ -67,7 +67,7 @@ public class UpdateAccountInfoAsyncTask extends AsyncTask<Void, Void, Void> {
@Override
protected Void doInBackground(Void... params) {
Account account = null;
if( social == SOCIAL.MASTODON) {
if( social == SOCIAL.MASTODON || social == SOCIAL.PIXELFED) {
account = new API(this.contextReference.get(), instance, null).verifyCredentials();
account.setSocial(account.getSocial());
}else if( social == SOCIAL.PEERTUBE) {

View File

@ -376,6 +376,7 @@ public class API {
isPleromaAdmin(account.getAcct());
}
} catch (HttpsConnection.HttpsConnectionException e) {
e.printStackTrace();
if( e.getStatusCode() == 401 || e.getStatusCode() == 403){
SQLiteDatabase db = Sqlite.getInstance(context, Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
Account targetedAccount = new AccountDAO(context, db).getAccountByToken(prefKeyOauthTokenT);