Some cleaning

This commit is contained in:
Thomas 2020-05-07 16:16:54 +02:00
parent 47ecdd8e08
commit c968c8242b
38 changed files with 39 additions and 38 deletions

View File

@ -315,7 +315,7 @@ public class EditProfileActivity extends BaseActivity implements OnRetrieveAccou
getIntent.setType("image/*");
Intent pickIntent = new Intent(Intent.ACTION_PICK);
pickIntent.setDataAndType(android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI,"image/*");
pickIntent.setDataAndType(android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*");
Intent chooserIntent = Intent.createChooser(getIntent, getString(R.string.toot_select_image));
chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[]{pickIntent});

View File

@ -52,7 +52,7 @@ public class AccountAdmin implements Parcelable {
public AccountAdmin() {
}
protected AccountAdmin(Parcel in) {
private AccountAdmin(Parcel in) {
this.id = in.readString();
this.username = in.readString();
long tmpCreated_at = in.readLong();

View File

@ -45,6 +45,7 @@ public class AccountCreation {
this.password = password;
}
@SuppressWarnings("unused")
public String getPasswordConfirm() {
return passwordConfirm;
}

View File

@ -16,6 +16,7 @@ package app.fedilab.android.client.Entities;
import java.util.Date;
@SuppressWarnings("unused")
public class Announcement extends Status {
private Date startAt;
private Date endAt;

View File

@ -22,6 +22,7 @@ import android.os.Parcelable;
* Manages Media
*/
@SuppressWarnings("unused")
public class Attachment implements Parcelable {
public static final Creator<Attachment> CREATOR = new Creator<Attachment>() {

View File

@ -25,6 +25,7 @@ import android.os.Parcelable;
* All values are not implemented
*/
@SuppressWarnings("unused")
public class Card implements Parcelable {
public static final Creator<Card> CREATOR = new Creator<Card>() {

View File

@ -18,6 +18,7 @@ import java.util.List;
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
* see <http://www.gnu.org/licenses>. */
@SuppressWarnings("unused")
public class Charts {
private List<String> xLabels;

View File

@ -41,7 +41,6 @@ public class Emojis implements Parcelable {
private String url;
private boolean visible_in_picker;
private Drawable drawable;
private boolean drawableFound;
public Emojis() {
}
@ -106,11 +105,4 @@ public class Emojis implements Parcelable {
this.drawable = drawable;
}
public boolean isDrawableFound() {
return drawableFound;
}
public void setDrawableFound(boolean drawableFound) {
this.drawableFound = drawableFound;
}
}

View File

@ -23,6 +23,7 @@ import java.util.Date;
* Manage filters
*/
@SuppressWarnings("unused")
public class Filters {
private String id;

View File

@ -18,6 +18,7 @@ package app.fedilab.android.client.Entities;
* Created by Thomas on 29/09/2018.
* Manage how to videos
*/
@SuppressWarnings("unused")
public class HowToVideo {
private String id;

View File

@ -21,6 +21,7 @@ import java.util.HashMap;
* Describes instance
*/
@SuppressWarnings("unused")
public class Instance {
private String uri;

View File

@ -14,6 +14,7 @@
* see <http://www.gnu.org/licenses>. */
package app.fedilab.android.client.Entities;
@SuppressWarnings("unused")
public class InstanceNodeInfo {
private String name;

View File

@ -14,6 +14,7 @@ package app.fedilab.android.client.Entities;
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
* see <http://www.gnu.org/licenses>. */
@SuppressWarnings("unused")
public class InstanceReg {
private String domain;

View File

@ -21,6 +21,7 @@ import java.util.Date;
* Describes instance from instances.social
*/
@SuppressWarnings("unused")
public class InstanceSocial {
private String id;

View File

@ -14,6 +14,7 @@
* see <http://www.gnu.org/licenses>. */
package app.fedilab.android.client.Entities;
@SuppressWarnings("unused")
public class NodeInfo {
private String rel;
private String href;

View File

@ -43,8 +43,6 @@ public class Notification implements Parcelable {
private Date created_at;
private Account account;
private Status status;
private boolean notificationAnimated = false;
private boolean isEmojiFound = false;
protected Notification(Parcel in) {
id = in.readString();
@ -115,19 +113,5 @@ public class Notification implements Parcelable {
return otherNotifications != null && (otherNotifications == this || otherNotifications instanceof Notification && this.getId().equals(((Notification) otherNotifications).getId()));
}
public boolean isNotificationAnimated() {
return notificationAnimated;
}
public void setNotificationAnimated(boolean notificationAnimated) {
this.notificationAnimated = notificationAnimated;
}
public boolean isEmojiFound() {
return isEmojiFound;
}
public void setEmojiFound(boolean emojiFound) {
isEmojiFound = emojiFound;
}
}

View File

@ -18,6 +18,7 @@ import java.util.List;
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
* see <http://www.gnu.org/licenses>. */
@SuppressWarnings("unused")
public class NotificationCharts {
private List<String> xLabels;

View File

@ -25,6 +25,7 @@ import java.util.List;
* Created by Thomas on 29/09/2018.
* Manage how to videos
*/
@SuppressWarnings("unused")
public class Peertube {
private String id;

View File

@ -18,6 +18,7 @@ package app.fedilab.android.client.Entities;
* Created by Thomas on 23/01/2019.
* Manage Peertube comments
*/
@SuppressWarnings("unused")
public class PeertubeComment {
private String id;

View File

@ -21,6 +21,7 @@ import java.util.Date;
* Created by Thomas on 23/01/2019.
*/
@SuppressWarnings("unused")
public class PeertubeNotification {
private String id;

View File

@ -25,6 +25,7 @@ import java.util.List;
* Created by Thomas on 01/11/2019.
*/
@SuppressWarnings("unused")
public class PixelFedStory implements Parcelable {
public static final Parcelable.Creator<PixelFedStory> CREATOR = new Parcelable.Creator<PixelFedStory>() {
@ -49,7 +50,7 @@ public class PixelFedStory implements Parcelable {
public PixelFedStory() {
}
protected PixelFedStory(Parcel in) {
private PixelFedStory(Parcel in) {
this.id = in.readString();
this.photo = in.readString();
this.name = in.readString();

View File

@ -23,6 +23,7 @@ import java.util.Date;
* Created by Thomas on 01/11/2019.
*/
@SuppressWarnings("unused")
public class PixelFedStoryItem implements Parcelable {
public static final Parcelable.Creator<PixelFedStoryItem> CREATOR = new Parcelable.Creator<PixelFedStoryItem>() {
@ -50,7 +51,7 @@ public class PixelFedStoryItem implements Parcelable {
public PixelFedStoryItem() {
}
protected PixelFedStoryItem(Parcel in) {
private PixelFedStoryItem(Parcel in) {
this.id = in.readString();
this.type = in.readString();
this.length = in.readInt();

View File

@ -26,6 +26,7 @@ import java.util.HashMap;
* Manage List
*/
@SuppressWarnings("unused")
public class Playlist implements Parcelable {
public static final Parcelable.Creator<Playlist> CREATOR = new Parcelable.Creator<Playlist>() {
@ -56,7 +57,7 @@ public class Playlist implements Parcelable {
public Playlist() {
}
protected Playlist(Parcel in) {
private Playlist(Parcel in) {
this.id = in.readString();
this.uuid = in.readString();
this.displayName = in.readString();

View File

@ -23,6 +23,7 @@ import android.os.Parcelable;
* Manage Entity PleromaAdmin
*/
@SuppressWarnings("unused")
public class PleromaAdmin implements Parcelable {
public static final Creator<PleromaAdmin> CREATOR = new Creator<PleromaAdmin>() {
@ -45,7 +46,7 @@ public class PleromaAdmin implements Parcelable {
public PleromaAdmin() {
}
protected PleromaAdmin(Parcel in) {
private PleromaAdmin(Parcel in) {
this.nickname = in.readString();
this.email = in.readString();
this.password = in.readString();

View File

@ -22,6 +22,7 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@SuppressWarnings("unused")
public class Poll implements Parcelable {
public static final Creator<Poll> CREATOR = new Creator<Poll>() {

View File

@ -77,7 +77,7 @@ public class PollOptions implements Parcelable {
return titleSpan;
}
public void setTitleSpan(SpannableString titleSpan) {
void setTitleSpan(SpannableString titleSpan) {
this.titleSpan = titleSpan;
}
}

View File

@ -25,6 +25,7 @@ import java.util.List;
* Manages following instances
*/
@SuppressWarnings("unused")
public class RemoteInstance implements Parcelable {
public static final Creator<RemoteInstance> CREATOR = new Creator<RemoteInstance>() {

View File

@ -21,6 +21,7 @@ import android.os.Parcelable;
import java.util.Date;
import java.util.List;
@SuppressWarnings("unused")
public class Report implements Parcelable {
public static final Creator<Report> CREATOR = new Creator<Report>() {

View File

@ -18,6 +18,7 @@ import app.fedilab.android.asynctasks.RetrieveFeedsAsyncTask;
import app.fedilab.android.helper.FilterToots;
@SuppressWarnings("unused")
public class RetrieveFeedsParam {
private FilterToots filterToots;

View File

@ -26,6 +26,7 @@ import java.util.List;
* Manages scheduled toots
*/
@SuppressWarnings("unused")
public class Schedule implements Parcelable {
public static final Parcelable.Creator<Schedule> CREATOR = new Parcelable.Creator<Schedule>() {

View File

@ -11,6 +11,7 @@ import java.util.Date;
* Manage Stored status
*/
@SuppressWarnings("unused")
public class StoredStatus implements Parcelable {
public static final Creator<StoredStatus> CREATOR = new Creator<StoredStatus>() {

View File

@ -25,6 +25,7 @@ import java.util.List;
* Manage Tags
*/
@SuppressWarnings("unused")
public class Tag implements Parcelable {
public static final Creator<Tag> CREATOR = new Creator<Tag>() {

View File

@ -43,7 +43,7 @@ public class TrendsHistory implements Parcelable {
public TrendsHistory() {
}
protected TrendsHistory(Parcel in) {
private TrendsHistory(Parcel in) {
this.days = in.readLong();
this.uses = in.readInt();
this.accounts = in.readInt();

View File

@ -16,6 +16,7 @@ package app.fedilab.android.client.Entities;
import java.util.Date;
@SuppressWarnings("unused")
public class UserNote {
private String acct;

View File

@ -657,7 +657,7 @@ public class PeertubeAPI {
try {
String response = new HttpsConnection(context, this.instance).get(getAbsoluteUrl("/users/me"), 60, null, prefKeyOauthTokenT);
JSONObject accountObject = new JSONObject(response).getJSONObject("account");
account = parseAccountResponsePeertube( accountObject);
account = parseAccountResponsePeertube(accountObject);
if (social != null) {
account.setSocial(social.toUpperCase());
}

View File

@ -79,8 +79,6 @@ public class CustomEmojiAdapter extends BaseAdapter {
}
//if (!emoji.isDrawableFound()) {
emoji.setDrawableFound(true);
SharedPreferences sharedpreferences = parent.getContext().getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
boolean disableAnimatedEmoji = sharedpreferences.getBoolean(Helper.SET_DISABLE_ANIMATED_EMOJI, false);
Glide.with(parent.getContext())
@ -98,7 +96,6 @@ public class CustomEmojiAdapter extends BaseAdapter {
}
});
// }
return convertView;
}
}

View File

@ -478,7 +478,6 @@ public class MediaSliderFragment extends Fragment implements MediaPlayer.OnCompl
}
@Override
public void onCompletion(MediaPlayer mp) {
stopPlaying();

View File

@ -101,7 +101,8 @@ public class MastalabWebViewClient extends WebViewClient {
return new WebResourceResponse("text/plain", "utf-8", nothing);
}
} catch (URISyntaxException ignored) {}
} catch (URISyntaxException ignored) {
}
}
}
return super.shouldInterceptRequest(view, url);