Upgrade for Android 14+

This commit is contained in:
Thomas 2023-12-12 15:47:15 +01:00
parent 4c911705ab
commit 4a07e7c5b8
31 changed files with 156 additions and 89 deletions

View File

@ -8,11 +8,11 @@ plugins {
}
def flavor
android {
compileSdk 33
compileSdk 34
defaultConfig {
minSdk 21
targetSdk 33
targetSdk 34
versionCode 500
versionName "3.24.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@ -30,8 +30,8 @@ android {
}
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
productFlavors {
fdroid {
@ -47,10 +47,6 @@ android {
flavor = "playstore"
}
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
buildFeatures {
viewBinding true
}
@ -91,6 +87,11 @@ android {
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel-ktx'
}
}
namespace 'app.fedilab.android'
lint {
abortOnError false
checkReleaseBuilds false
}
}
allprojects {
repositories {
@ -102,7 +103,7 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'com.google.android.material:material:1.10.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
@ -111,7 +112,7 @@ dependencies {
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.retrofit2:converter-simplexml:2.9.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'androidx.preference:preference:1.2.0'
implementation 'androidx.preference:preference:1.2.1'
implementation "org.conscrypt:conscrypt-android:2.5.2"
implementation 'com.vanniktech:emoji-one:0.6.0'
implementation 'com.github.GrenderG:Toasty:1.5.2'
@ -138,18 +139,18 @@ dependencies {
annotationProcessor "com.github.bumptech.glide:compiler:4.12.0"
implementation 'jp.wasabeef:glide-transformations:4.3.0'
implementation 'com.github.penfeizhou.android.animation:glide-plugin:2.23.0'
implementation 'com.google.android.exoplayer:exoplayer:2.18.4'
implementation 'com.google.android.exoplayer:exoplayer:2.19.1'
implementation "androidx.viewpager2:viewpager2:1.0.0"
implementation 'com.github.piasy:rxandroidaudio:1.7.0'
implementation 'com.github.piasy:AudioProcessor:1.7.0'
implementation "androidx.work:work-runtime:2.7.1"
implementation "androidx.work:work-runtime:2.9.0"
implementation 'app.futured.hauler:hauler:5.0.0'
implementation "com.github.chrisbanes:PhotoView:2.3.0"
implementation "ch.acra:acra-mail:5.9.6"
implementation "ch.acra:acra-limiter:5.9.3"
implementation "ch.acra:acra-dialog:5.9.6"
implementation "com.madgag.spongycastle:bctls-jdk15on:1.58.0.0"
implementation 'com.github.UnifiedPush:android-connector:2.1.1'
implementation 'com.github.UnifiedPush:android-connector:2.2.0'
// implementation 'com.github.UnifiedPush:android-foss_embedded_fcm_distributor:1.0.0-beta1'
playstoreImplementation('com.github.UnifiedPush:android-embedded_fcm_distributor:2.2.0') {
exclude group: 'com.google.firebase', module: 'firebase-core'
@ -159,29 +160,29 @@ dependencies {
implementation 'com.burhanrashid52:photoeditor:1.5.1'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
implementation 'androidx.lifecycle:lifecycle-livedata:2.5.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel:2.5.1'
implementation 'androidx.navigation:navigation-fragment:2.5.3'
implementation 'androidx.navigation:navigation-ui:2.5.3'
implementation 'androidx.lifecycle:lifecycle-livedata:2.6.2'
implementation 'androidx.lifecycle:lifecycle-viewmodel:2.6.2'
implementation 'androidx.navigation:navigation-fragment:2.7.5'
implementation 'androidx.navigation:navigation-ui:2.7.5'
testImplementation 'junit:junit:'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
// debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.8.1'
implementation 'com.r0adkll:slidableactivity:2.1.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation "androidx.fragment:fragment:1.5.5"
implementation "androidx.fragment:fragment:1.6.2"
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.browser:browser:1.5.0'
implementation 'androidx.browser:browser:1.7.0'
implementation 'androidx.documentfile:documentfile:1.0.1'
implementation 'com.github.amoskorir:avatarimagegenerator:1.5.0'
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
implementation 'com.google.android.exoplayer:extension-mediasession:2.18.4'
implementation 'com.google.android.exoplayer:extension-mediasession:2.19.1'
implementation "com.github.mabbas007:TagsEditText:1.0.5"
implementation "net.gotev:uploadservice:4.7.0"
implementation "net.gotev:uploadservice-okhttp:4.7.0"
implementation 'androidx.media:media:1.6.0'
implementation "net.gotev:uploadservice:4.9.2"
implementation "net.gotev:uploadservice-okhttp:4.9.2"
implementation 'androidx.media:media:1.7.0'
implementation 'com.github.mancj:MaterialSearchBar:0.8.5'
implementation 'com.github.vkay94:DoubleTapPlayerView:1.0.0'
@ -197,10 +198,10 @@ dependencies {
//************ CAST **************///
//---> Google libs (google_full)
playstoreImplementation "com.google.android.gms:play-services-cast-tv:19.0.1"
playstoreImplementation "com.google.android.gms:play-services-cast:21.0.1"
playstoreImplementation "androidx.mediarouter:mediarouter:1.3.0"
playstoreImplementation 'com.google.android.gms:play-services-cast-framework:21.0.1'
playstoreImplementation "com.google.android.gms:play-services-cast-tv:21.0.1"
playstoreImplementation "com.google.android.gms:play-services-cast:21.4.0"
playstoreImplementation "androidx.mediarouter:mediarouter:1.6.0"
playstoreImplementation 'com.google.android.gms:play-services-cast-framework:21.4.0'
//----> Other flavors

View File

@ -19,6 +19,7 @@ import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
@ -147,7 +148,11 @@ public abstract class PeertubeBaseMainActivity extends BaseActivity implements C
}
}
};
LocalBroadcastManager.getInstance(PeertubeBaseMainActivity.this).registerReceiver(manage_chromecast, new IntentFilter(Helper.RECEIVE_CAST_SETTINGS));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
registerReceiver(manage_chromecast, new IntentFilter(Helper.RECEIVE_CAST_SETTINGS), Context.RECEIVER_NOT_EXPORTED);
} else {
registerReceiver(manage_chromecast, new IntentFilter(Helper.RECEIVE_CAST_SETTINGS));
}
}
@Override
@ -189,8 +194,7 @@ public abstract class PeertubeBaseMainActivity extends BaseActivity implements C
super.onDestroy();
ChromeCasts.unregisterListener(this);
if (manage_chromecast != null) {
LocalBroadcastManager.getInstance(PeertubeBaseMainActivity.this).unregisterReceiver(manage_chromecast);
unregisterReceiver(manage_chromecast);
new Thread(() -> {
if (chromeCasts != null && chromeCasts.size() > 0) {
for (ChromeCast cast : chromeCasts) {

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="app.fedilab.android">
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
@ -13,6 +12,7 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
<uses-feature
android:name="android.hardware.camera"
@ -576,6 +576,7 @@
<service
android:name=".peertube.services.RetrieveInfoService"
android:foregroundServiceType="dataSync"
android:exported="false" />

View File

@ -1063,6 +1063,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
mamageNewIntent(BaseMainActivity.this, intent);
}
@SuppressLint("UnspecifiedRegisterReceiverFlag")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -1074,7 +1075,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
finish();
return;
} else {
BaseMainActivity.currentToken = sharedpreferences.getString(Helper.PREF_USER_TOKEN, null);
BaseMainActivity.currentToken = sharedpreferences.getString(PREF_USER_TOKEN, null);
}
String software = sharedpreferences.getString(PREF_USER_SOFTWARE, null);
@ -1528,10 +1529,13 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
binding.toolbarSearch.setOnSearchClickListener(v -> binding.tabLayout.setVisibility(View.VISIBLE));
//For receiving data from other activities
LocalBroadcastManager.getInstance(BaseMainActivity.this).registerReceiver(broadcast_data, new IntentFilter(Helper.BROADCAST_DATA));
LocalBroadcastManager.getInstance(BaseMainActivity.this)
.registerReceiver(broadcast_error_message,
new IntentFilter(Helper.INTENT_COMPOSE_ERROR_MESSAGE));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
registerReceiver(broadcast_data, new IntentFilter(Helper.BROADCAST_DATA), Context.RECEIVER_NOT_EXPORTED);
registerReceiver(broadcast_error_message, new IntentFilter(Helper.INTENT_COMPOSE_ERROR_MESSAGE), Context.RECEIVER_NOT_EXPORTED);
} else {
registerReceiver(broadcast_data, new IntentFilter(Helper.BROADCAST_DATA));
registerReceiver(broadcast_error_message, new IntentFilter(Helper.INTENT_COMPOSE_ERROR_MESSAGE));
}
if (emojis == null || !emojis.containsKey(BaseMainActivity.currentInstance) || emojis.get(BaseMainActivity.currentInstance) == null) {
new Thread(() -> {
try {
@ -1859,9 +1863,10 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
@Override
protected void onDestroy() {
LocalBroadcastManager.getInstance(BaseMainActivity.this).unregisterReceiver(broadcast_data);
LocalBroadcastManager.getInstance(BaseMainActivity.this)
.unregisterReceiver(broadcast_error_message);
unregisterReceiver(broadcast_data);
unregisterReceiver(broadcast_error_message);
if (networkStateReceiver != null) {
try {
unregisterReceiver(networkStateReceiver);

View File

@ -204,8 +204,7 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
if (timer != null) {
timer.cancel();
}
LocalBroadcastManager.getInstance(this)
.unregisterReceiver(imageReceiver);
unregisterReceiver(imageReceiver);
}
@ -214,6 +213,7 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
if (binding.recyclerView.getVisibility() == View.VISIBLE) {
storeDraftWarning();
}
super.onBackPressed();
}
private void storeDraftWarning() {
@ -734,10 +734,11 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
}
}
MastodonHelper.loadPPMastodon(binding.profilePicture, account.mastodon_account);
LocalBroadcastManager.getInstance(this)
.registerReceiver(imageReceiver,
new IntentFilter(Helper.INTENT_SEND_MODIFIED_IMAGE));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
registerReceiver(imageReceiver, new IntentFilter(Helper.INTENT_SEND_MODIFIED_IMAGE), android.content.Context.RECEIVER_NOT_EXPORTED);
} else {
registerReceiver(imageReceiver, new IntentFilter(Helper.INTENT_SEND_MODIFIED_IMAGE));
}
if (timer != null) {
timer.scheduleAtFixedRate(new TimerTask() {
@Override

View File

@ -140,7 +140,11 @@ public class MediaActivity extends BaseTransparentActivity implements OnDownload
binding.mediaViewpager.setAdapter(mPagerAdapter);
binding.mediaViewpager.setSaveEnabled(false);
binding.mediaViewpager.setCurrentItem(mediaPosition - 1);
registerReceiver(onDownloadComplete, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
registerReceiver(onDownloadComplete, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE), android.content.Context.RECEIVER_NOT_EXPORTED);
} else {
registerReceiver(onDownloadComplete, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
}
String description = attachments.get(mediaPosition - 1).description;
handler = new Handler();
if (attachments.get(mediaPosition - 1).status != null) {

View File

@ -17,6 +17,7 @@ package app.fedilab.android.mastodon.activities;
import static app.fedilab.android.BaseMainActivity.currentAccount;
import android.app.DownloadManager;
import android.content.BroadcastReceiver;
import android.content.ClipData;
import android.content.ClipboardManager;
@ -27,6 +28,7 @@ import android.content.SharedPreferences;
import android.content.res.ColorStateList;
import android.graphics.drawable.Animatable;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.text.SpannableString;
import android.text.Spanned;
@ -204,7 +206,13 @@ public class ProfileActivity extends BaseActivity {
}
//Check if account is homeMuted
accountsVM.isMuted(currentAccount, account).observe(this, result -> homeMuted = result != null && result);
LocalBroadcastManager.getInstance(ProfileActivity.this).registerReceiver(broadcast_data, new IntentFilter(Helper.BROADCAST_DATA));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
registerReceiver(broadcast_data, new IntentFilter(Helper.BROADCAST_DATA), android.content.Context.RECEIVER_NOT_EXPORTED);
} else {
registerReceiver(broadcast_data, new IntentFilter(Helper.BROADCAST_DATA));
}
}
@ -1266,7 +1274,7 @@ public class ProfileActivity extends BaseActivity {
scheduledExecutorService.shutdownNow();
scheduledExecutorService = null;
}
LocalBroadcastManager.getInstance(ProfileActivity.this).unregisterReceiver(broadcast_data);
unregisterReceiver(broadcast_data);
super.onDestroy();
}

View File

@ -22,6 +22,7 @@ import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Build;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
@ -83,7 +84,13 @@ public class AdminActionActivity extends BaseBarActivity {
binding = ActivityAdminActionsBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
LocalBroadcastManager.getInstance(this).registerReceiver(mReceiver, new IntentFilter(Helper.BROADCAST_DATA));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
registerReceiver(mReceiver, new IntentFilter(Helper.BROADCAST_DATA), android.content.Context.RECEIVER_NOT_EXPORTED);
} else {
registerReceiver(mReceiver, new IntentFilter(Helper.BROADCAST_DATA));
}
if (getSupportActionBar() != null) {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
@ -318,7 +325,7 @@ public class AdminActionActivity extends BaseBarActivity {
protected void onDestroy() {
super.onDestroy();
if (mReceiver != null) {
LocalBroadcastManager.getInstance(this).unregisterReceiver(mReceiver);
unregisterReceiver(mReceiver);
}
}

View File

@ -20,6 +20,7 @@ import static app.fedilab.android.mastodon.activities.ContextActivity.expand;
import android.content.BroadcastReceiver;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Build;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
@ -195,7 +196,12 @@ public class FragmentMastodonContext extends Fragment {
statusesVM.getContext(user_instance, user_token, focusedStatus.id)
.observe(getViewLifecycleOwner(), this::initializeContextView);
}
LocalBroadcastManager.getInstance(requireActivity()).registerReceiver(receive_action, new IntentFilter(Helper.RECEIVE_STATUS_ACTION));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
requireActivity().registerReceiver(receive_action, new IntentFilter(Helper.RECEIVE_STATUS_ACTION), android.content.Context.RECEIVER_NOT_EXPORTED);
} else {
requireActivity().registerReceiver(receive_action, new IntentFilter(Helper.RECEIVE_STATUS_ACTION));
}
return binding.getRoot();
}
@ -292,7 +298,7 @@ public class FragmentMastodonContext extends Fragment {
@Override
public void onDestroyView() {
LocalBroadcastManager.getInstance(requireActivity()).unregisterReceiver(receive_action);
requireActivity().unregisterReceiver(receive_action);
super.onDestroyView();
}

View File

@ -207,8 +207,11 @@ public class FragmentMastodonDirectMessage extends Fragment {
statusCompose.text = binding.text.getText().toString();
onSubmit(prepareDraft(statusCompose, MainActivity.currentInstance, MainActivity.currentUserID));
});
LocalBroadcastManager.getInstance(requireActivity()).registerReceiver(broadcast_data, new IntentFilter(Helper.BROADCAST_DATA));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
requireActivity().registerReceiver(broadcast_data, new IntentFilter(Helper.BROADCAST_DATA), android.content.Context.RECEIVER_NOT_EXPORTED);
} else {
requireActivity().registerReceiver(broadcast_data, new IntentFilter(Helper.BROADCAST_DATA));
}
binding.text.setKeyBoardInputCallbackListener((inputContentInfo, flags, opts) -> {
if (inputContentInfo != null) {
Uri uri = inputContentInfo.getContentUri();
@ -273,7 +276,7 @@ public class FragmentMastodonDirectMessage extends Fragment {
@Override
public void onDestroyView() {
LocalBroadcastManager.getInstance(requireActivity()).unregisterReceiver(broadcast_data);
requireActivity().unregisterReceiver(broadcast_data);
super.onDestroyView();
}

View File

@ -19,6 +19,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.view.LayoutInflater;
@ -205,8 +206,13 @@ public class FragmentMastodonNotification extends Fragment implements Notificati
}
aggregateNotification = false;
LocalBroadcastManager.getInstance(requireActivity()).registerReceiver(receive_action, new IntentFilter(Helper.RECEIVE_STATUS_ACTION));
LocalBroadcastManager.getInstance(requireActivity()).registerReceiver(receive_refresh, new IntentFilter(Helper.RECEIVE_REFRESH_NOTIFICATIONS_ACTION));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
requireActivity().registerReceiver(receive_action, new IntentFilter(Helper.RECEIVE_STATUS_ACTION), android.content.Context.RECEIVER_NOT_EXPORTED);
requireActivity().registerReceiver(receive_refresh, new IntentFilter(Helper.RECEIVE_REFRESH_NOTIFICATIONS_ACTION), android.content.Context.RECEIVER_NOT_EXPORTED);
} else {
requireActivity().registerReceiver(receive_action, new IntentFilter(Helper.RECEIVE_STATUS_ACTION));
requireActivity().registerReceiver(receive_refresh, new IntentFilter(Helper.RECEIVE_REFRESH_NOTIFICATIONS_ACTION));
}
return root;
}
@ -673,8 +679,8 @@ public class FragmentMastodonNotification extends Fragment implements Notificati
@Override
public void onDestroyView() {
LocalBroadcastManager.getInstance(requireActivity()).unregisterReceiver(receive_action);
LocalBroadcastManager.getInstance(requireActivity()).unregisterReceiver(receive_refresh);
requireActivity().unregisterReceiver(receive_action);
requireActivity().unregisterReceiver(receive_refresh);
if (isAdded()) {
storeMarker();
}

View File

@ -23,6 +23,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
@ -453,7 +454,11 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter.
}
LocalBroadcastManager.getInstance(requireActivity()).registerReceiver(receive_action, new IntentFilter(Helper.RECEIVE_STATUS_ACTION));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
requireActivity().registerReceiver(receive_action, new IntentFilter(Helper.RECEIVE_STATUS_ACTION), android.content.Context.RECEIVER_NOT_EXPORTED);
} else {
requireActivity().registerReceiver(receive_action, new IntentFilter(Helper.RECEIVE_STATUS_ACTION));
}
binding = FragmentPaginationBinding.inflate(inflater, container, false);
return binding.getRoot();
}
@ -836,7 +841,7 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter.
storeMarker();
}
try {
LocalBroadcastManager.getInstance(requireActivity()).unregisterReceiver(receive_action);
requireActivity().unregisterReceiver(receive_action);
} catch (Exception ignored) {
}
super.onDestroyView();

View File

@ -1591,12 +1591,16 @@ public class PeertubeActivity extends BasePeertubeActivity implements CommentLis
}
}
};
getApplicationContext().registerReceiver(mPowerKeyReceiver, theFilter);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
registerReceiver(mPowerKeyReceiver, theFilter, android.content.Context.RECEIVER_NOT_EXPORTED);
} else {
registerReceiver(mPowerKeyReceiver, theFilter);
}
}
private void unregisterReceiver() {
if (mPowerKeyReceiver != null) {
getApplicationContext().unregisterReceiver(mPowerKeyReceiver);
unregisterReceiver(mPowerKeyReceiver);
mPowerKeyReceiver = null;
}
}

View File

@ -152,7 +152,7 @@ public class PeertubeMainActivity extends PeertubeBaseMainActivity {
if (!keepRemote) {
typeOfConnection = TypeOfConnection.NORMAL;
}
LocalBroadcastManager.getInstance(PeertubeMainActivity.this).unregisterReceiver(broadcast_data);
unregisterReceiver(broadcast_data);
}
@SuppressLint("ApplySharedPref")
@ -162,9 +162,13 @@ public class PeertubeMainActivity extends PeertubeBaseMainActivity {
super.onCreate(savedInstanceState);
binding = super.binding;
LocalBroadcastManager.getInstance(PeertubeMainActivity.this).registerReceiver(
broadcast_data, new IntentFilter(app.fedilab.android.mastodon.helper.Helper.BROADCAST_DATA)
);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
registerReceiver(broadcast_data, new IntentFilter(app.fedilab.android.mastodon.helper.Helper.BROADCAST_DATA), android.content.Context.RECEIVER_NOT_EXPORTED);
} else {
registerReceiver(broadcast_data, new IntentFilter(app.fedilab.android.mastodon.helper.Helper.BROADCAST_DATA));
}
Intent intentActvity = getIntent();
if (intentActvity != null) {
Bundle extras = intentActvity.getExtras();

View File

@ -51,7 +51,11 @@ public class RetrieveInfoService extends Service implements NetworkStateReceiver
super.onCreate();
networkStateReceiver = new NetworkStateReceiver();
networkStateReceiver.addListener(this);
registerReceiver(networkStateReceiver, new IntentFilter(android.net.ConnectivityManager.CONNECTIVITY_ACTION));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
registerReceiver(networkStateReceiver, new IntentFilter(android.net.ConnectivityManager.CONNECTIVITY_ACTION), android.content.Context.RECEIVER_NOT_EXPORTED);
} else {
registerReceiver(networkStateReceiver, new IntentFilter(android.net.ConnectivityManager.CONNECTIVITY_ACTION));
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
NotificationChannel channel = new NotificationChannel(NOTIFICATION_CHANNEL_ID,
getString(R.string.notification_channel_name),

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="app.fedilab.android">
>
<application android:name=".MainApplication">

View File

@ -18,6 +18,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
namespace 'com.smarteist.autoimageslider'
}

View File

@ -1,6 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.smarteist.autoimageslider">
>
<application
android:allowBackup="true"

View File

@ -6,10 +6,10 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'com.android.tools.build:gradle:8.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.5.3"
classpath 'com.google.gms:google-services:4.3.10'
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.7.5"
classpath 'com.google.gms:google-services:4.4.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}

View File

@ -17,6 +17,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
namespace 'com.jaredrummler.android.colorpicker'
}

View File

@ -1 +1 @@
<manifest package="com.jaredrummler.android.colorpicker" />
<manifest />

View File

@ -17,3 +17,6 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false

View File

@ -1,6 +1,6 @@
#Wed Nov 03 09:29:30 CET 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

View File

@ -6,8 +6,6 @@ android {
defaultConfig {
minSdkVersion 8
targetSdkVersion 33
versionCode 2
versionName "0.2"
}
buildTypes {
release {
@ -15,6 +13,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
namespace 'de.timfreiheit.mathjax.android'
}
dependencies {

View File

@ -1,4 +1,4 @@
<manifest package="de.timfreiheit.mathjax.android">
<manifest>
<application />

View File

@ -23,6 +23,7 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
namespace 'com.github.stom79.mytransl'
}
dependencies {

View File

@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.stom79.mytransl">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
</manifest>

View File

@ -13,6 +13,7 @@ android {
minifyEnabled false
}
}
namespace 'com.kobakei.ratethisapp'
}
dependencies {

View File

@ -1,3 +1,3 @@
<manifest package="com.kobakei.ratethisapp">
<manifest>
</manifest>

View File

@ -8,8 +8,6 @@ android {
defaultConfig {
minSdkVersion 15
targetSdkVersion 33
versionCode 3
versionName "1.0.12"
}
buildTypes {
release {
@ -17,7 +15,8 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
namespace 'com.varunest.sparkbutton'
lint {
abortOnError false
}
}

View File

@ -1,4 +1,4 @@
<manifest package="com.varunest.sparkbutton">
<manifest>
<application />
</manifest>