PR cleanup #1164
109 changed files with 404 additions and 385 deletions
|
@ -172,8 +172,8 @@ public class FirstRunActivity extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class CheckInstallIdTask extends AsyncTask<Void, Void, Boolean> {
|
private static class CheckInstallIdTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
private Context context;
|
private final Context context;
|
||||||
private InstallIdHandler handler;
|
private final InstallIdHandler handler;
|
||||||
public CheckInstallIdTask(Context context, InstallIdHandler handler) {
|
public CheckInstallIdTask(Context context, InstallIdHandler handler) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
this.handler = handler;
|
this.handler = handler;
|
||||||
|
@ -236,7 +236,7 @@ public class FirstRunActivity extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class AuthenticateTask extends AsyncTask<Void, Void, Void> {
|
private static class AuthenticateTask extends AsyncTask<Void, Void, Void> {
|
||||||
private Context context;
|
private final Context context;
|
||||||
public AuthenticateTask(Context context) {
|
public AuthenticateTask(Context context) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
|
@ -260,7 +260,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
public static boolean startingFilePickerActivity = false;
|
public static boolean startingFilePickerActivity = false;
|
||||||
public static boolean startingShareActivity = false;
|
public static boolean startingShareActivity = false;
|
||||||
public static boolean startingPermissionRequest = false;
|
public static boolean startingPermissionRequest = false;
|
||||||
public static boolean startingSignInFlowActivity = false;
|
public static final boolean startingSignInFlowActivity = false;
|
||||||
|
|
||||||
private ActionMode actionMode;
|
private ActionMode actionMode;
|
||||||
private BillingClient billingClient;
|
private BillingClient billingClient;
|
||||||
|
@ -403,7 +403,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
private List<FetchClaimsListener> fetchClaimsListeners;
|
private List<FetchClaimsListener> fetchClaimsListeners;
|
||||||
private List<FetchChannelsListener> fetchChannelsListeners;
|
private List<FetchChannelsListener> fetchChannelsListeners;
|
||||||
@Getter
|
@Getter
|
||||||
private ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor();
|
private final ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor();
|
||||||
private boolean walletBalanceUpdateScheduled;
|
private boolean walletBalanceUpdateScheduled;
|
||||||
private boolean shouldOpenUserSelectedMenuItem;
|
private boolean shouldOpenUserSelectedMenuItem;
|
||||||
private boolean walletSyncScheduled;
|
private boolean walletSyncScheduled;
|
||||||
|
@ -1012,7 +1012,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
openFragment(RewardsFragment.class, true, NavMenuItem.ID_ITEM_REWARDS);
|
openFragment(RewardsFragment.class, true, NavMenuItem.ID_ITEM_REWARDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
private FragmentManager.OnBackStackChangedListener backStackChangedListener = new FragmentManager.OnBackStackChangedListener() {
|
private final FragmentManager.OnBackStackChangedListener backStackChangedListener = new FragmentManager.OnBackStackChangedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onBackStackChanged() {
|
public void onBackStackChanged() {
|
||||||
FragmentManager manager = getSupportFragmentManager();
|
FragmentManager manager = getSupportFragmentManager();
|
||||||
|
@ -3246,8 +3246,8 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class CheckSdkReadyTask extends AsyncTask<Void, Void, Boolean> {
|
private static class CheckSdkReadyTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
private Context context;
|
private final Context context;
|
||||||
private List<SdkStatusListener> listeners;
|
private final List<SdkStatusListener> listeners;
|
||||||
|
|
||||||
public CheckSdkReadyTask(Context context, List<SdkStatusListener> listeners) {
|
public CheckSdkReadyTask(Context context, List<SdkStatusListener> listeners) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class VerificationActivity extends FragmentActivity implements SignInList
|
||||||
private boolean signedIn;
|
private boolean signedIn;
|
||||||
private int flow;
|
private int flow;
|
||||||
|
|
||||||
private PurchasesUpdatedListener purchasesUpdatedListener = new PurchasesUpdatedListener() {
|
private final PurchasesUpdatedListener purchasesUpdatedListener = new PurchasesUpdatedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onPurchasesUpdated(@NonNull BillingResult billingResult, @Nullable List<Purchase> purchases) {
|
public void onPurchasesUpdated(@NonNull BillingResult billingResult, @Nullable List<Purchase> purchases) {
|
||||||
int responseCode = billingResult.getResponseCode();
|
int responseCode = billingResult.getResponseCode();
|
||||||
|
|
|
@ -23,7 +23,7 @@ import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
public class ChannelFilterListAdapter extends RecyclerView.Adapter<ChannelFilterListAdapter.ViewHolder> {
|
public class ChannelFilterListAdapter extends RecyclerView.Adapter<ChannelFilterListAdapter.ViewHolder> {
|
||||||
private Context context;
|
private final Context context;
|
||||||
private List<Claim> items;
|
private List<Claim> items;
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
|
@ -42,12 +42,12 @@ public class ChannelFilterListAdapter extends RecyclerView.Adapter<ChannelFilter
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
protected View mediaContainer;
|
protected final View mediaContainer;
|
||||||
protected View alphaContainer;
|
protected final View alphaContainer;
|
||||||
protected View allView;
|
protected final View allView;
|
||||||
protected ImageView thumbnailView;
|
protected final ImageView thumbnailView;
|
||||||
protected TextView alphaView;
|
protected final TextView alphaView;
|
||||||
protected TextView titleView;
|
protected final TextView titleView;
|
||||||
public ViewHolder(View v) {
|
public ViewHolder(View v) {
|
||||||
super(v);
|
super(v);
|
||||||
mediaContainer = v.findViewById(R.id.channel_filter_media_container);
|
mediaContainer = v.findViewById(R.id.channel_filter_media_container);
|
||||||
|
|
|
@ -37,18 +37,18 @@ public class ClaimListAdapter extends RecyclerView.Adapter<ClaimListAdapter.View
|
||||||
private static final int VIEW_TYPE_CHANNEL = 2;
|
private static final int VIEW_TYPE_CHANNEL = 2;
|
||||||
private static final int VIEW_TYPE_FEATURED = 3; // featured search result
|
private static final int VIEW_TYPE_FEATURED = 3; // featured search result
|
||||||
|
|
||||||
private Map<String, Claim> quickClaimIdMap;
|
private final Map<String, Claim> quickClaimIdMap;
|
||||||
private Map<String, Claim> quickClaimUrlMap;
|
private final Map<String, Claim> quickClaimUrlMap;
|
||||||
private Map<String, Boolean> notFoundClaimIdMap;
|
private final Map<String, Boolean> notFoundClaimIdMap;
|
||||||
private Map<String, Boolean> notFoundClaimUrlMap;
|
private final Map<String, Boolean> notFoundClaimUrlMap;
|
||||||
|
|
||||||
@Setter
|
@Setter
|
||||||
private boolean hideFee;
|
private boolean hideFee;
|
||||||
@Setter
|
@Setter
|
||||||
private boolean canEnterSelectionMode;
|
private boolean canEnterSelectionMode;
|
||||||
private Context context;
|
private final Context context;
|
||||||
private List<Claim> items;
|
private List<Claim> items;
|
||||||
private List<Claim> selectedItems;
|
private final List<Claim> selectedItems;
|
||||||
@Setter
|
@Setter
|
||||||
private ClaimListItemListener listener;
|
private ClaimListItemListener listener;
|
||||||
@Getter
|
@Getter
|
||||||
|
@ -176,27 +176,27 @@ public class ClaimListAdapter extends RecyclerView.Adapter<ClaimListAdapter.View
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
protected View feeContainer;
|
protected final View feeContainer;
|
||||||
protected TextView feeView;
|
protected final TextView feeView;
|
||||||
protected ImageView thumbnailView;
|
protected final ImageView thumbnailView;
|
||||||
protected View noThumbnailView;
|
protected final View noThumbnailView;
|
||||||
protected TextView alphaView;
|
protected final TextView alphaView;
|
||||||
protected TextView vanityUrlView;
|
protected final TextView vanityUrlView;
|
||||||
protected TextView durationView;
|
protected final TextView durationView;
|
||||||
protected TextView titleView;
|
protected final TextView titleView;
|
||||||
protected TextView publisherView;
|
protected final TextView publisherView;
|
||||||
protected TextView publishTimeView;
|
protected final TextView publishTimeView;
|
||||||
protected TextView pendingTextView;
|
protected final TextView pendingTextView;
|
||||||
protected View repostInfoView;
|
protected final View repostInfoView;
|
||||||
protected TextView repostChannelView;
|
protected final TextView repostChannelView;
|
||||||
protected View selectedOverlayView;
|
protected final View selectedOverlayView;
|
||||||
protected TextView fileSizeView;
|
protected final TextView fileSizeView;
|
||||||
protected ProgressBar downloadProgressView;
|
protected final ProgressBar downloadProgressView;
|
||||||
protected TextView deviceView;
|
protected final TextView deviceView;
|
||||||
|
|
||||||
protected View loadingImagePlaceholder;
|
protected final View loadingImagePlaceholder;
|
||||||
protected View loadingTextPlaceholder1;
|
protected final View loadingTextPlaceholder1;
|
||||||
protected View loadingTextPlaceholder2;
|
protected final View loadingTextPlaceholder2;
|
||||||
public ViewHolder(View v) {
|
public ViewHolder(View v) {
|
||||||
super(v);
|
super(v);
|
||||||
feeContainer = v.findViewById(R.id.claim_fee_container);
|
feeContainer = v.findViewById(R.id.claim_fee_container);
|
||||||
|
|
|
@ -27,9 +27,9 @@ import io.lbry.browser.utils.LbryUri;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
public class CommentListAdapter extends RecyclerView.Adapter<CommentListAdapter.ViewHolder> {
|
public class CommentListAdapter extends RecyclerView.Adapter<CommentListAdapter.ViewHolder> {
|
||||||
private List<Comment> items;
|
private final List<Comment> items;
|
||||||
private Context context;
|
private final Context context;
|
||||||
private boolean nested;
|
private final boolean nested;
|
||||||
private float scale;
|
private float scale;
|
||||||
@Setter
|
@Setter
|
||||||
private ClaimListAdapter.ClaimListItemListener listener;
|
private ClaimListAdapter.ClaimListItemListener listener;
|
||||||
|
@ -102,14 +102,14 @@ public class CommentListAdapter extends RecyclerView.Adapter<CommentListAdapter.
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
protected TextView channelName;
|
protected final TextView channelName;
|
||||||
protected TextView commentText;
|
protected final TextView commentText;
|
||||||
protected ImageView thumbnailView;
|
protected final ImageView thumbnailView;
|
||||||
protected View noThumbnailView;
|
protected final View noThumbnailView;
|
||||||
protected TextView alphaView;
|
protected final TextView alphaView;
|
||||||
protected TextView commentTimeView;
|
protected final TextView commentTimeView;
|
||||||
protected View replyLink;
|
protected final View replyLink;
|
||||||
protected RecyclerView repliesList;
|
protected final RecyclerView repliesList;
|
||||||
|
|
||||||
public ViewHolder (View v) {
|
public ViewHolder (View v) {
|
||||||
super(v);
|
super(v);
|
||||||
|
|
|
@ -23,8 +23,8 @@ public class EditorsChoiceItemAdapter extends RecyclerView.Adapter<EditorsChoice
|
||||||
private static final int VIEW_TYPE_HEADER = 1;
|
private static final int VIEW_TYPE_HEADER = 1;
|
||||||
private static final int VIEW_TYPE_CONTENT = 2;
|
private static final int VIEW_TYPE_CONTENT = 2;
|
||||||
|
|
||||||
private Context context;
|
private final Context context;
|
||||||
private List<EditorsChoiceItem> items;
|
private final List<EditorsChoiceItem> items;
|
||||||
@Setter
|
@Setter
|
||||||
private EditorsChoiceItemListener listener;
|
private EditorsChoiceItemListener listener;
|
||||||
|
|
||||||
|
@ -48,11 +48,11 @@ public class EditorsChoiceItemAdapter extends RecyclerView.Adapter<EditorsChoice
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
protected ImageView thumbnailView;
|
protected final ImageView thumbnailView;
|
||||||
protected TextView descriptionView;
|
protected final TextView descriptionView;
|
||||||
protected TextView headerView;
|
protected final TextView headerView;
|
||||||
protected TextView titleView;
|
protected final TextView titleView;
|
||||||
protected View cardView;
|
protected final View cardView;
|
||||||
|
|
||||||
public ViewHolder(View v) {
|
public ViewHolder(View v) {
|
||||||
super(v);
|
super(v);
|
||||||
|
|
|
@ -21,8 +21,8 @@ import io.lbry.browser.utils.Helper;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
public class GalleryGridAdapter extends RecyclerView.Adapter<GalleryGridAdapter.ViewHolder> {
|
public class GalleryGridAdapter extends RecyclerView.Adapter<GalleryGridAdapter.ViewHolder> {
|
||||||
private Context context;
|
private final Context context;
|
||||||
private List<GalleryItem> items;
|
private final List<GalleryItem> items;
|
||||||
@Setter
|
@Setter
|
||||||
private GalleryItemClickListener listener;
|
private GalleryItemClickListener listener;
|
||||||
|
|
||||||
|
@ -32,8 +32,8 @@ public class GalleryGridAdapter extends RecyclerView.Adapter<GalleryGridAdapter.
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
protected ImageView thumbnailView;
|
protected final ImageView thumbnailView;
|
||||||
protected TextView durationView;
|
protected final TextView durationView;
|
||||||
public ViewHolder(View v) {
|
public ViewHolder(View v) {
|
||||||
super(v);
|
super(v);
|
||||||
thumbnailView = v.findViewById(R.id.gallery_item_thumbnail);
|
thumbnailView = v.findViewById(R.id.gallery_item_thumbnail);
|
||||||
|
@ -96,8 +96,8 @@ public class GalleryGridAdapter extends RecyclerView.Adapter<GalleryGridAdapter.
|
||||||
|
|
||||||
public static class GalleryGridItemDecoration extends RecyclerView.ItemDecoration {
|
public static class GalleryGridItemDecoration extends RecyclerView.ItemDecoration {
|
||||||
|
|
||||||
private int spanCount;
|
private final int spanCount;
|
||||||
private int spacing;
|
private final int spacing;
|
||||||
|
|
||||||
public GalleryGridItemDecoration(int spanCount, int spacing) {
|
public GalleryGridItemDecoration(int spanCount, int spacing) {
|
||||||
this.spanCount = spanCount;
|
this.spanCount = spanCount;
|
||||||
|
|
|
@ -18,9 +18,9 @@ import io.lbry.browser.model.Claim;
|
||||||
|
|
||||||
public class InlineChannelSpinnerAdapter extends ArrayAdapter<Claim> {
|
public class InlineChannelSpinnerAdapter extends ArrayAdapter<Claim> {
|
||||||
|
|
||||||
private List<Claim> channels;
|
private final List<Claim> channels;
|
||||||
private int layoutResourceId;
|
private final int layoutResourceId;
|
||||||
private LayoutInflater inflater;
|
private final LayoutInflater inflater;
|
||||||
|
|
||||||
public InlineChannelSpinnerAdapter(Context context, int resource, List<Claim> channels) {
|
public InlineChannelSpinnerAdapter(Context context, int resource, List<Claim> channels) {
|
||||||
super(context, resource, 0, channels);
|
super(context, resource, 0, channels);
|
||||||
|
|
|
@ -24,8 +24,8 @@ import lombok.Setter;
|
||||||
|
|
||||||
public class InviteeListAdapter extends RecyclerView.Adapter<InviteeListAdapter.ViewHolder> {
|
public class InviteeListAdapter extends RecyclerView.Adapter<InviteeListAdapter.ViewHolder> {
|
||||||
|
|
||||||
private Context context;
|
private final Context context;
|
||||||
private List<Invitee> items;
|
private final List<Invitee> items;
|
||||||
|
|
||||||
public InviteeListAdapter(List<Invitee> invitees, Context context) {
|
public InviteeListAdapter(List<Invitee> invitees, Context context) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
|
@ -80,8 +80,8 @@ public class InviteeListAdapter extends RecyclerView.Adapter<InviteeListAdapter.
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
protected TextView emailView;
|
protected final TextView emailView;
|
||||||
protected TextView rewardView;
|
protected final TextView rewardView;
|
||||||
|
|
||||||
public ViewHolder(View v) {
|
public ViewHolder(View v) {
|
||||||
super(v);
|
super(v);
|
||||||
|
|
|
@ -15,8 +15,8 @@ import io.lbry.browser.model.Language;
|
||||||
import io.lbry.browser.utils.Predefined;
|
import io.lbry.browser.utils.Predefined;
|
||||||
|
|
||||||
public class LanguageSpinnerAdapter extends ArrayAdapter<Language> {
|
public class LanguageSpinnerAdapter extends ArrayAdapter<Language> {
|
||||||
private int layoutResourceId;
|
private final int layoutResourceId;
|
||||||
private LayoutInflater inflater;
|
private final LayoutInflater inflater;
|
||||||
|
|
||||||
public LanguageSpinnerAdapter(Context context, int resource) {
|
public LanguageSpinnerAdapter(Context context, int resource) {
|
||||||
super(context, resource, 0, Predefined.PUBLISH_LANGUAGES);
|
super(context, resource, 0, Predefined.PUBLISH_LANGUAGES);
|
||||||
|
|
|
@ -15,8 +15,8 @@ import io.lbry.browser.model.License;
|
||||||
import io.lbry.browser.utils.Predefined;
|
import io.lbry.browser.utils.Predefined;
|
||||||
|
|
||||||
public class LicenseSpinnerAdapter extends ArrayAdapter<License> {
|
public class LicenseSpinnerAdapter extends ArrayAdapter<License> {
|
||||||
private int layoutResourceId;
|
private final int layoutResourceId;
|
||||||
private LayoutInflater inflater;
|
private final LayoutInflater inflater;
|
||||||
|
|
||||||
public LicenseSpinnerAdapter(Context context, int resource) {
|
public LicenseSpinnerAdapter(Context context, int resource) {
|
||||||
super(context, resource, 0, Predefined.LICENSES);
|
super(context, resource, 0, Predefined.LICENSES);
|
||||||
|
|
|
@ -24,8 +24,8 @@ public class NavigationMenuAdapter extends RecyclerView.Adapter<NavigationMenuAd
|
||||||
private static final int TYPE_GROUP = 1;
|
private static final int TYPE_GROUP = 1;
|
||||||
private static final int TYPE_ITEM = 2;
|
private static final int TYPE_ITEM = 2;
|
||||||
|
|
||||||
private Context context;
|
private final Context context;
|
||||||
private List<NavMenuItem> menuItems;
|
private final List<NavMenuItem> menuItems;
|
||||||
private NavMenuItem currentItem;
|
private NavMenuItem currentItem;
|
||||||
@Setter
|
@Setter
|
||||||
private NavigationMenuItemClickListener listener;
|
private NavigationMenuItemClickListener listener;
|
||||||
|
@ -65,8 +65,8 @@ public class NavigationMenuAdapter extends RecyclerView.Adapter<NavigationMenuAd
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
protected SolidIconView iconView;
|
protected final SolidIconView iconView;
|
||||||
protected TextView titleView;
|
protected final TextView titleView;
|
||||||
public ViewHolder(View v) {
|
public ViewHolder(View v) {
|
||||||
super(v);
|
super(v);
|
||||||
titleView = v.findViewById(R.id.nav_menu_title);
|
titleView = v.findViewById(R.id.nav_menu_title);
|
||||||
|
|
|
@ -43,9 +43,9 @@ public class NotificationListAdapter extends RecyclerView.Adapter<NotificationLi
|
||||||
private static final String RULE_CREATOR_SUBSCRIBER = "creator_subscriber";
|
private static final String RULE_CREATOR_SUBSCRIBER = "creator_subscriber";
|
||||||
private static final String RULE_COMMENT = "comment";
|
private static final String RULE_COMMENT = "comment";
|
||||||
|
|
||||||
private Context context;
|
private final Context context;
|
||||||
private List<LbryNotification> items;
|
private final List<LbryNotification> items;
|
||||||
private List<LbryNotification> selectedItems;
|
private final List<LbryNotification> selectedItems;
|
||||||
@Setter
|
@Setter
|
||||||
private NotificationClickListener clickListener;
|
private NotificationClickListener clickListener;
|
||||||
@Getter
|
@Getter
|
||||||
|
@ -62,13 +62,13 @@ public class NotificationListAdapter extends RecyclerView.Adapter<NotificationLi
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
protected View layoutView;
|
protected final View layoutView;
|
||||||
protected TextView titleView;
|
protected final TextView titleView;
|
||||||
protected TextView bodyView;
|
protected final TextView bodyView;
|
||||||
protected TextView timeView;
|
protected final TextView timeView;
|
||||||
protected SolidIconView iconView;
|
protected final SolidIconView iconView;
|
||||||
protected ImageView thumbnailView;
|
protected final ImageView thumbnailView;
|
||||||
protected View selectedOverlayView;
|
protected final View selectedOverlayView;
|
||||||
public ViewHolder(View v) {
|
public ViewHolder(View v) {
|
||||||
super(v);
|
super(v);
|
||||||
layoutView = v.findViewById(R.id.notification_layout);
|
layoutView = v.findViewById(R.id.notification_layout);
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class RewardListAdapter extends RecyclerView.Adapter<RewardListAdapter.Vi
|
||||||
public static final int DISPLAY_MODE_ALL = 1;
|
public static final int DISPLAY_MODE_ALL = 1;
|
||||||
public static final int DISPLAY_MODE_UNCLAIMED = 2;
|
public static final int DISPLAY_MODE_UNCLAIMED = 2;
|
||||||
|
|
||||||
private Context context;
|
private final Context context;
|
||||||
@Setter
|
@Setter
|
||||||
private List<Reward> all;
|
private List<Reward> all;
|
||||||
private List<Reward> items;
|
private List<Reward> items;
|
||||||
|
@ -85,16 +85,16 @@ public class RewardListAdapter extends RecyclerView.Adapter<RewardListAdapter.Vi
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
protected View iconClaimed;
|
protected final View iconClaimed;
|
||||||
protected View loading;
|
protected final View loading;
|
||||||
protected View upTo;
|
protected final View upTo;
|
||||||
protected TextView textTitle;
|
protected final TextView textTitle;
|
||||||
protected TextView textDescription;
|
protected final TextView textDescription;
|
||||||
protected TextView textLbcValue;
|
protected final TextView textLbcValue;
|
||||||
protected TextView textUsdValue;
|
protected final TextView textUsdValue;
|
||||||
protected TextView textLinkTransaction;
|
protected final TextView textLinkTransaction;
|
||||||
protected EditText inputCustomCode;
|
protected final EditText inputCustomCode;
|
||||||
protected MaterialButton buttonClaimCustom;
|
protected final MaterialButton buttonClaimCustom;
|
||||||
public ViewHolder(View v) {
|
public ViewHolder(View v) {
|
||||||
super(v);
|
super(v);
|
||||||
iconClaimed = v.findViewById(R.id.reward_item_claimed_icon);
|
iconClaimed = v.findViewById(R.id.reward_item_claimed_icon);
|
||||||
|
|
|
@ -22,9 +22,9 @@ import io.lbry.browser.utils.Helper;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
public class SuggestedChannelGridAdapter extends RecyclerView.Adapter<SuggestedChannelGridAdapter.ViewHolder> {
|
public class SuggestedChannelGridAdapter extends RecyclerView.Adapter<SuggestedChannelGridAdapter.ViewHolder> {
|
||||||
private Context context;
|
private final Context context;
|
||||||
private List<Claim> items;
|
private final List<Claim> items;
|
||||||
private List<Claim> selectedItems;
|
private final List<Claim> selectedItems;
|
||||||
@Setter
|
@Setter
|
||||||
private ChannelItemSelectionListener listener;
|
private ChannelItemSelectionListener listener;
|
||||||
|
|
||||||
|
@ -35,11 +35,11 @@ public class SuggestedChannelGridAdapter extends RecyclerView.Adapter<SuggestedC
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
protected View noThumbnailView;
|
protected final View noThumbnailView;
|
||||||
protected ImageView thumbnailView;
|
protected final ImageView thumbnailView;
|
||||||
protected TextView alphaView;
|
protected final TextView alphaView;
|
||||||
protected TextView titleView;
|
protected final TextView titleView;
|
||||||
protected TextView tagView;
|
protected final TextView tagView;
|
||||||
public ViewHolder(View v) {
|
public ViewHolder(View v) {
|
||||||
super(v);
|
super(v);
|
||||||
noThumbnailView = v.findViewById(R.id.suggested_channel_no_thumbnail);
|
noThumbnailView = v.findViewById(R.id.suggested_channel_no_thumbnail);
|
||||||
|
|
|
@ -23,12 +23,13 @@ public class TagListAdapter extends RecyclerView.Adapter<TagListAdapter.ViewHold
|
||||||
public static final int CUSTOMIZE_MODE_ADD = 1;
|
public static final int CUSTOMIZE_MODE_ADD = 1;
|
||||||
public static final int CUSTOMIZE_MODE_REMOVE = 2;
|
public static final int CUSTOMIZE_MODE_REMOVE = 2;
|
||||||
|
|
||||||
private Context context;
|
private final Context context;
|
||||||
private List<Tag> items;
|
private List<Tag> items;
|
||||||
@Setter
|
@Setter
|
||||||
private TagClickListener clickListener;
|
private TagClickListener clickListener;
|
||||||
@Getter
|
|
||||||
@Setter
|
@Setter
|
||||||
|
@Getter
|
||||||
private int customizeMode;
|
private int customizeMode;
|
||||||
|
|
||||||
public TagListAdapter(List<Tag> tags, Context context) {
|
public TagListAdapter(List<Tag> tags, Context context) {
|
||||||
|
@ -38,8 +39,8 @@ public class TagListAdapter extends RecyclerView.Adapter<TagListAdapter.ViewHold
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
protected ImageView iconView;
|
protected final ImageView iconView;
|
||||||
protected TextView nameView;
|
protected final TextView nameView;
|
||||||
public ViewHolder(View v) {
|
public ViewHolder(View v) {
|
||||||
super(v);
|
super(v);
|
||||||
iconView = v.findViewById(R.id.tag_action);
|
iconView = v.findViewById(R.id.tag_action);
|
||||||
|
|
|
@ -26,8 +26,8 @@ public class TransactionListAdapter extends RecyclerView.Adapter<TransactionList
|
||||||
private static final DecimalFormat TX_LIST_AMOUNT_FORMAT = new DecimalFormat("#,##0.0000");
|
private static final DecimalFormat TX_LIST_AMOUNT_FORMAT = new DecimalFormat("#,##0.0000");
|
||||||
private static final SimpleDateFormat TX_LIST_DATE_FORMAT = new SimpleDateFormat("MMM d");
|
private static final SimpleDateFormat TX_LIST_DATE_FORMAT = new SimpleDateFormat("MMM d");
|
||||||
|
|
||||||
private Context context;
|
private final Context context;
|
||||||
private List<Transaction> items;
|
private final List<Transaction> items;
|
||||||
@Setter
|
@Setter
|
||||||
private TransactionClickListener listener;
|
private TransactionClickListener listener;
|
||||||
|
|
||||||
|
@ -107,14 +107,14 @@ public class TransactionListAdapter extends RecyclerView.Adapter<TransactionList
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
protected TextView descView;
|
protected final TextView descView;
|
||||||
protected TextView amountView;
|
protected final TextView amountView;
|
||||||
protected TextView claimView;
|
protected final TextView claimView;
|
||||||
protected TextView feeView;
|
protected final TextView feeView;
|
||||||
protected TextView txidLinkView;
|
protected final TextView txidLinkView;
|
||||||
protected TextView dateView;
|
protected final TextView dateView;
|
||||||
protected TextView pendingView;
|
protected final TextView pendingView;
|
||||||
protected View infoFeeContainer;
|
protected final View infoFeeContainer;
|
||||||
|
|
||||||
public ViewHolder(View v) {
|
public ViewHolder(View v) {
|
||||||
super(v);
|
super(v);
|
||||||
|
|
|
@ -21,8 +21,8 @@ import io.lbry.browser.utils.LbryUri;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
public class UrlSuggestionListAdapter extends RecyclerView.Adapter<UrlSuggestionListAdapter.ViewHolder> {
|
public class UrlSuggestionListAdapter extends RecyclerView.Adapter<UrlSuggestionListAdapter.ViewHolder> {
|
||||||
private Context context;
|
private final Context context;
|
||||||
private List<UrlSuggestion> items;
|
private final List<UrlSuggestion> items;
|
||||||
@Setter
|
@Setter
|
||||||
private UrlSuggestionClickListener listener;
|
private UrlSuggestionClickListener listener;
|
||||||
|
|
||||||
|
@ -130,9 +130,9 @@ public class UrlSuggestionListAdapter extends RecyclerView.Adapter<UrlSuggestion
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
protected SolidIconView iconView;
|
protected final SolidIconView iconView;
|
||||||
protected TextView titleView;
|
protected final TextView titleView;
|
||||||
protected TextView descView;
|
protected final TextView descView;
|
||||||
public ViewHolder(View v) {
|
public ViewHolder(View v) {
|
||||||
super(v);
|
super(v);
|
||||||
iconView = v.findViewById(R.id.url_suggestion_icon);
|
iconView = v.findViewById(R.id.url_suggestion_icon);
|
||||||
|
|
|
@ -25,7 +25,7 @@ public class VerificationPagerAdapter extends FragmentStateAdapter {
|
||||||
public static final int PAGE_VERIFICATION_WALLET = 2;
|
public static final int PAGE_VERIFICATION_WALLET = 2;
|
||||||
public static final int PAGE_VERIFICATION_MANUAL = 3;
|
public static final int PAGE_VERIFICATION_MANUAL = 3;
|
||||||
|
|
||||||
private FragmentActivity activity;
|
private final FragmentActivity activity;
|
||||||
|
|
||||||
public VerificationPagerAdapter(FragmentActivity activity) {
|
public VerificationPagerAdapter(FragmentActivity activity) {
|
||||||
super(activity);
|
super(activity);
|
||||||
|
|
|
@ -67,8 +67,8 @@ public class ContentFromDialogFragment extends BottomSheetDialogFragment {
|
||||||
R.id.content_from_past_year_item,
|
R.id.content_from_past_year_item,
|
||||||
R.id.content_from_all_time_item
|
R.id.content_from_all_time_item
|
||||||
};
|
};
|
||||||
private BottomSheetDialogFragment dialog;
|
private final BottomSheetDialogFragment dialog;
|
||||||
private ContentFromListener listener;
|
private final ContentFromListener listener;
|
||||||
|
|
||||||
public ContentFromItemClickListener(BottomSheetDialogFragment dialog, ContentFromListener listener) {
|
public ContentFromItemClickListener(BottomSheetDialogFragment dialog, ContentFromListener listener) {
|
||||||
this.dialog = dialog;
|
this.dialog = dialog;
|
||||||
|
|
|
@ -54,8 +54,8 @@ public class ContentScopeDialogFragment extends BottomSheetDialogFragment {
|
||||||
private final int[] checkViewIds = {
|
private final int[] checkViewIds = {
|
||||||
R.id.content_scope_everyone_item_selected, R.id.content_scope_tags_item_selected
|
R.id.content_scope_everyone_item_selected, R.id.content_scope_tags_item_selected
|
||||||
};
|
};
|
||||||
private BottomSheetDialogFragment dialog;
|
private final BottomSheetDialogFragment dialog;
|
||||||
private ContentScopeListener listener;
|
private final ContentScopeListener listener;
|
||||||
|
|
||||||
public ContentScopeItemClickListener(BottomSheetDialogFragment dialog, ContentScopeListener listener) {
|
public ContentScopeItemClickListener(BottomSheetDialogFragment dialog, ContentScopeListener listener) {
|
||||||
this.dialog = dialog;
|
this.dialog = dialog;
|
||||||
|
|
|
@ -57,8 +57,8 @@ public class ContentSortDialogFragment extends BottomSheetDialogFragment {
|
||||||
private final int[] checkViewIds = {
|
private final int[] checkViewIds = {
|
||||||
R.id.sort_by_trending_item_selected, R.id.sort_by_new_item_selected, R.id.sort_by_top_item_selected
|
R.id.sort_by_trending_item_selected, R.id.sort_by_new_item_selected, R.id.sort_by_top_item_selected
|
||||||
};
|
};
|
||||||
private BottomSheetDialogFragment dialog;
|
private final BottomSheetDialogFragment dialog;
|
||||||
private SortByListener listener;
|
private final SortByListener listener;
|
||||||
|
|
||||||
public SortByItemClickListener(BottomSheetDialogFragment dialog, SortByListener listener) {
|
public SortByItemClickListener(BottomSheetDialogFragment dialog, SortByListener listener) {
|
||||||
this.dialog = dialog;
|
this.dialog = dialog;
|
||||||
|
|
|
@ -142,7 +142,7 @@ public class CustomizeTagsDialogFragment extends BottomSheetDialogFragment {
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
private TagListAdapter.TagClickListener customizeTagClickListener = new TagListAdapter.TagClickListener() {
|
private final TagListAdapter.TagClickListener customizeTagClickListener = new TagListAdapter.TagClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onTagClicked(Tag tag, int customizeMode) {
|
public void onTagClicked(Tag tag, int customizeMode) {
|
||||||
if (customizeMode == TagListAdapter.CUSTOMIZE_MODE_ADD) {
|
if (customizeMode == TagListAdapter.CUSTOMIZE_MODE_ADD) {
|
||||||
|
|
|
@ -9,11 +9,9 @@ import lombok.Setter;
|
||||||
|
|
||||||
public class ClaimSearchCacheValue {
|
public class ClaimSearchCacheValue {
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
private final List<Claim> claims;
|
||||||
private List<Claim> claims;
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
private final long timestamp;
|
||||||
private long timestamp;
|
|
||||||
|
|
||||||
public ClaimSearchCacheValue(List<Claim> claims, long timestamp) {
|
public ClaimSearchCacheValue(List<Claim> claims, long timestamp) {
|
||||||
this.claims = new ArrayList<>(claims);
|
this.claims = new ArrayList<>(claims);
|
||||||
|
|
|
@ -4,9 +4,9 @@ import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class Language {
|
public class Language {
|
||||||
private String code;
|
private final String code;
|
||||||
private String name;
|
private final String name;
|
||||||
private int stringResourceId;
|
private final int stringResourceId;
|
||||||
|
|
||||||
public Language(String code, String name, int stringResourceId) {
|
public Language(String code, String name, int stringResourceId) {
|
||||||
this.code = code;
|
this.code = code;
|
||||||
|
|
|
@ -4,9 +4,9 @@ import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class License {
|
public class License {
|
||||||
private String name;
|
private final String name;
|
||||||
private String url;
|
private String url;
|
||||||
private int stringResourceId;
|
private final int stringResourceId;
|
||||||
|
|
||||||
public License(String name, int stringResourceId) {
|
public License(String name, int stringResourceId) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
|
|
@ -37,8 +37,8 @@ public class NavMenuItem {
|
||||||
public static final int ID_ITEM_SETTINGS = 401;
|
public static final int ID_ITEM_SETTINGS = 401;
|
||||||
public static final int ID_ITEM_ABOUT = 402;
|
public static final int ID_ITEM_ABOUT = 402;
|
||||||
|
|
||||||
private Context context;
|
private final Context context;
|
||||||
private int id;
|
private final int id;
|
||||||
private boolean group;
|
private boolean group;
|
||||||
private int icon;
|
private int icon;
|
||||||
private String title;
|
private String title;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package io.lbry.browser.model;
|
package io.lbry.browser.model;
|
||||||
|
|
||||||
public class StartupStage {
|
public class StartupStage {
|
||||||
public Integer stage;
|
public final Integer stage;
|
||||||
public Boolean stageDone;
|
public final Boolean stageDone;
|
||||||
|
|
||||||
public StartupStage(Integer stage, Boolean stageDone) {
|
public StartupStage(Integer stage, Boolean stageDone) {
|
||||||
this.stage = stage;
|
this.stage = stage;
|
||||||
|
|
|
@ -6,14 +6,28 @@ import java.math.BigDecimal;
|
||||||
|
|
||||||
import io.lbry.browser.utils.Helper;
|
import io.lbry.browser.utils.Helper;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class WalletBalance {
|
public class WalletBalance {
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
private BigDecimal available;
|
private BigDecimal available;
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
private BigDecimal reserved;
|
private BigDecimal reserved;
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
private BigDecimal claims;
|
private BigDecimal claims;
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
private BigDecimal supports;
|
private BigDecimal supports;
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
private BigDecimal tips;
|
private BigDecimal tips;
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
private BigDecimal total;
|
private BigDecimal total;
|
||||||
|
|
||||||
public WalletBalance() {
|
public WalletBalance() {
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
package io.lbry.browser.model;
|
package io.lbry.browser.model;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class WalletSync {
|
public class WalletSync {
|
||||||
private String hash;
|
@Getter
|
||||||
private String data;
|
private final String hash;
|
||||||
|
@Getter
|
||||||
|
private final String data;
|
||||||
|
@Getter
|
||||||
private boolean changed;
|
private boolean changed;
|
||||||
|
|
||||||
public WalletSync(String hash, String data) {
|
public WalletSync(String hash, String data) {
|
||||||
|
@ -17,4 +21,5 @@ public class WalletSync {
|
||||||
this(hash, data);
|
this(hash, data);
|
||||||
this.changed = changed;
|
this.changed = changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,11 +17,11 @@ public class BufferEventTask extends AsyncTask<Void, Void, Void> {
|
||||||
private static final String TAG = "LbryBufferEvent";
|
private static final String TAG = "LbryBufferEvent";
|
||||||
private static final String ENDPOINT = "https://collector-service.api.lbry.tv/api/v1/events/video";
|
private static final String ENDPOINT = "https://collector-service.api.lbry.tv/api/v1/events/video";
|
||||||
|
|
||||||
private String streamUrl;
|
private final String streamUrl;
|
||||||
private String userIdHash;
|
private final String userIdHash;
|
||||||
private long streamDuration;
|
private final long streamDuration;
|
||||||
private long streamPosition;
|
private final long streamPosition;
|
||||||
private long bufferDuration;
|
private final long bufferDuration;
|
||||||
|
|
||||||
public BufferEventTask(String streamUrl, long streamDuration, long streamPosition, long bufferDuration, String userIdHash) {
|
public BufferEventTask(String streamUrl, long streamDuration, long streamPosition, long bufferDuration, String userIdHash) {
|
||||||
this.streamUrl = streamUrl;
|
this.streamUrl = streamUrl;
|
||||||
|
|
|
@ -27,9 +27,9 @@ import okhttp3.Response;
|
||||||
public class CommentCreateTask extends AsyncTask<Void, Void, Comment> {
|
public class CommentCreateTask extends AsyncTask<Void, Void, Comment> {
|
||||||
private static final String STATUS_ENDPOINT = "https://comments.lbry.com";
|
private static final String STATUS_ENDPOINT = "https://comments.lbry.com";
|
||||||
|
|
||||||
private Comment comment;
|
private final Comment comment;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private CommentCreateWithTipHandler handler;
|
private final CommentCreateWithTipHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public CommentCreateTask(Comment comment, View progressView, CommentCreateWithTipHandler handler) {
|
public CommentCreateTask(Comment comment, View progressView, CommentCreateWithTipHandler handler) {
|
||||||
|
|
|
@ -21,8 +21,8 @@ public class CommentListTask extends AsyncTask<Void, Void, List<Comment>> {
|
||||||
private final int page;
|
private final int page;
|
||||||
private final int pageSize;
|
private final int pageSize;
|
||||||
private final String claim;
|
private final String claim;
|
||||||
private ProgressBar progressBar;
|
private final ProgressBar progressBar;
|
||||||
private CommentListHandler handler;
|
private final CommentListHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public CommentListTask(int page, int pageSize, String claim, ProgressBar progressBar, CommentListHandler handler) {
|
public CommentListTask(int page, int pageSize, String claim, ProgressBar progressBar, CommentListHandler handler) {
|
||||||
|
|
|
@ -10,10 +10,10 @@ import io.lbry.browser.model.Tag;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
public class FollowUnfollowTagTask extends AsyncTask<Void, Void, Boolean> {
|
public class FollowUnfollowTagTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
private Tag tag;
|
private final Tag tag;
|
||||||
private boolean unfollowing;
|
private final boolean unfollowing;
|
||||||
private Context context;
|
private final Context context;
|
||||||
private FollowUnfollowTagHandler handler;
|
private final FollowUnfollowTagHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public FollowUnfollowTagTask(Tag tag, boolean unfollowing, Context context, FollowUnfollowTagHandler handler) {
|
public FollowUnfollowTagTask(Tag tag, boolean unfollowing, Context context, FollowUnfollowTagHandler handler) {
|
||||||
|
|
|
@ -12,9 +12,9 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lighthouse;
|
import io.lbry.browser.utils.Lighthouse;
|
||||||
|
|
||||||
public class LighthouseAutoCompleteTask extends AsyncTask<Void, Void, List<UrlSuggestion>> {
|
public class LighthouseAutoCompleteTask extends AsyncTask<Void, Void, List<UrlSuggestion>> {
|
||||||
private String text;
|
private final String text;
|
||||||
private AutoCompleteResultHandler handler;
|
private final AutoCompleteResultHandler handler;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public LighthouseAutoCompleteTask(String text, View progressView, AutoCompleteResultHandler handler) {
|
public LighthouseAutoCompleteTask(String text, View progressView, AutoCompleteResultHandler handler) {
|
||||||
|
|
|
@ -14,13 +14,13 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lighthouse;
|
import io.lbry.browser.utils.Lighthouse;
|
||||||
|
|
||||||
public class LighthouseSearchTask extends AsyncTask<Void, Void, List<Claim>> {
|
public class LighthouseSearchTask extends AsyncTask<Void, Void, List<Claim>> {
|
||||||
private String rawQuery;
|
private final String rawQuery;
|
||||||
private int size;
|
private final int size;
|
||||||
private int from;
|
private final int from;
|
||||||
private boolean nsfw;
|
private final boolean nsfw;
|
||||||
private String relatedTo;
|
private final String relatedTo;
|
||||||
private ClaimSearchResultHandler handler;
|
private final ClaimSearchResultHandler handler;
|
||||||
private ProgressBar progressBar;
|
private final ProgressBar progressBar;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public LighthouseSearchTask(String rawQuery, int size, int from, boolean nsfw, String relatedTo, ProgressBar progressBar, ClaimSearchResultHandler handler) {
|
public LighthouseSearchTask(String rawQuery, int size, int from, boolean nsfw, String relatedTo, ProgressBar progressBar, ClaimSearchResultHandler handler) {
|
||||||
|
|
|
@ -18,8 +18,8 @@ import io.lbry.browser.model.Tag;
|
||||||
import io.lbry.browser.utils.Helper;
|
import io.lbry.browser.utils.Helper;
|
||||||
|
|
||||||
public class LoadTagsTask extends AsyncTask<Void, Void, List<Tag>> {
|
public class LoadTagsTask extends AsyncTask<Void, Void, List<Tag>> {
|
||||||
private Context context;
|
private final Context context;
|
||||||
private LoadTagsHandler handler;
|
private final LoadTagsHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public LoadTagsTask(Context context, LoadTagsHandler handler) {
|
public LoadTagsTask(Context context, LoadTagsHandler handler) {
|
||||||
|
|
|
@ -29,12 +29,12 @@ import okhttp3.Response;
|
||||||
// background task to create a diff of local and remote subscriptions and try to merge
|
// background task to create a diff of local and remote subscriptions and try to merge
|
||||||
public class MergeSubscriptionsTask extends AsyncTask<Void, Void, List<Subscription>> {
|
public class MergeSubscriptionsTask extends AsyncTask<Void, Void, List<Subscription>> {
|
||||||
private static final String TAG = "MergeSubscriptionsTask";
|
private static final String TAG = "MergeSubscriptionsTask";
|
||||||
private Context context;
|
private final Context context;
|
||||||
private List<Subscription> base;
|
private final List<Subscription> base;
|
||||||
private List<Subscription> diff;
|
private List<Subscription> diff;
|
||||||
private MergeSubscriptionsHandler handler;
|
private final MergeSubscriptionsHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
private boolean replaceLocal;
|
private final boolean replaceLocal;
|
||||||
|
|
||||||
public MergeSubscriptionsTask(List<Subscription> base, boolean replaceLocal, Context context, MergeSubscriptionsHandler handler) {
|
public MergeSubscriptionsTask(List<Subscription> base, boolean replaceLocal, Context context, MergeSubscriptionsHandler handler) {
|
||||||
this.base = base;
|
this.base = base;
|
||||||
|
|
|
@ -13,9 +13,9 @@ import java.nio.Buffer;
|
||||||
import io.lbry.browser.utils.Helper;
|
import io.lbry.browser.utils.Helper;
|
||||||
|
|
||||||
public class ReadTextFileTask extends AsyncTask<Void, Void, String> {
|
public class ReadTextFileTask extends AsyncTask<Void, Void, String> {
|
||||||
private String filePath;
|
private final String filePath;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
private ReadTextFileHandler handler;
|
private final ReadTextFileHandler handler;
|
||||||
public ReadTextFileTask(String filePath, ReadTextFileHandler handler) {
|
public ReadTextFileTask(String filePath, ReadTextFileHandler handler) {
|
||||||
this.filePath = filePath;
|
this.filePath = filePath;
|
||||||
this.handler = handler;
|
this.handler = handler;
|
||||||
|
|
|
@ -9,9 +9,9 @@ import io.lbry.browser.exceptions.ApiCallException;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
public class SetSdkSettingTask extends AsyncTask<Void, Void, Boolean> {
|
public class SetSdkSettingTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
private String key;
|
private final String key;
|
||||||
private String value;
|
private final String value;
|
||||||
private GenericTaskHandler handler;
|
private final GenericTaskHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
public SetSdkSettingTask(String key, String value, GenericTaskHandler handler) {
|
public SetSdkSettingTask(String key, String value, GenericTaskHandler handler) {
|
||||||
this.key = key;
|
this.key = key;
|
||||||
|
|
|
@ -13,13 +13,13 @@ import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
public class UpdateSuggestedTagsTask extends AsyncTask<Void, Void, List<Tag>> {
|
public class UpdateSuggestedTagsTask extends AsyncTask<Void, Void, List<Tag>> {
|
||||||
|
|
||||||
private boolean clearPrevious;
|
private final boolean clearPrevious;
|
||||||
private boolean excludeMature;
|
private final boolean excludeMature;
|
||||||
private int limit;
|
private final int limit;
|
||||||
private String filter;
|
private final String filter;
|
||||||
private TagListAdapter addedTagsAdapter;
|
private final TagListAdapter addedTagsAdapter;
|
||||||
private TagListAdapter suggestedTagsAdapter;
|
private final TagListAdapter suggestedTagsAdapter;
|
||||||
private KnownTagsHandler handler;
|
private final KnownTagsHandler handler;
|
||||||
|
|
||||||
public UpdateSuggestedTagsTask(
|
public UpdateSuggestedTagsTask(
|
||||||
String filter,
|
String filter,
|
||||||
|
|
|
@ -21,9 +21,9 @@ import okhttp3.RequestBody;
|
||||||
import okhttp3.Response;
|
import okhttp3.Response;
|
||||||
|
|
||||||
public class UploadImageTask extends AsyncTask<Void, Void, String> {
|
public class UploadImageTask extends AsyncTask<Void, Void, String> {
|
||||||
private String filePath;
|
private final String filePath;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private UploadThumbnailHandler handler;
|
private final UploadThumbnailHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public UploadImageTask(String filePath, View progressView, UploadThumbnailHandler handler) {
|
public UploadImageTask(String filePath, View progressView, UploadThumbnailHandler handler) {
|
||||||
|
|
|
@ -16,12 +16,12 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
public class AbandonChannelTask extends AsyncTask<Void, Void, Boolean> {
|
public class AbandonChannelTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
private List<String> claimIds;
|
private final List<String> claimIds;
|
||||||
private List<String> successfulClaimIds;
|
private List<String> successfulClaimIds;
|
||||||
private List<String> failedClaimIds;
|
private List<String> failedClaimIds;
|
||||||
private List<Exception> failedExceptions;
|
private List<Exception> failedExceptions;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private AbandonHandler handler;
|
private final AbandonHandler handler;
|
||||||
|
|
||||||
public AbandonChannelTask(List<String> claimIds, View progressView, AbandonHandler handler) {
|
public AbandonChannelTask(List<String> claimIds, View progressView, AbandonHandler handler) {
|
||||||
this.claimIds = claimIds;
|
this.claimIds = claimIds;
|
||||||
|
|
|
@ -16,12 +16,12 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
public class AbandonStreamTask extends AsyncTask<Void, Void, Boolean> {
|
public class AbandonStreamTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
private List<String> claimIds;
|
private final List<String> claimIds;
|
||||||
private List<String> successfulClaimIds;
|
private List<String> successfulClaimIds;
|
||||||
private List<String> failedClaimIds;
|
private List<String> failedClaimIds;
|
||||||
private List<Exception> failedExceptions;
|
private List<Exception> failedExceptions;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private AbandonHandler handler;
|
private final AbandonHandler handler;
|
||||||
|
|
||||||
public AbandonStreamTask(List<String> claimIds, View progressView, AbandonHandler handler) {
|
public AbandonStreamTask(List<String> claimIds, View progressView, AbandonHandler handler) {
|
||||||
this.claimIds = claimIds;
|
this.claimIds = claimIds;
|
||||||
|
|
|
@ -21,12 +21,12 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
public class ChannelCreateUpdateTask extends AsyncTask<Void, Void, Claim> {
|
public class ChannelCreateUpdateTask extends AsyncTask<Void, Void, Claim> {
|
||||||
private Claim claim;
|
private final Claim claim;
|
||||||
private BigDecimal deposit;
|
private final BigDecimal deposit;
|
||||||
private boolean update;
|
private final boolean update;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
private ClaimResultHandler handler;
|
private final ClaimResultHandler handler;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
|
|
||||||
public ChannelCreateUpdateTask(Claim claim, BigDecimal deposit, boolean update, View progressView, ClaimResultHandler handler) {
|
public ChannelCreateUpdateTask(Claim claim, BigDecimal deposit, boolean update, View progressView, ClaimResultHandler handler) {
|
||||||
this.claim = claim;
|
this.claim = claim;
|
||||||
|
|
|
@ -19,9 +19,9 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
public class ClaimListTask extends AsyncTask<Void, Void, List<Claim>> {
|
public class ClaimListTask extends AsyncTask<Void, Void, List<Claim>> {
|
||||||
private List<String> types;
|
private final List<String> types;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private ClaimListResultHandler handler;
|
private final ClaimListResultHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public ClaimListTask(String type, View progressView, ClaimListResultHandler handler) {
|
public ClaimListTask(String type, View progressView, ClaimListResultHandler handler) {
|
||||||
|
|
|
@ -12,10 +12,10 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
public class ClaimSearchTask extends AsyncTask<Void, Void, List<Claim>> {
|
public class ClaimSearchTask extends AsyncTask<Void, Void, List<Claim>> {
|
||||||
private Map<String, Object> options;
|
private final Map<String, Object> options;
|
||||||
private String connectionString;
|
private final String connectionString;
|
||||||
private ClaimSearchResultHandler handler;
|
private final ClaimSearchResultHandler handler;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private ApiCallException error;
|
private ApiCallException error;
|
||||||
|
|
||||||
public ClaimSearchTask(Map<String, Object> options, String connectionString, View progressView, ClaimSearchResultHandler handler) {
|
public ClaimSearchTask(Map<String, Object> options, String connectionString, View progressView, ClaimSearchResultHandler handler) {
|
||||||
|
|
|
@ -21,10 +21,10 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
public class PublishClaimTask extends AsyncTask<Void, Void, Claim> {
|
public class PublishClaimTask extends AsyncTask<Void, Void, Claim> {
|
||||||
private Claim claim;
|
private final Claim claim;
|
||||||
private String filePath;
|
private final String filePath;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private ClaimResultHandler handler;
|
private final ClaimResultHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
public PublishClaimTask(Claim claim, String filePath, View progressView, ClaimResultHandler handler) {
|
public PublishClaimTask(Claim claim, String filePath, View progressView, ClaimResultHandler handler) {
|
||||||
this.claim = claim;
|
this.claim = claim;
|
||||||
|
|
|
@ -21,8 +21,8 @@ public class PurchaseListTask extends AsyncTask<Void, Void, List<Claim>> {
|
||||||
private String claimId;
|
private String claimId;
|
||||||
private int page;
|
private int page;
|
||||||
private int pageSize;
|
private int pageSize;
|
||||||
private ClaimSearchResultHandler handler;
|
private final ClaimSearchResultHandler handler;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public PurchaseListTask(String claimId, View progressView, ClaimSearchResultHandler handler) {
|
public PurchaseListTask(String claimId, View progressView, ClaimSearchResultHandler handler) {
|
||||||
|
|
|
@ -13,10 +13,10 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
public class ResolveTask extends AsyncTask<Void, Void, List<Claim>> {
|
public class ResolveTask extends AsyncTask<Void, Void, List<Claim>> {
|
||||||
private List<String> urls;
|
private final List<String> urls;
|
||||||
private String connectionString;
|
private final String connectionString;
|
||||||
private ClaimListResultHandler handler;
|
private final ClaimListResultHandler handler;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private ApiCallException error;
|
private ApiCallException error;
|
||||||
|
|
||||||
public ResolveTask(String url, String connectionString, View progressView, ClaimListResultHandler handler) {
|
public ResolveTask(String url, String connectionString, View progressView, ClaimListResultHandler handler) {
|
||||||
|
|
|
@ -20,12 +20,12 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
public class StreamRepostTask extends AsyncTask<Void, Void, Claim> {
|
public class StreamRepostTask extends AsyncTask<Void, Void, Claim> {
|
||||||
private String name;
|
private final String name;
|
||||||
private BigDecimal bid;
|
private final BigDecimal bid;
|
||||||
private String claimId;
|
private final String claimId;
|
||||||
private String channelId;
|
private final String channelId;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private ClaimResultHandler handler;
|
private final ClaimResultHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public StreamRepostTask(String name, BigDecimal bid, String claimId, String channelId, View progressView, ClaimResultHandler handler) {
|
public StreamRepostTask(String name, BigDecimal bid, String claimId, String channelId, View progressView, ClaimResultHandler handler) {
|
||||||
|
|
|
@ -12,7 +12,7 @@ import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
// Just run delete on the specified claim IDs (no need for a handler)
|
// Just run delete on the specified claim IDs (no need for a handler)
|
||||||
public class BulkDeleteFilesTask extends AsyncTask<Void, Void, Boolean> {
|
public class BulkDeleteFilesTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
private List<String> claimIds;
|
private final List<String> claimIds;
|
||||||
public BulkDeleteFilesTask(List<String> claimIds) {
|
public BulkDeleteFilesTask(List<String> claimIds) {
|
||||||
this.claimIds = claimIds;
|
this.claimIds = claimIds;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,9 +10,9 @@ import io.lbry.browser.tasks.GenericTaskHandler;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
public class DeleteFileTask extends AsyncTask<Void, Void, Boolean> {
|
public class DeleteFileTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
private String claimId;
|
private final String claimId;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
private GenericTaskHandler handler;
|
private final GenericTaskHandler handler;
|
||||||
|
|
||||||
public DeleteFileTask(String claimId, GenericTaskHandler handler) {
|
public DeleteFileTask(String claimId, GenericTaskHandler handler) {
|
||||||
this.claimId = claimId;
|
this.claimId = claimId;
|
||||||
|
|
|
@ -11,12 +11,12 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
public class FileListTask extends AsyncTask<Void, Void, List<LbryFile>> {
|
public class FileListTask extends AsyncTask<Void, Void, List<LbryFile>> {
|
||||||
private String claimId;
|
private final String claimId;
|
||||||
private boolean downloads;
|
private boolean downloads;
|
||||||
private int page;
|
private int page;
|
||||||
private int pageSize;
|
private int pageSize;
|
||||||
private FileListResultHandler handler;
|
private final FileListResultHandler handler;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private ApiCallException error;
|
private ApiCallException error;
|
||||||
|
|
||||||
public FileListTask(int page, int pageSize, boolean downloads, View progressView, FileListResultHandler handler) {
|
public FileListTask(int page, int pageSize, boolean downloads, View progressView, FileListResultHandler handler) {
|
||||||
|
|
|
@ -14,10 +14,10 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
public class GetFileTask extends AsyncTask<Void, Void, LbryFile> {
|
public class GetFileTask extends AsyncTask<Void, Void, LbryFile> {
|
||||||
private String uri;
|
private final String uri;
|
||||||
private boolean saveFile;
|
private final boolean saveFile;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private GetFileHandler handler;
|
private final GetFileHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public GetFileTask(String uri, boolean saveFile, View progressView, GetFileHandler handler) {
|
public GetFileTask(String uri, boolean saveFile, View progressView, GetFileHandler handler) {
|
||||||
|
|
|
@ -23,10 +23,10 @@ import io.lbry.browser.utils.Lbryio;
|
||||||
import okhttp3.Response;
|
import okhttp3.Response;
|
||||||
|
|
||||||
public class AndroidPurchaseTask extends AsyncTask<Void, Void, RewardVerified> {
|
public class AndroidPurchaseTask extends AsyncTask<Void, Void, RewardVerified> {
|
||||||
private Context context;
|
private final Context context;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private String purchaseToken;
|
private final String purchaseToken;
|
||||||
private RewardVerifiedHandler handler;
|
private final RewardVerifiedHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public AndroidPurchaseTask(String purchaseToken, View progressView, Context context, RewardVerifiedHandler handler) {
|
public AndroidPurchaseTask(String purchaseToken, View progressView, Context context, RewardVerifiedHandler handler) {
|
||||||
|
|
|
@ -17,12 +17,12 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbryio;
|
import io.lbry.browser.utils.Lbryio;
|
||||||
|
|
||||||
public class ChannelSubscribeTask extends AsyncTask<Void, Void, Boolean> {
|
public class ChannelSubscribeTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
private Context context;
|
private final Context context;
|
||||||
private String channelClaimId;
|
private final String channelClaimId;
|
||||||
private Subscription subscription;
|
private final Subscription subscription;
|
||||||
private ChannelSubscribeHandler handler;
|
private final ChannelSubscribeHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
private boolean isUnsubscribing;
|
private final boolean isUnsubscribing;
|
||||||
|
|
||||||
public ChannelSubscribeTask(Context context, String channelClaimId, Subscription subscription, boolean isUnsubscribing, ChannelSubscribeHandler handler) {
|
public ChannelSubscribeTask(Context context, String channelClaimId, Subscription subscription, boolean isUnsubscribing, ChannelSubscribeHandler handler) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
|
|
|
@ -25,12 +25,12 @@ import io.lbry.browser.utils.Lbryio;
|
||||||
|
|
||||||
public class ClaimRewardTask extends AsyncTask<Void, Void, String> {
|
public class ClaimRewardTask extends AsyncTask<Void, Void, String> {
|
||||||
|
|
||||||
private Context context;
|
private final Context context;
|
||||||
private String type;
|
private final String type;
|
||||||
private String rewardCode;
|
private final String rewardCode;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private double amountClaimed;
|
private double amountClaimed;
|
||||||
private ClaimRewardHandler handler;
|
private final ClaimRewardHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public ClaimRewardTask(String type, String rewardCode, View progressView, Context context, ClaimRewardHandler handler) {
|
public ClaimRewardTask(String type, String rewardCode, View progressView, Context context, ClaimRewardHandler handler) {
|
||||||
|
|
|
@ -7,9 +7,9 @@ import io.lbry.browser.model.lbryinc.User;
|
||||||
import io.lbry.browser.utils.Lbryio;
|
import io.lbry.browser.utils.Lbryio;
|
||||||
|
|
||||||
public class FetchCurrentUserTask extends AsyncTask<Void, Void, User> {
|
public class FetchCurrentUserTask extends AsyncTask<Void, Void, User> {
|
||||||
private Context context;
|
private final Context context;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
private FetchUserTaskHandler handler;
|
private final FetchUserTaskHandler handler;
|
||||||
|
|
||||||
public FetchCurrentUserTask(Context context, FetchUserTaskHandler handler) {
|
public FetchCurrentUserTask(Context context, FetchUserTaskHandler handler) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
|
|
|
@ -17,8 +17,8 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbryio;
|
import io.lbry.browser.utils.Lbryio;
|
||||||
|
|
||||||
public class FetchInviteStatusTask extends AsyncTask<Void, Void, List<Invitee>> {
|
public class FetchInviteStatusTask extends AsyncTask<Void, Void, List<Invitee>> {
|
||||||
private FetchInviteStatusHandler handler;
|
private final FetchInviteStatusHandler handler;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public FetchInviteStatusTask(View progressView, FetchInviteStatusHandler handler) {
|
public FetchInviteStatusTask(View progressView, FetchInviteStatusHandler handler) {
|
||||||
|
|
|
@ -12,8 +12,8 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbryio;
|
import io.lbry.browser.utils.Lbryio;
|
||||||
|
|
||||||
public class FetchReferralCodeTask extends AsyncTask<Void, Void, String> {
|
public class FetchReferralCodeTask extends AsyncTask<Void, Void, String> {
|
||||||
private FetchReferralCodeHandler handler;
|
private final FetchReferralCodeHandler handler;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public FetchReferralCodeTask(View progressView, FetchReferralCodeHandler handler) {
|
public FetchReferralCodeTask(View progressView, FetchReferralCodeHandler handler) {
|
||||||
|
|
|
@ -18,8 +18,8 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbryio;
|
import io.lbry.browser.utils.Lbryio;
|
||||||
|
|
||||||
public class FetchRewardsTask extends AsyncTask<Void, Void, List<Reward>> {
|
public class FetchRewardsTask extends AsyncTask<Void, Void, List<Reward>> {
|
||||||
private FetchRewardsHandler handler;
|
private final FetchRewardsHandler handler;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public FetchRewardsTask(View progressView, FetchRewardsHandler handler) {
|
public FetchRewardsTask(View progressView, FetchRewardsHandler handler) {
|
||||||
|
|
|
@ -15,10 +15,10 @@ public class FetchStatCountTask extends AsyncTask<Void, Void, Integer> {
|
||||||
public static final int STAT_VIEW_COUNT = 1;
|
public static final int STAT_VIEW_COUNT = 1;
|
||||||
public static final int STAT_SUB_COUNT = 2;
|
public static final int STAT_SUB_COUNT = 2;
|
||||||
|
|
||||||
private String claimId;
|
private final String claimId;
|
||||||
private int stat;
|
private final int stat;
|
||||||
private FetchStatCountHandler handler;
|
private final FetchStatCountHandler handler;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public FetchStatCountTask(int stat, String claimId, View progressView, FetchStatCountHandler handler) {
|
public FetchStatCountTask(int stat, String claimId, View progressView, FetchStatCountHandler handler) {
|
||||||
|
|
|
@ -23,9 +23,9 @@ import io.lbry.browser.utils.LbryUri;
|
||||||
import io.lbry.browser.utils.Lbryio;
|
import io.lbry.browser.utils.Lbryio;
|
||||||
|
|
||||||
public class FetchSubscriptionsTask extends AsyncTask<Void, Void, List<Subscription>> {
|
public class FetchSubscriptionsTask extends AsyncTask<Void, Void, List<Subscription>> {
|
||||||
private Context context;
|
private final Context context;
|
||||||
private FetchSubscriptionsHandler handler;
|
private final FetchSubscriptionsHandler handler;
|
||||||
private ProgressBar progressBar;
|
private final ProgressBar progressBar;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public FetchSubscriptionsTask(Context context, ProgressBar progressBar, FetchSubscriptionsHandler handler) {
|
public FetchSubscriptionsTask(Context context, ProgressBar progressBar, FetchSubscriptionsHandler handler) {
|
||||||
|
|
|
@ -14,9 +14,9 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbryio;
|
import io.lbry.browser.utils.Lbryio;
|
||||||
|
|
||||||
public class InviteByEmailTask extends AsyncTask<Void, Void, Boolean> {
|
public class InviteByEmailTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
private String email;
|
private final String email;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private GenericTaskHandler handler;
|
private final GenericTaskHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public InviteByEmailTask(String email, View progressView, GenericTaskHandler handler) {
|
public InviteByEmailTask(String email, View progressView, GenericTaskHandler handler) {
|
||||||
|
|
|
@ -15,11 +15,11 @@ import io.lbry.browser.utils.Lbryio;
|
||||||
import okhttp3.Response;
|
import okhttp3.Response;
|
||||||
|
|
||||||
public class LogFileViewTask extends AsyncTask<Void, Void, Boolean> {
|
public class LogFileViewTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
private String uri;
|
private final String uri;
|
||||||
private Claim claim;
|
private final Claim claim;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
private GenericTaskHandler handler;
|
private final GenericTaskHandler handler;
|
||||||
private long timeToStart;
|
private final long timeToStart;
|
||||||
|
|
||||||
public LogFileViewTask(String uri, Claim claim, long timeToStart, GenericTaskHandler handler) {
|
public LogFileViewTask(String uri, Claim claim, long timeToStart, GenericTaskHandler handler) {
|
||||||
this.uri = uri;
|
this.uri = uri;
|
||||||
|
|
|
@ -13,7 +13,7 @@ import io.lbry.browser.utils.Lbryio;
|
||||||
import okhttp3.Response;
|
import okhttp3.Response;
|
||||||
|
|
||||||
public class LogPublishTask extends AsyncTask<Void, Void, Void> {
|
public class LogPublishTask extends AsyncTask<Void, Void, Void> {
|
||||||
private Claim claimResult;
|
private final Claim claimResult;
|
||||||
public LogPublishTask(Claim claimResult) {
|
public LogPublishTask(Claim claimResult) {
|
||||||
this.claimResult = claimResult;
|
this.claimResult = claimResult;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbryio;
|
import io.lbry.browser.utils.Lbryio;
|
||||||
|
|
||||||
public class NotificationDeleteTask extends AsyncTask<Void, Void, Boolean> {
|
public class NotificationDeleteTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
private List<Long> ids;
|
private final List<Long> ids;
|
||||||
|
|
||||||
public NotificationDeleteTask(List<Long> ids) {
|
public NotificationDeleteTask(List<Long> ids) {
|
||||||
this.ids = ids;
|
this.ids = ids;
|
||||||
|
|
|
@ -30,9 +30,9 @@ import io.lbry.browser.utils.Lbryio;
|
||||||
public class NotificationListTask extends AsyncTask<Void, Void, List<LbryNotification>> {
|
public class NotificationListTask extends AsyncTask<Void, Void, List<LbryNotification>> {
|
||||||
private static final String TAG = "Notifications";
|
private static final String TAG = "Notifications";
|
||||||
|
|
||||||
private Context context;
|
private final Context context;
|
||||||
private ListNotificationsHandler handler;
|
private final ListNotificationsHandler handler;
|
||||||
private ProgressBar progressBar;
|
private final ProgressBar progressBar;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public NotificationListTask(Context context, ProgressBar progressBar, ListNotificationsHandler handler) {
|
public NotificationListTask(Context context, ProgressBar progressBar, ListNotificationsHandler handler) {
|
||||||
|
|
|
@ -12,10 +12,10 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbryio;
|
import io.lbry.browser.utils.Lbryio;
|
||||||
|
|
||||||
public class NotificationUpdateTask extends AsyncTask<Void, Void, Boolean> {
|
public class NotificationUpdateTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
private List<Long> ids;
|
private final List<Long> ids;
|
||||||
private boolean seen;
|
private final boolean seen;
|
||||||
private boolean read;
|
private final boolean read;
|
||||||
private boolean updateRead;
|
private final boolean updateRead;
|
||||||
|
|
||||||
public NotificationUpdateTask(List<Long> ids, boolean seen) {
|
public NotificationUpdateTask(List<Long> ids, boolean seen) {
|
||||||
this(ids, false, true, false);
|
this(ids, false, true, false);
|
||||||
|
|
|
@ -22,10 +22,10 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbryio;
|
import io.lbry.browser.utils.Lbryio;
|
||||||
|
|
||||||
public class TwitterVerifyTask extends AsyncTask<Void, Void, RewardVerified> {
|
public class TwitterVerifyTask extends AsyncTask<Void, Void, RewardVerified> {
|
||||||
private Context context;
|
private final Context context;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private TwitterOauth twitterOauth;
|
private final TwitterOauth twitterOauth;
|
||||||
private RewardVerifiedHandler handler;
|
private final RewardVerifiedHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public TwitterVerifyTask(TwitterOauth twitterOauth, View progressView, Context context, RewardVerifiedHandler handler) {
|
public TwitterVerifyTask(TwitterOauth twitterOauth, View progressView, Context context, RewardVerifiedHandler handler) {
|
||||||
|
|
|
@ -11,8 +11,8 @@ import io.lbry.browser.data.DatabaseHelper;
|
||||||
import io.lbry.browser.model.UrlSuggestion;
|
import io.lbry.browser.model.UrlSuggestion;
|
||||||
|
|
||||||
public class FetchRecentUrlHistoryTask extends AsyncTask<Void, Void, List<UrlSuggestion>> {
|
public class FetchRecentUrlHistoryTask extends AsyncTask<Void, Void, List<UrlSuggestion>> {
|
||||||
private DatabaseHelper dbHelper;
|
private final DatabaseHelper dbHelper;
|
||||||
private FetchRecentUrlHistoryHandler handler;
|
private final FetchRecentUrlHistoryHandler handler;
|
||||||
public FetchRecentUrlHistoryTask(DatabaseHelper dbHelper, FetchRecentUrlHistoryHandler handler) {
|
public FetchRecentUrlHistoryTask(DatabaseHelper dbHelper, FetchRecentUrlHistoryHandler handler) {
|
||||||
this.dbHelper = dbHelper;
|
this.dbHelper = dbHelper;
|
||||||
this.handler = handler;
|
this.handler = handler;
|
||||||
|
|
|
@ -15,10 +15,10 @@ import io.lbry.browser.model.ViewHistory;
|
||||||
import io.lbry.browser.utils.Helper;
|
import io.lbry.browser.utils.Helper;
|
||||||
|
|
||||||
public class FetchViewHistoryTask extends AsyncTask<Void, Void, List<ViewHistory>> {
|
public class FetchViewHistoryTask extends AsyncTask<Void, Void, List<ViewHistory>> {
|
||||||
private DatabaseHelper dbHelper;
|
private final DatabaseHelper dbHelper;
|
||||||
private FetchViewHistoryHandler handler;
|
private final FetchViewHistoryHandler handler;
|
||||||
private int pageSize;
|
private final int pageSize;
|
||||||
private Date lastDate;
|
private final Date lastDate;
|
||||||
public FetchViewHistoryTask(Date lastDate, int pageSize, DatabaseHelper dbHelper, FetchViewHistoryHandler handler) {
|
public FetchViewHistoryTask(Date lastDate, int pageSize, DatabaseHelper dbHelper, FetchViewHistoryHandler handler) {
|
||||||
this.lastDate = lastDate;
|
this.lastDate = lastDate;
|
||||||
this.pageSize = pageSize;
|
this.pageSize = pageSize;
|
||||||
|
|
|
@ -23,9 +23,9 @@ import io.lbry.browser.utils.Helper;
|
||||||
|
|
||||||
public class LoadGalleryItemsTask extends AsyncTask<Void, GalleryItem, List<GalleryItem>> {
|
public class LoadGalleryItemsTask extends AsyncTask<Void, GalleryItem, List<GalleryItem>> {
|
||||||
private static final String TAG = "LoadGalleryItemsTask";
|
private static final String TAG = "LoadGalleryItemsTask";
|
||||||
private LoadGalleryHandler handler;
|
private final LoadGalleryHandler handler;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private Context context;
|
private final Context context;
|
||||||
|
|
||||||
public LoadGalleryItemsTask(View progressView, Context context, LoadGalleryHandler handler) {
|
public LoadGalleryItemsTask(View progressView, Context context, LoadGalleryHandler handler) {
|
||||||
this.progressView = progressView;
|
this.progressView = progressView;
|
||||||
|
|
|
@ -10,9 +10,9 @@ import io.lbry.browser.model.UrlSuggestion;
|
||||||
import io.lbry.browser.tasks.GenericTaskHandler;
|
import io.lbry.browser.tasks.GenericTaskHandler;
|
||||||
|
|
||||||
public class SaveUrlHistoryTask extends AsyncTask<Void, Void, Boolean> {
|
public class SaveUrlHistoryTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
private DatabaseHelper dbHelper;
|
private final DatabaseHelper dbHelper;
|
||||||
private UrlSuggestion suggestion;
|
private final UrlSuggestion suggestion;
|
||||||
private SaveUrlHistoryHandler handler;
|
private final SaveUrlHistoryHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public SaveUrlHistoryTask(UrlSuggestion suggestion, DatabaseHelper dbHelper, SaveUrlHistoryHandler handler) {
|
public SaveUrlHistoryTask(UrlSuggestion suggestion, DatabaseHelper dbHelper, SaveUrlHistoryHandler handler) {
|
||||||
|
|
|
@ -7,9 +7,9 @@ import io.lbry.browser.data.DatabaseHelper;
|
||||||
import io.lbry.browser.model.ViewHistory;
|
import io.lbry.browser.model.ViewHistory;
|
||||||
|
|
||||||
public class SaveViewHistoryTask extends AsyncTask<Void, Void, Boolean> {
|
public class SaveViewHistoryTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
private DatabaseHelper dbHelper;
|
private final DatabaseHelper dbHelper;
|
||||||
private ViewHistory history;
|
private final ViewHistory history;
|
||||||
private SaveViewHistoryHandler handler;
|
private final SaveViewHistoryHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public SaveViewHistoryTask(ViewHistory history, DatabaseHelper dbHelper, SaveViewHistoryHandler handler) {
|
public SaveViewHistoryTask(ViewHistory history, DatabaseHelper dbHelper, SaveViewHistoryHandler handler) {
|
||||||
|
|
|
@ -8,8 +8,8 @@ import io.lbry.browser.model.lbryinc.User;
|
||||||
import io.lbry.browser.utils.Lbryio;
|
import io.lbry.browser.utils.Lbryio;
|
||||||
|
|
||||||
public class CheckUserEmailVerifiedTask extends AsyncTask<Void, Void, Boolean> {
|
public class CheckUserEmailVerifiedTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
private Context context;
|
private final Context context;
|
||||||
private CheckUserEmailVerifiedHandler handler;
|
private final CheckUserEmailVerifiedHandler handler;
|
||||||
|
|
||||||
public CheckUserEmailVerifiedTask(Context context, CheckUserEmailVerifiedHandler handler) {
|
public CheckUserEmailVerifiedTask(Context context, CheckUserEmailVerifiedHandler handler) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
|
|
|
@ -15,9 +15,9 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbryio;
|
import io.lbry.browser.utils.Lbryio;
|
||||||
|
|
||||||
public class EmailNewTask extends AsyncTask<Void, Void, Boolean> {
|
public class EmailNewTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
private String email;
|
private final String email;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private EmailNewHandler handler;
|
private final EmailNewHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public EmailNewTask(String email, View progressView, EmailNewHandler handler) {
|
public EmailNewTask(String email, View progressView, EmailNewHandler handler) {
|
||||||
|
|
|
@ -13,9 +13,9 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbryio;
|
import io.lbry.browser.utils.Lbryio;
|
||||||
|
|
||||||
public class EmailResendTask extends AsyncTask<Void, Void, Boolean> {
|
public class EmailResendTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
private String email;
|
private final String email;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private GenericTaskHandler handler;
|
private final GenericTaskHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public EmailResendTask(String email, View progressView, GenericTaskHandler handler) {
|
public EmailResendTask(String email, View progressView, GenericTaskHandler handler) {
|
||||||
|
|
|
@ -13,11 +13,11 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbryio;
|
import io.lbry.browser.utils.Lbryio;
|
||||||
|
|
||||||
public class PhoneNewVerifyTask extends AsyncTask<Void, Void, Boolean> {
|
public class PhoneNewVerifyTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
private String countryCode;
|
private final String countryCode;
|
||||||
private String phoneNumber;
|
private final String phoneNumber;
|
||||||
private String verificationCode;
|
private final String verificationCode;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private GenericTaskHandler handler;
|
private final GenericTaskHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public PhoneNewVerifyTask(String countryCode, String phoneNumber, String verificationCode, View progressView, GenericTaskHandler handler) {
|
public PhoneNewVerifyTask(String countryCode, String phoneNumber, String verificationCode, View progressView, GenericTaskHandler handler) {
|
||||||
|
|
|
@ -20,8 +20,8 @@ public class TwitterAccessTokenTask extends AsyncTask<Void, Void, String> {
|
||||||
private static final String ENDPOINT = "https://api.twitter.com/oauth/access_token";
|
private static final String ENDPOINT = "https://api.twitter.com/oauth/access_token";
|
||||||
|
|
||||||
private Exception error;
|
private Exception error;
|
||||||
private String oauthParams;
|
private final String oauthParams;
|
||||||
private TwitterOauthHandler handler;
|
private final TwitterOauthHandler handler;
|
||||||
|
|
||||||
public TwitterAccessTokenTask(String oauthParams, TwitterOauthHandler handler) {
|
public TwitterAccessTokenTask(String oauthParams, TwitterOauthHandler handler) {
|
||||||
this.oauthParams = oauthParams;
|
this.oauthParams = oauthParams;
|
||||||
|
|
|
@ -22,10 +22,10 @@ import okhttp3.Response;
|
||||||
public class TwitterRequestTokenTask extends AsyncTask<Void, Void, String> {
|
public class TwitterRequestTokenTask extends AsyncTask<Void, Void, String> {
|
||||||
private static final String ENDPOINT = "https://api.twitter.com/oauth/request_token";
|
private static final String ENDPOINT = "https://api.twitter.com/oauth/request_token";
|
||||||
|
|
||||||
private String consumerKey;
|
private final String consumerKey;
|
||||||
private String consumerSecret;
|
private final String consumerSecret;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
private TwitterOauthHandler handler;
|
private final TwitterOauthHandler handler;
|
||||||
|
|
||||||
public TwitterRequestTokenTask(String consumerKey, String consumerSecret, TwitterOauthHandler handler) {
|
public TwitterRequestTokenTask(String consumerKey, String consumerSecret, TwitterOauthHandler handler) {
|
||||||
this.consumerKey = consumerKey;
|
this.consumerKey = consumerKey;
|
||||||
|
|
|
@ -36,8 +36,8 @@ import io.lbry.browser.utils.LbryUri;
|
||||||
public class LoadSharedUserStateTask extends AsyncTask<Void, Void, Boolean> {
|
public class LoadSharedUserStateTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
private static final String KEY = "shared";
|
private static final String KEY = "shared";
|
||||||
|
|
||||||
private Context context;
|
private final Context context;
|
||||||
private LoadSharedUserStateHandler handler;
|
private final LoadSharedUserStateHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
private List<Subscription> subscriptions;
|
private List<Subscription> subscriptions;
|
||||||
|
|
|
@ -33,7 +33,7 @@ import io.lbry.browser.utils.Lbryio;
|
||||||
public class SaveSharedUserStateTask extends AsyncTask<Void, Void, Boolean> {
|
public class SaveSharedUserStateTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
private static final String KEY = "shared";
|
private static final String KEY = "shared";
|
||||||
private static final String VERSION = "0.1";
|
private static final String VERSION = "0.1";
|
||||||
private SaveSharedUserStateHandler handler;
|
private final SaveSharedUserStateHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public SaveSharedUserStateTask(SaveSharedUserStateHandler handler) {
|
public SaveSharedUserStateTask(SaveSharedUserStateHandler handler) {
|
||||||
|
|
|
@ -16,12 +16,12 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
public class SupportCreateTask extends AsyncTask<Void, Void, Boolean> {
|
public class SupportCreateTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
private String claimId;
|
private final String claimId;
|
||||||
private String channelId;
|
private final String channelId;
|
||||||
private BigDecimal amount;
|
private final BigDecimal amount;
|
||||||
private boolean tip;
|
private final boolean tip;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private GenericTaskHandler handler;
|
private final GenericTaskHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public SupportCreateTask(String claimId, String channelId, BigDecimal amount, boolean tip, View progressView, GenericTaskHandler handler) {
|
public SupportCreateTask(String claimId, String channelId, BigDecimal amount, boolean tip, View progressView, GenericTaskHandler handler) {
|
||||||
|
|
|
@ -17,10 +17,10 @@ public class SyncApplyTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
// flag to indicate if this sync_apply is to fetch wallet data or apply data
|
// flag to indicate if this sync_apply is to fetch wallet data or apply data
|
||||||
private boolean fetch;
|
private boolean fetch;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
private String password;
|
private final String password;
|
||||||
private String data;
|
private String data;
|
||||||
private View progressView;
|
private View progressView;
|
||||||
private SyncTaskHandler handler;
|
private final SyncTaskHandler handler;
|
||||||
|
|
||||||
private String syncHash;
|
private String syncHash;
|
||||||
private String syncData;
|
private String syncData;
|
||||||
|
|
|
@ -19,13 +19,13 @@ import io.lbry.browser.utils.Lbryio;
|
||||||
|
|
||||||
public class SyncGetTask extends AsyncTask<Void, Void, WalletSync> {
|
public class SyncGetTask extends AsyncTask<Void, Void, WalletSync> {
|
||||||
|
|
||||||
private boolean applySyncChanges;
|
private final boolean applySyncChanges;
|
||||||
private boolean applySyncSuccessful;
|
private boolean applySyncSuccessful;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
private Exception syncApplyError;
|
private Exception syncApplyError;
|
||||||
private String password;
|
private String password;
|
||||||
private SyncTaskHandler handler;
|
private final SyncTaskHandler handler;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
|
|
||||||
private String syncHash;
|
private String syncHash;
|
||||||
private String syncData;
|
private String syncData;
|
||||||
|
|
|
@ -14,10 +14,10 @@ import io.lbry.browser.utils.Lbryio;
|
||||||
|
|
||||||
public class SyncSetTask extends AsyncTask<Void, Void, String> {
|
public class SyncSetTask extends AsyncTask<Void, Void, String> {
|
||||||
private Exception error;
|
private Exception error;
|
||||||
private String oldHash;
|
private final String oldHash;
|
||||||
private String newHash;
|
private final String newHash;
|
||||||
private String data;
|
private final String data;
|
||||||
private SyncTaskHandler handler;
|
private final SyncTaskHandler handler;
|
||||||
|
|
||||||
public SyncSetTask(String oldHash, String newHash, String data, SyncTaskHandler handler) {
|
public SyncSetTask(String oldHash, String newHash, String data, SyncTaskHandler handler) {
|
||||||
this.oldHash = oldHash;
|
this.oldHash = oldHash;
|
||||||
|
|
|
@ -11,10 +11,10 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
public class TransactionListTask extends AsyncTask<Void, Void, List<Transaction>> {
|
public class TransactionListTask extends AsyncTask<Void, Void, List<Transaction>> {
|
||||||
private int page;
|
private final int page;
|
||||||
private int pageSize;
|
private final int pageSize;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private TransactionListHandler handler;
|
private final TransactionListHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public TransactionListTask(int page, int pageSize, View progressView, TransactionListHandler handler) {
|
public TransactionListTask(int page, int pageSize, View progressView, TransactionListHandler handler) {
|
||||||
|
|
|
@ -19,7 +19,7 @@ import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
public class UnlockTipsTask extends AsyncTask<Void, Void, Boolean> {
|
public class UnlockTipsTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
|
|
||||||
private GenericTaskHandler handler;
|
private final GenericTaskHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public UnlockTipsTask(GenericTaskHandler handler) {
|
public UnlockTipsTask(GenericTaskHandler handler) {
|
||||||
|
|
|
@ -13,7 +13,7 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
public class WalletAddressUnusedTask extends AsyncTask<Void, Void, String> {
|
public class WalletAddressUnusedTask extends AsyncTask<Void, Void, String> {
|
||||||
private WalletAddressUnusedHandler handler;
|
private final WalletAddressUnusedHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public WalletAddressUnusedTask(WalletAddressUnusedHandler handler) {
|
public WalletAddressUnusedTask(WalletAddressUnusedHandler handler) {
|
||||||
|
|
|
@ -12,7 +12,7 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
public class WalletBalanceTask extends AsyncTask<Void, Void, WalletBalance> {
|
public class WalletBalanceTask extends AsyncTask<Void, Void, WalletBalance> {
|
||||||
private WalletBalanceHandler handler;
|
private final WalletBalanceHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public WalletBalanceTask(WalletBalanceHandler handler) {
|
public WalletBalanceTask(WalletBalanceHandler handler) {
|
||||||
|
|
|
@ -12,10 +12,10 @@ import io.lbry.browser.utils.Helper;
|
||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
public class WalletSendTask extends AsyncTask<Void, Void, Boolean> {
|
public class WalletSendTask extends AsyncTask<Void, Void, Boolean> {
|
||||||
private String recipientAddress;
|
private final String recipientAddress;
|
||||||
private String amount;
|
private final String amount;
|
||||||
private View progressView;
|
private final View progressView;
|
||||||
private WalletSendHandler handler;
|
private final WalletSendHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public WalletSendTask(String recipientAddress, String amount, View progressView, WalletSendHandler handler) {
|
public WalletSendTask(String recipientAddress, String amount, View progressView, WalletSendHandler handler) {
|
||||||
|
|
|
@ -585,8 +585,8 @@ public class ChannelFragment extends BaseFragment implements FetchChannelsListen
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class ChannelPagerAdapter extends FragmentStateAdapter {
|
private static class ChannelPagerAdapter extends FragmentStateAdapter {
|
||||||
private Claim channelClaim;
|
private final Claim channelClaim;
|
||||||
private String commentHash;
|
private final String commentHash;
|
||||||
public ChannelPagerAdapter(Claim channelClaim, String commentHash, FragmentActivity activity) {
|
public ChannelPagerAdapter(Claim channelClaim, String commentHash, FragmentActivity activity) {
|
||||||
super(activity);
|
super(activity);
|
||||||
this.channelClaim = channelClaim;
|
this.channelClaim = channelClaim;
|
||||||
|
|
|
@ -77,7 +77,7 @@ public class ChannelManagerFragment extends BaseFragment implements ActionMode.C
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
private View.OnClickListener newChannelClickListener = new View.OnClickListener() {
|
private final View.OnClickListener newChannelClickListener = new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
Context context = getContext();
|
Context context = getContext();
|
||||||
|
|
|
@ -8,7 +8,7 @@ import android.view.Gravity;
|
||||||
import androidx.appcompat.widget.AppCompatTextView;
|
import androidx.appcompat.widget.AppCompatTextView;
|
||||||
|
|
||||||
public class OutlineIconView extends AppCompatTextView {
|
public class OutlineIconView extends AppCompatTextView {
|
||||||
private Context context;
|
private final Context context;
|
||||||
|
|
||||||
public OutlineIconView(Context context) {
|
public OutlineIconView(Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
|
|
|
@ -8,7 +8,7 @@ import android.view.Gravity;
|
||||||
import androidx.appcompat.widget.AppCompatTextView;
|
import androidx.appcompat.widget.AppCompatTextView;
|
||||||
|
|
||||||
public class SolidIconView extends AppCompatTextView {
|
public class SolidIconView extends AppCompatTextView {
|
||||||
private Context context;
|
private final Context context;
|
||||||
|
|
||||||
public SolidIconView(Context context) {
|
public SolidIconView(Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
|
|
|
@ -289,7 +289,7 @@ public class AllContentFragment extends BaseFragment implements DownloadActionLi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private FollowUnfollowTagTask.FollowUnfollowTagHandler followUnfollowHandler = new FollowUnfollowTagTask.FollowUnfollowTagHandler() {
|
private final FollowUnfollowTagTask.FollowUnfollowTagHandler followUnfollowHandler = new FollowUnfollowTagTask.FollowUnfollowTagHandler() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Tag tag, boolean unfollowing) {
|
public void onSuccess(Tag tag, boolean unfollowing) {
|
||||||
if (tags != null) {
|
if (tags != null) {
|
||||||
|
|
|
@ -788,7 +788,7 @@ public class FileViewFragment extends BaseFragment implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private View.OnClickListener bellIconListener = new View.OnClickListener() {
|
private final View.OnClickListener bellIconListener = new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
if (claim != null && claim.getSigningChannel() != null) {
|
if (claim != null && claim.getSigningChannel() != null) {
|
||||||
|
@ -824,7 +824,7 @@ public class FileViewFragment extends BaseFragment implements
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private View.OnClickListener followUnfollowListener = new View.OnClickListener() {
|
private final View.OnClickListener followUnfollowListener = new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(final View view) {
|
public void onClick(final View view) {
|
||||||
if (claim != null && claim.getSigningChannel() != null) {
|
if (claim != null && claim.getSigningChannel() != null) {
|
||||||
|
@ -2635,7 +2635,7 @@ public class FileViewFragment extends BaseFragment implements
|
||||||
dailyViewTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
dailyViewTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ClaimRewardTask.ClaimRewardHandler eligibleRewardHandler = new ClaimRewardTask.ClaimRewardHandler() {
|
private final ClaimRewardTask.ClaimRewardHandler eligibleRewardHandler = new ClaimRewardTask.ClaimRewardHandler() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(double amountClaimed, String message) {
|
public void onSuccess(double amountClaimed, String message) {
|
||||||
if (Helper.isNullOrEmpty(message)) {
|
if (Helper.isNullOrEmpty(message)) {
|
||||||
|
@ -2817,7 +2817,7 @@ public class FileViewFragment extends BaseFragment implements
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class LbryWebViewClient extends WebViewClient {
|
private static class LbryWebViewClient extends WebViewClient {
|
||||||
private Context context;
|
private final Context context;
|
||||||
public LbryWebViewClient(Context context) {
|
public LbryWebViewClient(Context context) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue