Clean
This commit is contained in:
parent
b0f1c68ec3
commit
a84122a45a
|
@ -639,7 +639,7 @@ public class LoginActivity extends BaseActivity {
|
|||
String token = resobj.get("access_token").toString();
|
||||
String refresh_token = null;
|
||||
if (resobj.has("refresh_token"))
|
||||
refresh_token = resobj.get("refresh_token").toString();
|
||||
refresh_token = resobj.getString("refresh_token");
|
||||
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = sharedpreferences.edit();
|
||||
editor.putString(Helper.PREF_KEY_OAUTH_TOKEN, token);
|
||||
|
|
|
@ -713,7 +713,7 @@ public class PeertubeAPI {
|
|||
}
|
||||
|
||||
/***
|
||||
* Verifiy credential of the authenticated user *synchronously*
|
||||
* Verifiy PeertubeInformation of the authenticated user *synchronously*
|
||||
* @return Account
|
||||
*/
|
||||
public PeertubeInformation getPeertubeInformation() throws HttpsConnection.HttpsConnectionException {
|
||||
|
@ -791,13 +791,7 @@ public class PeertubeAPI {
|
|||
peertubeInformation.setTranslations(_translations);
|
||||
}
|
||||
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} catch (KeyManagementException e) {
|
||||
e.printStackTrace();
|
||||
} catch (JSONException e) {
|
||||
} catch (NoSuchAlgorithmException | IOException | KeyManagementException | JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return peertubeInformation;
|
||||
|
@ -921,15 +915,7 @@ public class PeertubeAPI {
|
|||
refresh_token = resobj.get("refresh_token").toString();
|
||||
newValues.put("access_token", token);
|
||||
newValues.put("refresh_token", refresh_token);
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} catch (KeyManagementException e) {
|
||||
e.printStackTrace();
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
} catch (HttpsConnection.HttpsConnectionException e) {
|
||||
} catch (NoSuchAlgorithmException | IOException | KeyManagementException | JSONException | HttpsConnection.HttpsConnectionException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return newValues;
|
||||
|
|
Loading…
Reference in New Issue