Clean + some changes

This commit is contained in:
Thomas 2020-07-14 19:50:54 +02:00
parent c737afb566
commit cf4c3f2f7a
33 changed files with 128 additions and 114 deletions

View File

@ -1,7 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path name="my_images" path="Android/data/fr.gouv.etalab.mastodon/files/Pictures" />
<paths>
<external-path
name="my_images"
path="Android/data/fr.gouv.etalab.mastodon/files/Pictures" />
<cache-path name="*" path="." />
<cache-path
name="*"
path="." />
</paths>

View File

@ -21,12 +21,12 @@
<application
android:name="app.fedilab.android.activities.MainApplication"
android:requestLegacyExternalStorage="true"
android:allowBackup="false"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher_lite"
android:label="@string/app_name_lite"
android:largeHeap="true"
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/ic_launcher_lite_round"
android:supportsRtl="true"
android:theme="@style/AppThemeDark"

View File

@ -13,13 +13,16 @@ package app.fedilab.android.activities;
*
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
* see <http://www.gnu.org/licenses>. */
import android.annotation.SuppressLint;
import android.content.Intent;
@SuppressLint("Registered")
public class BaseActivity extends AllBaseActivity {
protected void launchOwnerStatusesActivity(){}
protected void launchOwnerNotificationsActivity(){}
protected void launchOwnerStatusesActivity() {
}
protected void launchOwnerNotificationsActivity() {
}
}

View File

@ -17,4 +17,5 @@ package app.fedilab.android.activities;
* see <http://www.gnu.org/licenses>. */
public class BaseFragmentActivity extends MainBaseFragmentActivity{}
public class BaseFragmentActivity extends MainBaseFragmentActivity {
}

View File

@ -1,4 +1,5 @@
package app.fedilab.android.activities;
/* Copyright 2020 Thomas Schneider
*
* This file is a part of Fedilab

View File

@ -16,13 +16,15 @@ import android.net.Uri;
*
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
* see <http://www.gnu.org/licenses>. */
public class PixelfedComposeActivity extends BasePixelfedComposeActivity{
public class PixelfedComposeActivity extends BasePixelfedComposeActivity {
@Override
protected void launchPhotoEditor(Uri uri) {}
protected void launchPhotoEditor(Uri uri) {
}
@Override
protected void displayEmojiPopup() {}
protected void displayEmojiPopup() {
}
}

View File

@ -1,31 +1,6 @@
package app.fedilab.android.activities;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.DialogFragment;
import com.github.stom79.mytransl.MyTransL;
import com.github.stom79.mytransl.client.HttpsConnectionException;
import com.github.stom79.mytransl.translate.Translate;
import java.util.Date;
import java.util.concurrent.TimeUnit;
import app.fedilab.android.R;
import app.fedilab.android.helper.Helper;
import es.dmoral.toasty.Toasty;
/* Copyright 2020 Thomas Schneider
*
@ -41,17 +16,19 @@ import es.dmoral.toasty.Toasty;
*
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
* see <http://www.gnu.org/licenses>. */
public class TootActivity extends BaseTootActivity{
public class TootActivity extends BaseTootActivity {
@Override
protected boolean actionTranslateClick() {
return true;
}
@Override
protected void launchPhotoEditor(Uri uri) {}
protected void launchPhotoEditor(Uri uri) {
}
@Override
protected void displayEmojiPopup() {}
protected void displayEmojiPopup() {
}
}

View File

@ -1,8 +1,5 @@
package app.fedilab.android.drawers;
import android.content.Intent;
import android.os.Bundle;
import java.util.List;
import app.fedilab.android.client.Entities.Notification;
@ -21,12 +18,13 @@ import app.fedilab.android.client.Entities.Notification;
*
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
* see <http://www.gnu.org/licenses>. */
public class NotificationsListAdapter extends BaseNotificationsListAdapter{
public class NotificationsListAdapter extends BaseNotificationsListAdapter {
public NotificationsListAdapter(boolean isOnWifi, int behaviorWithAttachments, List<Notification> notifications) {
super(isOnWifi, behaviorWithAttachments, notifications);
}
public void notificationStatusChart(){}
public void notificationStatusChart() {
}
}

View File

@ -24,11 +24,11 @@ public class StatusListAdapter extends BaseStatusListAdapter {
super(statusDrawerParams);
}
protected void statusAddReactionClick(){
((Activity)context).getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
protected void statusAddReactionClick() {
((Activity) context).getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
}
protected void notificationCharts(){
protected void notificationCharts() {
}
}

View File

@ -1,4 +1,5 @@
package app.fedilab.android.helper;
/* Copyright 2020 Thomas Schneider
*
* This file is a part of Fedilab

View File

@ -1,4 +1,5 @@
package app.fedilab.android.jobs;
/* Copyright 2020 Thomas Schneider
*
* This file is a part of Fedilab
@ -13,4 +14,5 @@ package app.fedilab.android.jobs;
*
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
* see <http://www.gnu.org/licenses>. */
public class BackupNotificationsSyncJob extends BaseBackupNotificationsSyncJob {}
public class BackupNotificationsSyncJob extends BaseBackupNotificationsSyncJob {
}

View File

@ -1,4 +1,5 @@
package app.fedilab.android.jobs;
/* Copyright 2020 Thomas Schneider
*
* This file is a part of Fedilab
@ -13,4 +14,5 @@ package app.fedilab.android.jobs;
*
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
* see <http://www.gnu.org/licenses>. */
public class BackupStatusesSyncJob extends BaseBackupStatusesSyncJob {}
public class BackupStatusesSyncJob extends BaseBackupStatusesSyncJob {
}

View File

@ -1,4 +1,5 @@
package app.fedilab.android.jobs;
/* Copyright 2020 Thomas Schneider
*
* This file is a part of Fedilab
@ -13,4 +14,5 @@ package app.fedilab.android.jobs;
*
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
* see <http://www.gnu.org/licenses>. */
public class NotificationsSyncJob extends BaseNotificationsSyncJob {}
public class NotificationsSyncJob extends BaseNotificationsSyncJob {
}

View File

@ -1,4 +1,5 @@
package app.fedilab.android.jobs;
/* Copyright 2020 Thomas Schneider
*
* This file is a part of Fedilab
@ -13,4 +14,5 @@ package app.fedilab.android.jobs;
*
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
* see <http://www.gnu.org/licenses>. */
public class ScheduledBoostsSyncJob extends BaseScheduledBoostsSyncJob {}
public class ScheduledBoostsSyncJob extends BaseScheduledBoostsSyncJob {
}

View File

@ -1,4 +1,5 @@
package app.fedilab.android.jobs;
/* Copyright 2020 Thomas Schneider
*
* This file is a part of Fedilab
@ -13,4 +14,5 @@ package app.fedilab.android.jobs;
*
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
* see <http://www.gnu.org/licenses>. */
public class ScheduledTootsSyncJob extends BaseScheduledTootsSyncJob {}
public class ScheduledTootsSyncJob extends BaseScheduledTootsSyncJob {
}

View File

@ -14,4 +14,5 @@ package app.fedilab.android.services;
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
* see <http://www.gnu.org/licenses>. */
public class StreamingLocalTimelineService extends BaseStreamingLocalTimelineService {}
public class StreamingLocalTimelineService extends BaseStreamingLocalTimelineService {
}

View File

@ -1,7 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path name="my_images" path="Android/data/app.fedilab.lite/files/Pictures" />
<paths>
<external-path
name="my_images"
path="Android/data/app.fedilab.lite/files/Pictures" />
<cache-path name="*" path="." />
<cache-path
name="*"
path="." />
</paths>

View File

@ -20,7 +20,6 @@ import com.franmontiel.localechanger.LocaleChanger;
import com.google.android.material.snackbar.Snackbar;
import com.jaredrummler.cyanea.app.CyaneaAppCompatActivity;
import org.jetbrains.annotations.NotNull;
import java.util.Timer;

View File

@ -2405,6 +2405,10 @@ public abstract class BaseMainActivity extends BaseActivity
super.onDetachedFromWindow();
}
protected abstract void launchOwnerStatusesActivity();
protected abstract void launchOwnerNotificationsActivity();
public enum iconLauncher {
BUBBLES,
FEDIVERSE,
@ -2568,7 +2572,4 @@ public abstract class BaseMainActivity extends BaseActivity
return mNumOfTabs;
}
}
protected abstract void launchOwnerStatusesActivity();
protected abstract void launchOwnerNotificationsActivity();
}

View File

@ -180,6 +180,9 @@ public abstract class BasePixelfedComposeActivity extends BaseActivity implement
private final int PICK_IMAGE = 56556;
private final int TAKE_PHOTO = 56532;
public long currentToId;
protected MastalabAutoCompleteTextView toot_content;
protected ImageButton toot_emoji;
protected LinearLayout drawer_layout;
String mCurrentPhotoPath;
File photoFile = null;
private String visibility;
@ -187,7 +190,6 @@ public abstract class BasePixelfedComposeActivity extends BaseActivity implement
private boolean isSensitive = false;
private ImageButton toot_visibility;
private Button toot_it;
protected MastalabAutoCompleteTextView toot_content;
private CheckBox toot_sensitive;
private long restored;
private TextView title;
@ -211,8 +213,6 @@ public abstract class BasePixelfedComposeActivity extends BaseActivity implement
private SliderView imageSlider;
private SliderAdapter sliderAdapter;
private CheckBox pixelfed_story;
protected ImageButton toot_emoji;
protected LinearLayout drawer_layout;
private BroadcastReceiver imageReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
@ -1911,6 +1911,10 @@ public abstract class BasePixelfedComposeActivity extends BaseActivity implement
active = false;
}
protected abstract void launchPhotoEditor(Uri uri);
protected abstract void displayEmojiPopup();
static class asyncPicture extends AsyncTask<Void, Void, Void> {
String commpressedFilePath = null;
@ -1969,7 +1973,4 @@ public abstract class BasePixelfedComposeActivity extends BaseActivity implement
}
}
protected abstract void launchPhotoEditor(Uri uri);
protected abstract void displayEmojiPopup();
}

View File

@ -222,6 +222,12 @@ public abstract class BaseTootActivity extends BaseActivity implements UploadSta
private final int PICK_IMAGE = 56556;
private final int TAKE_PHOTO = 56532;
public long currentToId;
protected MastalabAutoCompleteTextView toot_content;
protected EditText toot_cw_content;
protected LinearLayout drawer_layout;
protected ImageButton toot_emoji;
protected int style;
protected int theme;
List<Emojis> emojis;
String mCurrentPhotoPath;
File photoFile = null;
@ -232,8 +238,6 @@ public abstract class BaseTootActivity extends BaseActivity implements UploadSta
private boolean isSensitive = false;
private ImageButton toot_visibility;
private Button toot_it;
protected MastalabAutoCompleteTextView toot_content;
protected EditText toot_cw_content;
private Status tootReply = null;
private String tootMention = null;
private String urlMention = null;
@ -244,12 +248,10 @@ public abstract class BaseTootActivity extends BaseActivity implements UploadSta
private ImageView pp_actionBar;
private ProgressBar pp_progress;
private Toast mToast;
protected LinearLayout drawer_layout;
private HorizontalScrollView picture_scrollview;
private TextView toot_space_left;
private String initialContent;
private Account accountReply;
protected ImageButton toot_emoji;
private AlertDialog alertDialogEmoji;
private String mentionAccount;
private Status idRedirect;
@ -259,7 +261,6 @@ public abstract class BaseTootActivity extends BaseActivity implements UploadSta
private int stepSpliToot;
private boolean removed;
private boolean restoredScheduled;
protected int style;
private StoredStatus scheduledstatus;
private boolean isScheduled;
private List<Boolean> checkedValues;
@ -287,7 +288,6 @@ public abstract class BaseTootActivity extends BaseActivity implements UploadSta
}
}
};
protected int theme;
private BroadcastReceiver add_new_media = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
@ -3669,6 +3669,12 @@ public abstract class BaseTootActivity extends BaseActivity implements UploadSta
return String.format(Locale.getDefault(), "#%02X%02X%02X", r, g, b);
}
protected abstract boolean actionTranslateClick();
protected abstract void launchPhotoEditor(Uri uri);
protected abstract void displayEmojiPopup();
static class asyncPicture extends AsyncTask<Void, Void, Void> {
String commpressedFilePath;
@ -3746,9 +3752,4 @@ public abstract class BaseTootActivity extends BaseActivity implements UploadSta
}
}
}
protected abstract boolean actionTranslateClick();
protected abstract void launchPhotoEditor(Uri uri);
protected abstract void displayEmojiPopup();
}

View File

@ -248,7 +248,7 @@ public class LoginActivity extends BaseActivity {
return;
}
instance = login_instance.getText().toString().trim().toLowerCase();
if(instance.length() == 0) {
if (instance.length() == 0) {
return;
}
connect_button.setEnabled(false);

View File

@ -16,4 +16,5 @@ package app.fedilab.android.activities;
import androidx.appcompat.app.AppCompatActivity;
public abstract class MainBaseFragmentActivity extends AppCompatActivity {}
public abstract class MainBaseFragmentActivity extends AppCompatActivity {
}

View File

@ -25,6 +25,7 @@ import java.util.Date;
import java.util.Iterator;
import java.util.List;
import app.fedilab.android.BuildConfig;
import app.fedilab.android.activities.MainActivity;
import app.fedilab.android.client.API;
import app.fedilab.android.client.APIResponse;
@ -114,7 +115,7 @@ public class SyncTimelinesAsyncTask extends AsyncTask<Void, Void, Void> {
manageTimelines.add(managePublic);
new TimelinesDAO(contextReference.get(), db).insert(managePublic);
}
if (MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.MASTODON || MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.PLEROMA) {
if (!BuildConfig.lite && (MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.MASTODON || MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.PLEROMA)) {
//Add Public ART
ManageTimelines manageArt = new ManageTimelines();
manageArt.setDisplayed(true);

View File

@ -2224,7 +2224,7 @@ public class API {
public InstanceNodeInfo displayNodeInfo(String domain) {
if( domain == null) {
if (domain == null) {
return null;
}
String response;

View File

@ -51,14 +51,6 @@ public class Attachment implements Parcelable {
}
public int getViewId() {
return viewId;
}
public void setViewId(int viewId) {
this.viewId = viewId;
}
protected Attachment(Parcel in) {
this.id = in.readString();
this.viewId = in.readInt();
@ -72,6 +64,14 @@ public class Attachment implements Parcelable {
this.local_path = in.readString();
}
public int getViewId() {
return viewId;
}
public void setViewId(int viewId) {
this.viewId = viewId;
}
public String getId() {
return id;
}

View File

@ -128,6 +128,7 @@ public abstract class BaseNotificationsListAdapter extends RecyclerView.Adapter<
private final Object lock = new Object();
protected Context context;
protected Status status;
private List<Notification> notifications;
private BaseNotificationsListAdapter notificationsListAdapter;
private int behaviorWithAttachments;
@ -135,7 +136,6 @@ public abstract class BaseNotificationsListAdapter extends RecyclerView.Adapter<
private NotificationsListAdapter.ViewHolder holder;
private int style;
private RecyclerView mRecyclerView;
protected Status status;
private Runnable updateAnimatedEmoji = new Runnable() {
@Override
public void run() {
@ -371,7 +371,7 @@ public abstract class BaseNotificationsListAdapter extends RecyclerView.Adapter<
holder.spark_button_reblog.setImageSize((int) (20 * iconSizePercent / 100 * scale + 0.5f));
holder.spark_button_reblog.setMinimumWidth((int) Helper.convertDpToPixel(((float) (20 * iconSizePercent) / 100 * scale + 0.5f), context));
status = notification.getStatus();
status = notification.getStatus();
if (status != null) {
if (status.getMedia_attachments() == null || status.getMedia_attachments().size() < 1)
holder.status_document_container.setVisibility(View.GONE);
@ -1290,6 +1290,8 @@ public abstract class BaseNotificationsListAdapter extends RecyclerView.Adapter<
}
}
protected abstract void notificationStatusChart();
class ViewHolder extends RecyclerView.ViewHolder {
FrameLayout card_status_container;
@ -1413,6 +1415,4 @@ public abstract class BaseNotificationsListAdapter extends RecyclerView.Adapter<
}
}
}
protected abstract void notificationStatusChart();
}

View File

@ -110,6 +110,7 @@ import java.util.TimerTask;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import app.fedilab.android.BuildConfig;
import app.fedilab.android.R;
import app.fedilab.android.activities.AccountReportActivity;
import app.fedilab.android.activities.BaseActivity;
@ -204,10 +205,11 @@ public abstract class BaseStatusListAdapter extends RecyclerView.Adapter<Recycle
protected Context context;
protected Status status;
protected ViewHolder holder;
protected RetrieveFeedsAsyncTask.Type type;
protected int style;
private List<Status> statuses;
private boolean isOnWifi;
private BaseStatusListAdapter statusListAdapter;
protected RetrieveFeedsAsyncTask.Type type;
private String targetedId;
private int conversationPosition;
private boolean redraft;
@ -227,7 +229,6 @@ public abstract class BaseStatusListAdapter extends RecyclerView.Adapter<Recycle
private List<Emojis> emojisPicker;
private Status statusForQuickReply;
private String instanceType;
private Runnable updateAnimatedEmoji = new Runnable() {
@Override
public void run() {
@ -245,7 +246,6 @@ public abstract class BaseStatusListAdapter extends RecyclerView.Adapter<Recycle
}
};
private Handler mHandler = new Handler();
protected int style;
public BaseStatusListAdapter(StatusDrawerParams statusDrawerParams) {
statuses = statusDrawerParams.getStatuses();
@ -576,7 +576,11 @@ public abstract class BaseStatusListAdapter extends RecyclerView.Adapter<Recycle
return COMPACT_STATUS;
} else {
if (instanceType == null || instanceType.compareTo("NITTER") != 0) {
return statuses.get(position).getViewType();
if(BuildConfig.lite) {
return COMPACT_STATUS;
}else{
return statuses.get(position).getViewType();
}
} else {
return COMPACT_STATUS;
}
@ -614,7 +618,7 @@ public abstract class BaseStatusListAdapter extends RecyclerView.Adapter<Recycle
holder = (ViewHolder) viewHolder;
holder.startUpdateTimer();
status = statuses.get(i);
status = statuses.get(i);
if (status == null)
@ -3017,7 +3021,9 @@ public abstract class BaseStatusListAdapter extends RecyclerView.Adapter<Recycle
}
protected abstract void statusAddReactionClick();
protected abstract void notificationCharts();
private void loadAttachments(final Status status, final ViewHolder holder, boolean blur) {
@ -3903,6 +3909,8 @@ public abstract class BaseStatusListAdapter extends RecyclerView.Adapter<Recycle
}
protected class ViewHolder extends RecyclerView.ViewHolder {
public ImageView status_add_reaction;
public MastalabAutoCompleteTextView fake_edittext;
LinearLayout status_content_container;
LinearLayout status_spoiler_container;
CustomTextView status_spoiler;
@ -3971,7 +3979,6 @@ public abstract class BaseStatusListAdapter extends RecyclerView.Adapter<Recycle
Button status_show_more_content;
SparkButton spark_button_fav, spark_button_reblog;
RelativeLayout horizontal_second_image;
LinearLayout status_peertube_container;
TextView status_peertube_reply, status_peertube_delete, show_more_content;
ImageView cached_status, status_account_bot;
@ -3986,11 +3993,8 @@ public abstract class BaseStatusListAdapter extends RecyclerView.Adapter<Recycle
//Poll
LinearLayout poll_container, single_choice, multiple_choice, rated;
RadioGroup radio_group;
TextView number_votes, remaining_time;
Button submit_vote, refresh_poll;
MastalabAutoCompleteTextView quick_reply_text;
ImageView quick_reply_switch_to_full;
TextView toot_space_left, warning_message;
@ -4002,12 +4006,9 @@ public abstract class BaseStatusListAdapter extends RecyclerView.Adapter<Recycle
LinearLayout main_linear_container;
View translation_border_view;
TextView translation_label;
LinearLayout status_reactions;
public ImageView status_add_reaction;
ImageView status_add_custom_emoji;
RecyclerView reactions_view;
public MastalabAutoCompleteTextView fake_edittext;
@SuppressLint("SetJavaScriptEnabled")
ViewHolder(View itemView) {

View File

@ -112,7 +112,7 @@ public class SliderAdapter extends SliderViewAdapter<SliderAdapter.SliderAdapter
intent.putExtras(b);
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
ActivityOptionsCompat options = ActivityOptionsCompat
.makeSceneTransitionAnimation((Activity) contextWeakReference.get(), viewHolder.imageViewBackground, attachments.get((position)).getUrl());
.makeSceneTransitionAnimation(contextWeakReference.get(), viewHolder.imageViewBackground, attachments.get((position)).getUrl());
// start the new activity
contextWeakReference.get().startActivity(intent, options.toBundle());
} else {

View File

@ -134,7 +134,6 @@ import com.tonyodev.fetch2core.DownloadBlock;
import net.gotev.uploadservice.UploadService;
import net.gotev.uploadservice.okhttp.OkHttpStack;
import org.jetbrains.annotations.NotNull;
import java.io.ByteArrayInputStream;
@ -156,7 +155,6 @@ import java.net.PasswordAuthentication;
import java.net.Proxy;
import java.net.URISyntaxException;
import java.nio.channels.FileChannel;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@ -1558,6 +1556,15 @@ public class BaseHelper {
partnerShipItem.setVisible(false);
}
}
if (BuildConfig.lite) {
menu.findItem(R.id.nav_archive).setVisible(false);
menu.findItem(R.id.nav_archive_notifications).setVisible(false);
menu.findItem(R.id.nav_who_to_follow).setVisible(false);
menu.findItem(R.id.nav_how_to).setVisible(false);
menu.findItem(R.id.nav_partnership).setVisible(false);
menu.findItem(R.id.nav_news).setVisible(false);
menu.findItem(R.id.nav_trends).setVisible(false);
}
}
/**
@ -3171,7 +3178,6 @@ public class BaseHelper {
}
public static String compressImagePath(Context context, android.net.Uri uriFile) {
ContentResolver cr = context.getContentResolver();

View File

@ -29,7 +29,6 @@ import app.fedilab.android.client.API;
import app.fedilab.android.client.Entities.Account;
import app.fedilab.android.client.Entities.Status;
import app.fedilab.android.client.Entities.StoredStatus;
import app.fedilab.android.helper.Helper;
import app.fedilab.android.sqlite.AccountDAO;
import app.fedilab.android.sqlite.BoostScheduleDAO;
import app.fedilab.android.sqlite.Sqlite;

View File

@ -29,7 +29,6 @@ import app.fedilab.android.client.API;
import app.fedilab.android.client.Entities.Account;
import app.fedilab.android.client.Entities.Status;
import app.fedilab.android.client.Entities.StoredStatus;
import app.fedilab.android.helper.Helper;
import app.fedilab.android.sqlite.AccountDAO;
import app.fedilab.android.sqlite.Sqlite;
import app.fedilab.android.sqlite.StatusStoredDAO;

View File

@ -13,6 +13,7 @@ package app.fedilab.android.services;
*
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
* see <http://www.gnu.org/licenses>. */
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@ -23,17 +24,19 @@ public class UpgradeReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if( intent.getAction() != null && intent.getAction().compareTo(Intent.ACTION_MY_PACKAGE_REPLACED) == 0) {
if (intent.getAction() != null && intent.getAction().compareTo(Intent.ACTION_MY_PACKAGE_REPLACED) == 0) {
Intent streamingServiceIntent = new Intent(context, LiveNotificationDelayedService.class);
streamingServiceIntent.putExtra("stop", true);
try {
context.startService(streamingServiceIntent);
} catch (Exception ignored) {}
} catch (Exception ignored) {
}
streamingServiceIntent = new Intent(context, LiveNotificationService.class);
streamingServiceIntent.putExtra("stop", true);
try {
context.startService(streamingServiceIntent);
} catch (Exception ignored) {}
} catch (Exception ignored) {
}
}
}
}