Some fixes

This commit is contained in:
Thomas 2020-07-14 17:25:10 +02:00
parent a60f29f55a
commit 188eb2fd3d
33 changed files with 242 additions and 1088 deletions

View File

@ -57,16 +57,16 @@ android {
sourceSets {
playstore {
manifest.srcFile "src/main/AndroidManifest.xml"
manifest.srcFile "src/common/AndroidManifest.xml"
java.srcDirs = ['src/main/java', 'src/playstore/java','src/common/java']
}
fdroid {
manifest.srcFile "src/main/AndroidManifest.xml"
manifest.srcFile "src/common/AndroidManifest.xml"
java.srcDirs = ['src/main/java', 'src/fdroid/java','src/common/java']
}
lite {
manifest.srcFile "src/lite/AndroidManifest.xml"
manifest.srcFile "src/main/AndroidManifest.xml"
java.srcDirs = ['src/main/java', 'src/lite/java']
}
}
@ -134,7 +134,7 @@ dependencies {
implementation "com.tonyodev.fetch2:fetch2:2.3.6"
implementation 'jp.wasabeef:glide-transformations:4.0.0'
api 'com.theartofdev.edmodo:android-image-cropper:2.8.+'
implementation 'com.jaredrummler:cyanea:1.0.2'
implementation "net.gotev:uploadservice:3.5.2"
@ -159,6 +159,7 @@ dependencies {
//Flavors
//Playstore
playstoreApi 'com.theartofdev.edmodo:android-image-cropper:2.8.+'
playstoreImplementation "io.github.kobakei:ratethisapp:1.2.0"
playstoreImplementation "org.conscrypt:conscrypt-android:2.4.0"
playstoreImplementation 'com.github.stom79:country-picker-android:1.2.0'
@ -167,6 +168,7 @@ dependencies {
//Fdroid
fdroidApi 'com.theartofdev.edmodo:android-image-cropper:2.8.+'
fdroidImplementation "org.conscrypt:conscrypt-android:2.4.0"
fdroidImplementation 'com.github.stom79:country-picker-android:1.2.0'
fdroidImplementation 'com.vanniktech:emoji-one:0.6.0'

View File

@ -20,25 +20,6 @@
android:installLocation="auto">
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission
android:name="android.permission.ACCESS_COARSE_LOCATION"
tools:node="remove" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<application
android:name="app.fedilab.android.activities.MainApplication"
android:requestLegacyExternalStorage="true"
@ -53,328 +34,10 @@
android:usesCleartextTraffic="true"
tools:replace="android:allowBackup">
<service
android:name="app.fedilab.android.services.LiveNotificationDelayedService"
android:exported="false" />
<service
android:name="app.fedilab.android.services.LiveNotificationService"
android:exported="false" />
<service
android:name="app.fedilab.android.services.BackupStatusService"
android:exported="false" />
<service
android:name="app.fedilab.android.services.BackupStatusInDataBaseService"
android:exported="false" />
<service
android:name="app.fedilab.android.services.BackupNotificationInDataBaseService"
android:exported="false" />
<receiver android:name=".services.UpgradeReceiver">
<intent-filter>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
</intent-filter>
</receiver>
<receiver
android:name="app.fedilab.android.services.RestartLiveNotificationReceiver"
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<receiver
android:name="app.fedilab.android.services.PeertubeUploadReceiver"
android:exported="false">
<intent-filter>
<action android:name="app.fedilab.android.uploadservice.broadcast.status" />
</intent-filter>
</receiver>
<receiver
android:name="app.fedilab.android.services.StopLiveNotificationReceiver"
android:exported="false">
<intent-filter>
<action android:name="StopLiveNotificationReceiver" />
</intent-filter>
</receiver>
<receiver
android:name="app.fedilab.android.services.StopDelayedNotificationReceiver"
android:exported="false">
<intent-filter>
<action android:name="StopDelayedNotificationReceiver" />
</intent-filter>
</receiver>
<service
android:name="app.fedilab.android.services.StreamingHomeTimelineService"
android:exported="false" />
<service
android:name="app.fedilab.android.services.StreamingFederatedTimelineService"
android:exported="false" />
<service
android:name="app.fedilab.android.services.StreamingLocalTimelineService"
android:exported="false" />
<activity
android:name="app.fedilab.android.activities.MainActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name"
android:launchMode="singleTask"
android:theme="@style/AppThemeDark_NoActionBar"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
<data android:mimeType="video/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
<data android:mimeType="video/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- The app is a good candidate for URL in https://domain.name/@xxxxxx-->
<!-- It should cover every URLs for statuses but some others not related to mastodon matching this scheme -->
<data
android:host="*"
android:pathPrefix="/@"
android:scheme="https" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" />
<data android:mimeType="*/*" />
<data android:host="*" />
<data android:pathPattern=".*\\.fedilab" />
</intent-filter>
</activity>
<activity-alias
android:name=".activities.MainActivity.Bubbles"
android:enabled="true"
android:icon="@mipmap/ic_launcher_bubbles"
android:roundIcon="@mipmap/ic_launcher_bubbles_round"
android:targetActivity=".activities.MainActivity">
<meta-data
android:name="icon"
android:value="bubbles" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
<activity-alias
android:name=".activities.MainActivity.Fediverse"
android:enabled="false"
android:icon="@mipmap/ic_launcher_fediverse"
android:roundIcon="@mipmap/ic_launcher_fediverse_round"
android:targetActivity=".activities.MainActivity">
<meta-data
android:name="icon"
android:value="fediverse" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
<activity-alias
android:name=".activities.MainActivity.Hero"
android:enabled="false"
android:icon="@mipmap/ic_launcher_hero"
android:roundIcon="@mipmap/ic_launcher_hero_round"
android:targetActivity=".activities.MainActivity">
<meta-data
android:name="icon"
android:value="hero" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
<activity-alias
android:name=".activities.MainActivity.Atom"
android:enabled="false"
android:icon="@mipmap/ic_launcher_atom"
android:roundIcon="@mipmap/ic_launcher_atom_round"
android:targetActivity=".activities.MainActivity">
<meta-data
android:name="icon"
android:value="atom" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
<activity-alias
android:name=".activities.MainActivity.BrainCrash"
android:enabled="false"
android:icon="@mipmap/ic_launcher_crash"
android:roundIcon="@mipmap/ic_launcher_crash_round"
android:targetActivity=".activities.MainActivity">
<meta-data
android:name="icon"
android:value="braincrash" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
<activity-alias
android:name=".activities.MainActivity.Mastalab"
android:enabled="false"
android:icon="@mipmap/ic_launcher_mastalab"
android:roundIcon="@mipmap/ic_launcher_mastalab_round"
android:targetActivity=".activities.MainActivity">
<meta-data
android:name="icon"
android:value="mastalab" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
<activity
android:name="app.fedilab.android.activities.MastodonRegisterActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.PeertubeRegisterActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.MastodonShareRegisterActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="fedilab.app"
android:pathPattern="/registration_helper/.*"
android:scheme="https" />
</intent-filter>
</activity>
<activity
android:name="app.fedilab.android.activities.LoginActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="backtomastalab"
android:scheme="mastalab" />
</intent-filter>
</activity>
<activity
android:name="app.fedilab.android.activities.ShowAccountActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:theme="@style/AppThemeDark_NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.TootInfoActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.HashTagActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:theme="@style/AppThemeDark_NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.WebviewConnectActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name" />
<activity
android:name="app.fedilab.android.activities.PeertubeActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name" />
<activity
android:name="app.fedilab.android.activities.PlaylistsActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name"
android:theme="@style/AppThemeDark_NoActionBar" />
<activity
android:name="app.fedilab.android.activities.PhotoEditorActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name" />
<activity
android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
android:theme="@style/Base.Theme.AppCompat" />
<activity
android:name="app.fedilab.android.activities.WebviewActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name" />
<activity
android:name="app.fedilab.android.activities.SlideMediaActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name"
android:launchMode="singleTask"
android:noHistory="true"
android:theme="@style/TransparentDark" />
<activity
android:name="app.fedilab.android.activities.SearchResultActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.SearchResultTabActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.ListActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:theme="@style/AppThemeDark_NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.WhoToFollowActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:theme="@style/AppThemeDark_NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.ShowConversationActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:theme="@style/AppThemeDark_NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.OwnerStatusActivity"
android:configChanges="orientation|screenSize"
@ -401,137 +64,5 @@
android:launchMode="singleTask"
android:theme="@style/AppThemeDark_NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.AboutActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.BookmarkActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:theme="@style/AppThemeDark_NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.SettingsActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:launchMode="singleTop"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.AdminActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.AccountReportActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.ReorderTimelinesActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.PartnerShipActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.InstanceActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.PrivacyActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.TootActivity"
android:configChanges="orientation|screenSize"
android:fitsSystemWindows="true"
android:label="@string/app_name"
android:launchMode="singleTop"
android:theme="@style/AppThemeDark"
android:windowSoftInputMode="adjustResize" />
<activity
android:name="app.fedilab.android.activities.PixelfedComposeActivity"
android:configChanges="orientation|screenSize"
android:fitsSystemWindows="true"
android:label="@string/app_name"
android:launchMode="singleTop"
android:theme="@style/AppThemeDark"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.EditProfileActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.CustomSharingActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.InstanceHealthActivity"
android:excludeFromRecents="true"
android:theme="@style/Base.V7.Theme.AppCompat.Dialog" />
<activity
android:name="app.fedilab.android.activities.InstanceProfileActivity"
android:excludeFromRecents="true"
android:theme="@style/Base.V7.Theme.AppCompat.Dialog" />
<activity
android:name="app.fedilab.android.activities.ProxyActivity"
android:excludeFromRecents="true"
android:theme="@style/Base.V7.Theme.AppCompat.Dialog" />
<activity
android:name="app.fedilab.android.activities.ManageAccountsInListActivity"
android:excludeFromRecents="true"
android:theme="@style/Base.V7.Theme.AppCompat.Dialog"
android:windowSoftInputMode="adjustPan" />
<activity
android:name="app.fedilab.android.activities.TagCacheActivity"
android:excludeFromRecents="true"
android:theme="@style/Base.V7.Theme.AppCompat.Dialog" />
<activity
android:name="app.fedilab.android.activities.PeertubeUploadActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.LiveNotificationSettingsAccountsActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:theme="@style/Base.V7.Theme.AppCompat.Dialog"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.MutedInstanceActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.PeertubeEditUploadActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.GroupActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:theme="@style/AppThemeDark_NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileProvider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
</application>
</manifest>

View File

@ -21,4 +21,13 @@ public class BaseActivity extends AllBaseActivity {
EmojiManager.install(new EmojiOneProvider());
}
protected void launchOwnerStatusesActivity(){
Intent myIntent = new Intent(BaseMainActivity.this, OwnerStatusActivity.class);
startActivity(myIntent);
}
protected void launchOwnerNotificationsActivity(){
Intent myIntent = new Intent(BaseMainActivity.this, OwnerNotificationActivity.class);
startActivity(myIntent);
}
}

View File

@ -13,4 +13,8 @@ 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 {
static {
Helper.installProvider();
}
}

View File

@ -13,4 +13,8 @@ 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 {
static {
Helper.installProvider();
}
}

View File

@ -13,4 +13,8 @@ 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 {
static {
Helper.installProvider();
}
}

View File

@ -13,4 +13,8 @@ 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 {
static {
Helper.installProvider();
}
}

View File

@ -13,4 +13,8 @@ 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 {
static {
Helper.installProvider();
}
}

View File

@ -15,4 +15,7 @@ package app.fedilab.android.services;
* see <http://www.gnu.org/licenses>. */
public class LiveNotificationService extends BaseLiveNotificationService {
static {
Helper.installProvider();
}
}

View File

@ -15,4 +15,7 @@ package app.fedilab.android.services;
* see <http://www.gnu.org/licenses>. */
public class StreamingHomeTimelineService extends BaseStreamingHomeTimelineService {
static {
Helper.installProvider();
}
}

View File

@ -14,4 +14,8 @@ 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 {
static {
Helper.installProvider();
}
}

View File

@ -19,28 +19,7 @@
package="app.fedilab.android"
android:installLocation="auto">
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission
android:name="android.permission.ACCESS_COARSE_LOCATION"
tools:node="remove" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<application
android:name="app.fedilab.android.activities.MainApplication"
android:requestLegacyExternalStorage="true"
android:allowBackup="false"
@ -54,456 +33,6 @@
android:usesCleartextTraffic="true"
tools:replace="android:allowBackup,android:icon, android:label">
<service
android:name="app.fedilab.android.services.LiveNotificationDelayedService"
android:exported="false" />
<service
android:name="app.fedilab.android.services.LiveNotificationService"
android:exported="false" />
<service
android:name="app.fedilab.android.services.BackupStatusService"
android:exported="false" />
<service
android:name="app.fedilab.android.services.BackupStatusInDataBaseService"
android:exported="false" />
<service
android:name="app.fedilab.android.services.BackupNotificationInDataBaseService"
android:exported="false" />
<receiver android:name=".services.UpgradeReceiver">
<intent-filter>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
</intent-filter>
</receiver>
<receiver
android:name="app.fedilab.android.services.RestartLiveNotificationReceiver"
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<receiver
android:name="app.fedilab.android.services.PeertubeUploadReceiver"
android:exported="false">
<intent-filter>
<action android:name="app.fedilab.android.uploadservice.broadcast.status" />
</intent-filter>
</receiver>
<receiver
android:name="app.fedilab.android.services.StopLiveNotificationReceiver"
android:exported="false">
<intent-filter>
<action android:name="StopLiveNotificationReceiver" />
</intent-filter>
</receiver>
<receiver
android:name="app.fedilab.android.services.StopDelayedNotificationReceiver"
android:exported="false">
<intent-filter>
<action android:name="StopDelayedNotificationReceiver" />
</intent-filter>
</receiver>
<service
android:name="app.fedilab.android.services.StreamingHomeTimelineService"
android:exported="false" />
<service
android:name="app.fedilab.android.services.StreamingFederatedTimelineService"
android:exported="false" />
<service
android:name="app.fedilab.android.services.StreamingLocalTimelineService"
android:exported="false" />
<activity
android:name="app.fedilab.android.activities.MainActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name"
android:launchMode="singleTask"
android:theme="@style/AppThemeDark_NoActionBar"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
<data android:mimeType="video/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
<data android:mimeType="video/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- The app is a good candidate for URL in https://domain.name/@xxxxxx-->
<!-- It should cover every URLs for statuses but some others not related to mastodon matching this scheme -->
<data
android:host="*"
android:pathPrefix="/@"
android:scheme="https" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" />
<data android:mimeType="*/*" />
<data android:host="*" />
<data android:pathPattern=".*\\.fedilab" />
</intent-filter>
</activity>
<activity-alias
android:name=".activities.MainActivity.Bubbles"
android:enabled="true"
android:icon="@mipmap/ic_launcher_bubbles"
android:roundIcon="@mipmap/ic_launcher_bubbles_round"
android:targetActivity=".activities.MainActivity">
<meta-data
android:name="icon"
android:value="bubbles" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
<activity-alias
android:name=".activities.MainActivity.Fediverse"
android:enabled="false"
android:icon="@mipmap/ic_launcher_fediverse"
android:roundIcon="@mipmap/ic_launcher_fediverse_round"
android:targetActivity=".activities.MainActivity">
<meta-data
android:name="icon"
android:value="fediverse" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
<activity-alias
android:name=".activities.MainActivity.Hero"
android:enabled="false"
android:icon="@mipmap/ic_launcher_hero"
android:roundIcon="@mipmap/ic_launcher_hero_round"
android:targetActivity=".activities.MainActivity">
<meta-data
android:name="icon"
android:value="hero" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
<activity-alias
android:name=".activities.MainActivity.Atom"
android:enabled="false"
android:icon="@mipmap/ic_launcher_atom"
android:roundIcon="@mipmap/ic_launcher_atom_round"
android:targetActivity=".activities.MainActivity">
<meta-data
android:name="icon"
android:value="atom" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
<activity-alias
android:name=".activities.MainActivity.BrainCrash"
android:enabled="false"
android:icon="@mipmap/ic_launcher_crash"
android:roundIcon="@mipmap/ic_launcher_crash_round"
android:targetActivity=".activities.MainActivity">
<meta-data
android:name="icon"
android:value="braincrash" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
<activity-alias
android:name=".activities.MainActivity.Mastalab"
android:enabled="false"
android:icon="@mipmap/ic_launcher_mastalab"
android:roundIcon="@mipmap/ic_launcher_mastalab_round"
android:targetActivity=".activities.MainActivity">
<meta-data
android:name="icon"
android:value="mastalab" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
<activity
android:name="app.fedilab.android.activities.MastodonRegisterActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.PeertubeRegisterActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.MastodonShareRegisterActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="fedilab.app"
android:pathPattern="/registration_helper/.*"
android:scheme="https" />
</intent-filter>
</activity>
<activity
android:name="app.fedilab.android.activities.LoginActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="backtomastalab"
android:scheme="mastalab" />
</intent-filter>
</activity>
<activity
android:name="app.fedilab.android.activities.ShowAccountActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:theme="@style/AppThemeDark_NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.TootInfoActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.HashTagActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:theme="@style/AppThemeDark_NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.WebviewConnectActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name" />
<activity
android:name="app.fedilab.android.activities.PeertubeActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name" />
<activity
android:name="app.fedilab.android.activities.PlaylistsActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name"
android:theme="@style/AppThemeDark_NoActionBar" />
<activity
android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
android:theme="@style/Base.Theme.AppCompat" />
<activity
android:name="app.fedilab.android.activities.WebviewActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name" />
<activity
android:name="app.fedilab.android.activities.SlideMediaActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name"
android:launchMode="singleTask"
android:noHistory="true"
android:theme="@style/TransparentDark" />
<activity
android:name="app.fedilab.android.activities.SearchResultActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.SearchResultTabActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.ListActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:theme="@style/AppThemeDark_NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.WhoToFollowActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:theme="@style/AppThemeDark_NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.ShowConversationActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:theme="@style/AppThemeDark_NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.AboutActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.BookmarkActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:theme="@style/AppThemeDark_NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.SettingsActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:launchMode="singleTop"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.AdminActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.AccountReportActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.ReorderTimelinesActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.PartnerShipActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.InstanceActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.PrivacyActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.TootActivity"
android:configChanges="orientation|screenSize"
android:fitsSystemWindows="true"
android:label="@string/app_name"
android:launchMode="singleTop"
android:theme="@style/AppThemeDark"
android:windowSoftInputMode="adjustResize" />
<activity
android:name="app.fedilab.android.activities.PixelfedComposeActivity"
android:configChanges="orientation|screenSize"
android:fitsSystemWindows="true"
android:label="@string/app_name"
android:launchMode="singleTop"
android:theme="@style/AppThemeDark"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.EditProfileActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.CustomSharingActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.InstanceHealthActivity"
android:excludeFromRecents="true"
android:theme="@style/Base.V7.Theme.AppCompat.Dialog" />
<activity
android:name="app.fedilab.android.activities.InstanceProfileActivity"
android:excludeFromRecents="true"
android:theme="@style/Base.V7.Theme.AppCompat.Dialog" />
<activity
android:name="app.fedilab.android.activities.ProxyActivity"
android:excludeFromRecents="true"
android:theme="@style/Base.V7.Theme.AppCompat.Dialog" />
<activity
android:name="app.fedilab.android.activities.ManageAccountsInListActivity"
android:excludeFromRecents="true"
android:theme="@style/Base.V7.Theme.AppCompat.Dialog"
android:windowSoftInputMode="adjustPan" />
<activity
android:name="app.fedilab.android.activities.TagCacheActivity"
android:excludeFromRecents="true"
android:theme="@style/Base.V7.Theme.AppCompat.Dialog" />
<activity
android:name="app.fedilab.android.activities.PeertubeUploadActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.LiveNotificationSettingsAccountsActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:theme="@style/Base.V7.Theme.AppCompat.Dialog"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.MutedInstanceActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.PeertubeEditUploadActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.GroupActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:theme="@style/AppThemeDark_NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileProvider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
</application>
</manifest>

View File

@ -14,10 +14,12 @@ 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(){}
}

View File

@ -1,4 +1,16 @@
package app.fedilab.android.jobs;
public class BackupNotificationsSyncJob {
}
/* Copyright 2020 Thomas Schneider
*
* This file is a part of Fedilab
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* 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 {}

View File

@ -1,4 +1,16 @@
package app.fedilab.android.jobs;
public class BackupStatusesSyncJob {
}
/* Copyright 2020 Thomas Schneider
*
* This file is a part of Fedilab
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* 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 {}

View File

@ -1,4 +1,16 @@
package app.fedilab.android.jobs;
public class NotificationsSyncJob {
}
/* Copyright 2020 Thomas Schneider
*
* This file is a part of Fedilab
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* 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 {}

View File

@ -1,4 +1,16 @@
package app.fedilab.android.jobs;
public class ScheduledBoostsSyncJob {
}
/* Copyright 2020 Thomas Schneider
*
* This file is a part of Fedilab
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* 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 {}

View File

@ -1,4 +1,16 @@
package app.fedilab.android.jobs;
public class ScheduledTootsSyncJob {
}
/* Copyright 2020 Thomas Schneider
*
* This file is a part of Fedilab
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* 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 {}

View File

@ -1,4 +1,18 @@
package app.fedilab.android.services;
/* Copyright 2020 Thomas Schneider
*
* This file is a part of Fedilab
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* 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 LiveNotificationService {
public class LiveNotificationService extends BaseLiveNotificationService {
}

View File

@ -1,4 +1,18 @@
package app.fedilab.android.services;
/* Copyright 2020 Thomas Schneider
*
* This file is a part of Fedilab
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* 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 StreamingFederatedTimelineService {
public class StreamingFederatedTimelineService extends BaseStreamingFederatedTimelineService {
}

View File

@ -1,4 +1,18 @@
package app.fedilab.android.services;
/* Copyright 2020 Thomas Schneider
*
* This file is a part of Fedilab
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* 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 StreamingHomeTimelineService {
public class StreamingHomeTimelineService extends BaseStreamingHomeTimelineService {
}

View File

@ -1,4 +1,17 @@
package app.fedilab.android.services;
/* Copyright 2020 Thomas Schneider
*
* This file is a part of Fedilab
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* 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 {
}
public class StreamingLocalTimelineService extends BaseStreamingLocalTimelineService {}

View File

@ -328,10 +328,6 @@
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name"
android:theme="@style/AppThemeDark_NoActionBar" />
<activity
android:name="app.fedilab.android.activities.PhotoEditorActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name" />
<activity
android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
android:theme="@style/Base.Theme.AppCompat" />
@ -375,32 +371,6 @@
android:label="@string/app_name"
android:theme="@style/AppThemeDark_NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.OwnerStatusActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:launchMode="singleTask"
android:theme="@style/AppThemeDark_NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.OwnerNotificationChartsActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:launchMode="singleTask"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.OwnerChartsActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:launchMode="singleTask"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.OwnerNotificationActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:launchMode="singleTask"
android:theme="@style/AppThemeDark_NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="app.fedilab.android.activities.AboutActivity"
android:configChanges="orientation|screenSize"

View File

@ -1439,11 +1439,9 @@ public abstract class BaseMainActivity extends BaseActivity
} else if (extras.getInt(Helper.INTENT_ACTION) == Helper.ADD_USER_INTENT) {
this.recreate();
} else if (extras.getInt(Helper.INTENT_ACTION) == Helper.BACKUP_INTENT) {
Intent myIntent = new Intent(BaseMainActivity.this, OwnerStatusActivity.class);
startActivity(myIntent);
launchOwnerStatusesActivity();
} else if (extras.getInt(Helper.INTENT_ACTION) == Helper.BACKUP_NOTIFICATION_INTENT) {
Intent myIntent = new Intent(BaseMainActivity.this, OwnerNotificationActivity.class);
startActivity(myIntent);
launchOwnerNotificationsActivity();
} else if (extras.getInt(Helper.INTENT_ACTION) == Helper.REDRAW_MENU) {
Helper.hideMenuItem(BaseMainActivity.this, navigationView.getMenu());
} else if (extras.getInt(Helper.INTENT_ACTION) == Helper.SEARCH_TAG) {
@ -1709,8 +1707,7 @@ public abstract class BaseMainActivity extends BaseActivity
// Handle navigation view item clicks here.
int id = item.getItemId();
if (id == R.id.nav_archive) {
Intent myIntent = new Intent(BaseMainActivity.this, OwnerStatusActivity.class);
startActivity(myIntent);
launchOwnerStatusesActivity();
return false;
}
if (id == R.id.nav_trends) {
@ -1721,8 +1718,7 @@ public abstract class BaseMainActivity extends BaseActivity
startActivity(myIntent);
return false;
} else if (id == R.id.nav_archive_notifications) {
Intent myIntent = new Intent(BaseMainActivity.this, OwnerNotificationActivity.class);
startActivity(myIntent);
launchOwnerNotificationsActivity();
return false;
} else if (id == R.id.nav_drag_timelines) {
Intent intent = new Intent(BaseMainActivity.this, ReorderTimelinesActivity.class);
@ -2572,4 +2568,7 @@ public abstract class BaseMainActivity extends BaseActivity
return mNumOfTabs;
}
}
protected abstract void launchOwnerStatusesActivity();
protected abstract void launchOwnerNotificationsActivity();
}

View File

@ -41,14 +41,10 @@ import app.fedilab.android.sqlite.Sqlite;
* backup notifications
*/
public class BackupNotificationsSyncJob extends Job {
public class BaseBackupNotificationsSyncJob extends Job {
public static final String BACKUP_NOTIFICATIONS_SYNC = "job_backup_notification";
static {
Helper.installProvider();
}
public static int schedule(boolean updateCurrent) {
Set<JobRequest> jobRequests = JobManager.instance().getAllJobRequestsForTag(BACKUP_NOTIFICATIONS_SYNC);
@ -58,7 +54,7 @@ public class BackupNotificationsSyncJob extends Job {
int jobRequestschedule = -1;
try {
jobRequestschedule = new JobRequest.Builder(BackupNotificationsSyncJob.BACKUP_NOTIFICATIONS_SYNC)
jobRequestschedule = new JobRequest.Builder(BaseBackupNotificationsSyncJob.BACKUP_NOTIFICATIONS_SYNC)
.setPeriodic(TimeUnit.MINUTES.toMillis(Helper.MINUTES_BETWEEN_BACKUP), TimeUnit.MINUTES.toMillis(5))
.setUpdateCurrent(updateCurrent)
.setRequiredNetworkType(JobRequest.NetworkType.METERED)

View File

@ -40,13 +40,10 @@ import app.fedilab.android.sqlite.Sqlite;
* backup statuses
*/
public class BackupStatusesSyncJob extends Job {
public class BaseBackupStatusesSyncJob extends Job {
public static final String BACKUP_SYNC = "job_backup";
static {
Helper.installProvider();
}
public static int schedule(boolean updateCurrent) {
@ -57,7 +54,7 @@ public class BackupStatusesSyncJob extends Job {
int jobRequestschedule = -1;
try {
jobRequestschedule = new JobRequest.Builder(BackupStatusesSyncJob.BACKUP_SYNC)
jobRequestschedule = new JobRequest.Builder(BaseBackupStatusesSyncJob.BACKUP_SYNC)
.setPeriodic(TimeUnit.MINUTES.toMillis(Helper.MINUTES_BETWEEN_BACKUP), TimeUnit.MINUTES.toMillis(5))
.setUpdateCurrent(updateCurrent)
.setRequiredNetworkType(JobRequest.NetworkType.METERED)

View File

@ -70,14 +70,10 @@ import static app.fedilab.android.helper.Helper.notify_user;
* Notifications refresh job
*/
public class NotificationsSyncJob extends Job {
public class BaseNotificationsSyncJob extends Job {
public static final String NOTIFICATION_REFRESH = "job_notification";
static {
Helper.installProvider();
}
public static int schedule(boolean updateCurrent) {
Set<JobRequest> jobRequests = JobManager.instance().getAllJobRequestsForTag(NOTIFICATION_REFRESH);
@ -87,7 +83,7 @@ public class NotificationsSyncJob extends Job {
int jobRequestschedule = -1;
try {
jobRequestschedule = new JobRequest.Builder(NotificationsSyncJob.NOTIFICATION_REFRESH)
jobRequestschedule = new JobRequest.Builder(BaseNotificationsSyncJob.NOTIFICATION_REFRESH)
.setPeriodic(TimeUnit.MINUTES.toMillis(Helper.MINUTES_BETWEEN_NOTIFICATIONS_REFRESH), TimeUnit.MINUTES.toMillis(5))
.setUpdateCurrent(updateCurrent)
.setRequiredNetworkType(JobRequest.NetworkType.METERED)

View File

@ -40,13 +40,10 @@ import app.fedilab.android.sqlite.Sqlite;
* Scheduled a boost a datetime
*/
public class ScheduledBoostsSyncJob extends Job {
public class BaseScheduledBoostsSyncJob extends Job {
public static final String SCHEDULED_BOOST = "job_scheduled_boost";
static {
Helper.installProvider();
}
public static int schedule(Context context, Status status, long timestampScheduling) {
@ -54,7 +51,7 @@ public class ScheduledBoostsSyncJob extends Job {
long endMs = startMs + TimeUnit.MINUTES.toMillis(5);
SQLiteDatabase db = Sqlite.getInstance(context.getApplicationContext(), Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
int jobId = new JobRequest.Builder(ScheduledBoostsSyncJob.SCHEDULED_BOOST)
int jobId = new JobRequest.Builder(BaseScheduledBoostsSyncJob.SCHEDULED_BOOST)
.setExecutionWindow(startMs, endMs)
.setUpdateCurrent(false)
.setRequiredNetworkType(JobRequest.NetworkType.METERED)

View File

@ -40,13 +40,10 @@ import app.fedilab.android.sqlite.StatusStoredDAO;
* Scheduled a toot a datetime
*/
public class ScheduledTootsSyncJob extends Job {
public class BaseScheduledTootsSyncJob extends Job {
public static final String SCHEDULED_TOOT = "job_scheduled_toot";
static {
Helper.installProvider();
}
public static int schedule(Context context, long id, long timestampScheduling) {
@ -54,7 +51,7 @@ public class ScheduledTootsSyncJob extends Job {
long endMs = startMs + TimeUnit.MINUTES.toMillis(5);
SQLiteDatabase db = Sqlite.getInstance(context.getApplicationContext(), Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
int jobId = new JobRequest.Builder(ScheduledTootsSyncJob.SCHEDULED_TOOT)
int jobId = new JobRequest.Builder(BaseScheduledTootsSyncJob.SCHEDULED_TOOT)
.setExecutionWindow(startMs, endMs)
.setUpdateCurrent(false)
.setRequiredNetworkType(JobRequest.NetworkType.METERED)

View File

@ -82,7 +82,7 @@ import static app.fedilab.android.helper.Helper.getNotificationIcon;
* Manage service for streaming api and new notifications
*/
public class LiveNotificationService extends Service implements NetworkStateReceiver.NetworkStateReceiverListener {
public abstract class BaseLiveNotificationService extends Service implements NetworkStateReceiver.NetworkStateReceiverListener {
public static String CHANNEL_ID = "live_notifications";
public static int totalAccount = 0;
@ -90,9 +90,6 @@ public class LiveNotificationService extends Service implements NetworkStateRece
private static HashMap<String, String> lastNotification = new HashMap<>();
private static HashMap<String, WebSocket> webSocketFutures = new HashMap<>();
static {
Helper.installProvider();
}
protected Account account;
private NetworkStateReceiver networkStateReceiver;
@ -115,7 +112,7 @@ public class LiveNotificationService extends Service implements NetworkStateRece
((NotificationManager) Objects.requireNonNull(getSystemService(Context.NOTIFICATION_SERVICE))).createNotificationChannel(channel);
}
SQLiteDatabase db = Sqlite.getInstance(getApplicationContext(), Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
List<Account> accountStreams = new AccountDAO(LiveNotificationService.this, db).getAllAccountCrossAction();
List<Account> accountStreams = new AccountDAO(BaseLiveNotificationService.this, db).getAllAccountCrossAction();
totalAccount = 0;
if (accountStreams != null) {
for (Account account : accountStreams) {
@ -128,16 +125,16 @@ public class LiveNotificationService extends Service implements NetworkStateRece
}
}
if (Build.VERSION.SDK_INT >= 26) {
Intent myIntent = new Intent(LiveNotificationService.this, MainActivity.class);
Intent myIntent = new Intent(BaseLiveNotificationService.this, MainActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(
LiveNotificationService.this,
BaseLiveNotificationService.this,
0,
myIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
android.app.Notification notification = new NotificationCompat.Builder(this, CHANNEL_ID)
.setContentTitle(getString(R.string.top_notification))
.setContentIntent(pendingIntent)
.setSmallIcon(getNotificationIcon(LiveNotificationService.this))
.setSmallIcon(getNotificationIcon(BaseLiveNotificationService.this))
.setContentText(getString(R.string.top_notification_message, String.valueOf(totalAccount), String.valueOf(eventsCount))).build();
if (notification != null) {
@ -161,7 +158,7 @@ public class LiveNotificationService extends Service implements NetworkStateRece
boolean liveNotifications = sharedpreferences.getBoolean(Helper.SET_LIVE_NOTIFICATIONS, true);
SQLiteDatabase db = Sqlite.getInstance(getApplicationContext(), Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
if (liveNotifications) {
List<Account> accountStreams = new AccountDAO(LiveNotificationService.this, db).getAllAccountCrossAction();
List<Account> accountStreams = new AccountDAO(BaseLiveNotificationService.this, db).getAllAccountCrossAction();
if (accountStreams != null) {
for (final Account accountStream : accountStreams) {
if (accountStream.getSocial() == null || accountStream.getSocial().equals("MASTODON") || accountStream.getSocial().equals("PLEROMA")) {
@ -319,7 +316,7 @@ public class LiveNotificationService extends Service implements NetworkStateRece
((NotificationManager) Objects.requireNonNull(getSystemService(Context.NOTIFICATION_SERVICE))).createNotificationChannel(channel);
android.app.Notification notificationChannel = new NotificationCompat.Builder(this, CHANNEL_ID)
.setContentTitle(getString(R.string.top_notification))
.setSmallIcon(getNotificationIcon(LiveNotificationService.this))
.setSmallIcon(getNotificationIcon(BaseLiveNotificationService.this))
.setContentText(getString(R.string.top_notification_message, String.valueOf(totalAccount), String.valueOf(eventsCount))).build();
if (notificationChannel != null) {
startForeground(1, notificationChannel);
@ -329,10 +326,10 @@ public class LiveNotificationService extends Service implements NetworkStateRece
}
event = Helper.EventStreaming.NOTIFICATION;
notification = API.parseNotificationResponse(LiveNotificationService.this, new JSONObject(response.get("payload").toString()));
notification = API.parseNotificationResponse(BaseLiveNotificationService.this, new JSONObject(response.get("payload").toString()));
b.putParcelable("data", notification);
boolean liveNotifications = sharedpreferences.getBoolean(Helper.SET_LIVE_NOTIFICATIONS, true);
boolean canNotify = Helper.canNotify(LiveNotificationService.this);
boolean canNotify = Helper.canNotify(BaseLiveNotificationService.this);
boolean notify = sharedpreferences.getBoolean(Helper.SET_NOTIFY, true);
String targeted_account = null;
Helper.NotifType notifType = Helper.NotifType.MENTION;
@ -445,7 +442,7 @@ public class LiveNotificationService extends Service implements NetworkStateRece
default:
}
//Some others notification
final Intent intent = new Intent(LiveNotificationService.this, MainActivity.class);
final Intent intent = new Intent(BaseLiveNotificationService.this, MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
intent.putExtra(Helper.INTENT_ACTION, Helper.NOTIFICATION_INTENT);
intent.putExtra(Helper.PREF_KEY_ID, account.getId());
@ -458,7 +455,7 @@ public class LiveNotificationService extends Service implements NetworkStateRece
Helper.NotifType finalNotifType = notifType;
Runnable myRunnable = () -> {
if (finalMessage != null) {
Glide.with(LiveNotificationService.this)
Glide.with(BaseLiveNotificationService.this)
.asBitmap()
.load(notification.getAccount().getAvatar())
.listener(new RequestListener<Bitmap>() {
@ -470,15 +467,15 @@ public class LiveNotificationService extends Service implements NetworkStateRece
@Override
public boolean onLoadFailed(@Nullable GlideException e, Object model, Target target, boolean isFirstResource) {
assert e != null;
Helper.notify_user(LiveNotificationService.this, account, intent, BitmapFactory.decodeResource(getResources(),
getMainLogo(LiveNotificationService.this)), finalNotifType, "@" + notification.getAccount().getAcct(), finalMessage);
Helper.notify_user(BaseLiveNotificationService.this, account, intent, BitmapFactory.decodeResource(getResources(),
getMainLogo(BaseLiveNotificationService.this)), finalNotifType, "@" + notification.getAccount().getAcct(), finalMessage);
return false;
}
})
.into(new CustomTarget<Bitmap>() {
@Override
public void onResourceReady(@NonNull Bitmap resource, Transition<? super Bitmap> transition) {
Helper.notify_user(LiveNotificationService.this, account, intent, resource, finalNotifType, "@" + notification.getAccount().getAcct(), finalMessage);
Helper.notify_user(BaseLiveNotificationService.this, account, intent, resource, finalNotifType, "@" + notification.getAccount().getAcct(), finalMessage);
}
@Override
@ -498,7 +495,7 @@ public class LiveNotificationService extends Service implements NetworkStateRece
intentBC.putExtra("eventStreaming", event);
intentBC.putExtras(b);
b.putParcelable("data", notification);
LocalBroadcastManager.getInstance(LiveNotificationService.this).sendBroadcast(intentBC);
LocalBroadcastManager.getInstance(BaseLiveNotificationService.this).sendBroadcast(intentBC);
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putString(Helper.LAST_NOTIFICATION_MAX_ID + account.getId() + account.getInstance(), notification.getId());
editor.apply();

View File

@ -50,13 +50,9 @@ import app.fedilab.android.sqlite.Sqlite;
* Manage service for streaming api for federated timeline
*/
public class StreamingFederatedTimelineService extends IntentService {
public abstract class BaseStreamingFederatedTimelineService extends IntentService {
static {
Helper.installProvider();
}
protected Account account;
/**
@ -65,12 +61,12 @@ public class StreamingFederatedTimelineService extends IntentService {
* @param name Used to name the worker thread, important only for debugging.
*/
@SuppressWarnings("unused")
public StreamingFederatedTimelineService(String name) {
public BaseStreamingFederatedTimelineService(String name) {
super(name);
}
@SuppressWarnings("unused")
public StreamingFederatedTimelineService() {
public BaseStreamingFederatedTimelineService() {
super("StreamingFederatedTimelineService");
}
@ -83,7 +79,7 @@ public class StreamingFederatedTimelineService extends IntentService {
}
SharedPreferences.Editor editor = sharedpreferences.edit();
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
String instance = sharedpreferences.getString(Helper.PREF_INSTANCE, Helper.getLiveInstance(StreamingFederatedTimelineService.this));
String instance = sharedpreferences.getString(Helper.PREF_INSTANCE, Helper.getLiveInstance(BaseStreamingFederatedTimelineService.this));
editor.putBoolean(Helper.SHOULD_CONTINUE_STREAMING_FEDERATED + userId + instance, true);
editor.apply();
}
@ -97,7 +93,7 @@ public class StreamingFederatedTimelineService extends IntentService {
Account accountStream = null;
if (userId != null) {
SQLiteDatabase db = Sqlite.getInstance(getApplicationContext(), Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
accountStream = new AccountDAO(StreamingFederatedTimelineService.this, db).getUniqAccount(userId, instance);
accountStream = new AccountDAO(BaseStreamingFederatedTimelineService.this, db).getUniqAccount(userId, instance);
}
if (accountStream != null) {
Headers headers = new Headers();
@ -144,14 +140,14 @@ public class StreamingFederatedTimelineService extends IntentService {
Bundle b = new Bundle();
try {
if (response.get("event").toString().equals("update")) {
status = API.parseStatuses(StreamingFederatedTimelineService.this, new JSONObject(response.get("payload").toString()));
status = API.parseStatuses(BaseStreamingFederatedTimelineService.this, new JSONObject(response.get("payload").toString()));
status.setNew(true);
b.putParcelable("data", status);
if (account != null)
b.putString("userIdService", account.getId());
Intent intentBC = new Intent(Helper.RECEIVE_FEDERATED_DATA);
intentBC.putExtras(b);
LocalBroadcastManager.getInstance(StreamingFederatedTimelineService.this).sendBroadcast(intentBC);
LocalBroadcastManager.getInstance(BaseStreamingFederatedTimelineService.this).sendBroadcast(intentBC);
}
} catch (Exception e) {
e.printStackTrace();

View File

@ -50,13 +50,9 @@ import app.fedilab.android.sqlite.Sqlite;
* Manage service for streaming api for home and notifications
*/
public class StreamingHomeTimelineService extends IntentService {
public abstract class BaseStreamingHomeTimelineService extends IntentService {
static {
Helper.installProvider();
}
protected Account account;
/**
@ -65,12 +61,12 @@ public class StreamingHomeTimelineService extends IntentService {
* @param name Used to name the worker thread, important only for debugging.
*/
@SuppressWarnings("unused")
public StreamingHomeTimelineService(String name) {
public BaseStreamingHomeTimelineService(String name) {
super(name);
}
@SuppressWarnings("unused")
public StreamingHomeTimelineService() {
public BaseStreamingHomeTimelineService() {
super("StreamingHomeTimelineService");
}
@ -83,7 +79,7 @@ public class StreamingHomeTimelineService extends IntentService {
}
SharedPreferences.Editor editor = sharedpreferences.edit();
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
String instance = sharedpreferences.getString(Helper.PREF_INSTANCE, Helper.getLiveInstance(StreamingHomeTimelineService.this));
String instance = sharedpreferences.getString(Helper.PREF_INSTANCE, Helper.getLiveInstance(BaseStreamingHomeTimelineService.this));
editor.putBoolean(Helper.SHOULD_CONTINUE_STREAMING_HOME + userId + instance, true);
editor.apply();
}
@ -97,7 +93,7 @@ public class StreamingHomeTimelineService extends IntentService {
Account accountStream = null;
if (userId != null) {
SQLiteDatabase db = Sqlite.getInstance(getApplicationContext(), Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
accountStream = new AccountDAO(StreamingHomeTimelineService.this, db).getUniqAccount(userId, instance);
accountStream = new AccountDAO(BaseStreamingHomeTimelineService.this, db).getUniqAccount(userId, instance);
}
if (accountStream != null) {
Headers headers = new Headers();
@ -144,14 +140,14 @@ public class StreamingHomeTimelineService extends IntentService {
Bundle b = new Bundle();
try {
if (response.get("event").toString().equals("update")) {
status = API.parseStatuses(StreamingHomeTimelineService.this, new JSONObject(response.get("payload").toString()));
status = API.parseStatuses(BaseStreamingHomeTimelineService.this, new JSONObject(response.get("payload").toString()));
status.setNew(true);
b.putParcelable("data", status);
if (account != null)
b.putString("userIdService", account.getId());
Intent intentBC = new Intent(Helper.RECEIVE_HOME_DATA);
intentBC.putExtras(b);
LocalBroadcastManager.getInstance(StreamingHomeTimelineService.this).sendBroadcast(intentBC);
LocalBroadcastManager.getInstance(BaseStreamingHomeTimelineService.this).sendBroadcast(intentBC);
}
} catch (Exception e) {
e.printStackTrace();

View File

@ -50,12 +50,7 @@ import app.fedilab.android.sqlite.Sqlite;
* Manage service for streaming api for local timeline
*/
public class StreamingLocalTimelineService extends IntentService {
static {
Helper.installProvider();
}
public abstract class BaseStreamingLocalTimelineService extends IntentService {
protected Account account;
@ -65,12 +60,12 @@ public class StreamingLocalTimelineService extends IntentService {
* @param name Used to name the worker thread, important only for debugging.
*/
@SuppressWarnings("unused")
public StreamingLocalTimelineService(String name) {
public BaseStreamingLocalTimelineService(String name) {
super(name);
}
@SuppressWarnings("unused")
public StreamingLocalTimelineService() {
public BaseStreamingLocalTimelineService() {
super("StreamingLocalTimelineService");
}
@ -83,7 +78,7 @@ public class StreamingLocalTimelineService extends IntentService {
}
SharedPreferences.Editor editor = sharedpreferences.edit();
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
String instance = sharedpreferences.getString(Helper.PREF_INSTANCE, Helper.getLiveInstance(StreamingLocalTimelineService.this));
String instance = sharedpreferences.getString(Helper.PREF_INSTANCE, Helper.getLiveInstance(BaseStreamingLocalTimelineService.this));
editor.putBoolean(Helper.SHOULD_CONTINUE_STREAMING_LOCAL + userId + instance, true);
editor.apply();
}
@ -97,7 +92,7 @@ public class StreamingLocalTimelineService extends IntentService {
Account accountStream = null;
if (userId != null) {
SQLiteDatabase db = Sqlite.getInstance(getApplicationContext(), Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
accountStream = new AccountDAO(StreamingLocalTimelineService.this, db).getUniqAccount(userId, instance);
accountStream = new AccountDAO(BaseStreamingLocalTimelineService.this, db).getUniqAccount(userId, instance);
}
if (accountStream != null) {
@ -144,14 +139,14 @@ public class StreamingLocalTimelineService extends IntentService {
Bundle b = new Bundle();
try {
if (response.get("event").toString().equals("update")) {
status = API.parseStatuses(StreamingLocalTimelineService.this, new JSONObject(response.get("payload").toString()));
status = API.parseStatuses(BaseStreamingLocalTimelineService.this, new JSONObject(response.get("payload").toString()));
status.setNew(true);
b.putParcelable("data", status);
if (account != null)
b.putString("userIdService", account.getId());
Intent intentBC = new Intent(Helper.RECEIVE_LOCAL_DATA);
intentBC.putExtras(b);
LocalBroadcastManager.getInstance(StreamingLocalTimelineService.this).sendBroadcast(intentBC);
LocalBroadcastManager.getInstance(BaseStreamingLocalTimelineService.this).sendBroadcast(intentBC);
}
} catch (Exception e) {
e.printStackTrace();