clean
This commit is contained in:
parent
9eacccf504
commit
0fcad881bf
|
@ -65,8 +65,8 @@ import static app.fedilab.fedilabtube.asynctasks.RetrievePeertubeInformationAsyn
|
|||
public class AllPlaylistsActivity extends AppCompatActivity implements OnPlaylistActionInterface, OnRetrievePeertubeInterface {
|
||||
|
||||
|
||||
PlaylistAdapter playlistAdapter;
|
||||
private AsyncTask<Void, Void, Void> asyncTask;
|
||||
|
||||
private RelativeLayout mainLoader;
|
||||
private RelativeLayout textviewNoAction;
|
||||
private HashMap<Integer, String> privacyToSend;
|
||||
|
@ -74,7 +74,7 @@ public class AllPlaylistsActivity extends AppCompatActivity implements OnPlaylis
|
|||
private Spinner set_upload_privacy;
|
||||
private String idChannel;
|
||||
private List<Playlist> playlists;
|
||||
PlaylistAdapter playlistAdapter;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
|
|
@ -66,6 +66,7 @@ import app.fedilab.fedilabtube.interfaces.OnDownloadInterface;
|
|||
public class HttpsConnection {
|
||||
|
||||
|
||||
private static final String LINE_FEED = "\r\n";
|
||||
private HttpsURLConnection httpsURLConnection;
|
||||
private String since_id, max_id;
|
||||
private Context context;
|
||||
|
@ -108,7 +109,6 @@ public class HttpsConnection {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get calls
|
||||
*
|
||||
|
@ -193,7 +193,6 @@ public class HttpsConnection {
|
|||
return response;
|
||||
}
|
||||
|
||||
|
||||
public String get(String urlConnection) throws IOException, NoSuchAlgorithmException, KeyManagementException, HttpsConnectionException {
|
||||
|
||||
|
||||
|
@ -262,7 +261,7 @@ public class HttpsConnection {
|
|||
Iterator<Map.Entry<String, String>> it = paramaters.entrySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
Map.Entry<String, String> pair = it.next();
|
||||
postData = addFormField(postData,pair.getKey(), pair.getValue(), boundary);
|
||||
postData = addFormField(postData, pair.getKey(), pair.getValue(), boundary);
|
||||
it.remove();
|
||||
}
|
||||
postData.append("--").append(boundary).append("--");
|
||||
|
@ -303,15 +302,16 @@ public class HttpsConnection {
|
|||
httpsURLConnection.getInputStream().close();
|
||||
return response;
|
||||
}
|
||||
private static final String LINE_FEED = "\r\n";
|
||||
|
||||
/**
|
||||
* Adds a form field to the request
|
||||
*@param writer StringBuilder
|
||||
* @param name field name
|
||||
* @param value field value
|
||||
*
|
||||
* @param writer StringBuilder
|
||||
* @param name field name
|
||||
* @param value field value
|
||||
*/
|
||||
private StringBuilder addFormField(StringBuilder writer, String name, String value, String boundary) {
|
||||
if( writer != null) {
|
||||
if (writer != null) {
|
||||
writer.append("--").append(boundary).append(LINE_FEED);
|
||||
writer.append("Content-Disposition: form-data; name=\"").append(name).append("\"")
|
||||
.append(LINE_FEED);
|
||||
|
|
Loading…
Reference in New Issue