Skip to content

Commit c95c5ab

Browse files
Merge branch 'master' into snackbar-for-recent-search-deletions
2 parents 99d5420 + 0a0d7e9 commit c95c5ab

File tree

351 files changed

+9009
-9200
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

351 files changed

+9009
-9200
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
- name: Checkout Repository
1414
uses: actions/checkout@v3
1515

16-
- name: Set-up JDK 11
16+
- name: Set-up JDK 17
1717
uses: actions/setup-java@v3
1818
with:
19-
java-version: '11'
19+
java-version: '17'
2020
distribution: 'temurin'
2121

2222
- name: Setup and build with Gradle

.github/workflows/codeql-analysis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ jobs:
2222
- name: Checkout repository
2323
uses: actions/checkout@v3
2424

25+
- name: Set-up JDK 17
26+
uses: actions/setup-java@v3
27+
with:
28+
java-version: '17'
29+
distribution: 'temurin'
30+
2531
- name: Initialize CodeQL
2632
uses: github/codeql-action/init@v2
2733
with:

app/build.gradle

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ plugins {
33
}
44

55
android {
6-
compileSdk 33
6+
compileSdk 34
77
defaultConfig {
88
applicationId "ml.docilealligator.infinityforreddit"
99
minSdk 21
10-
targetSdk 33
11-
versionCode 163
12-
versionName "7.1.0-beta1"
10+
targetSdk 34
11+
versionCode 179
12+
versionName "7.3.0"
1313
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1414
javaCompileOptions {
1515
annotationProcessorOptions {
@@ -50,68 +50,67 @@ android {
5050
}
5151

5252
buildFeatures {
53-
viewBinding true
53+
buildConfig = true
54+
viewBinding = true
5455
}
56+
namespace 'ml.docilealligator.infinityforreddit'
5557
}
5658

5759
dependencies {
5860
/** AndroidX **/
59-
implementation 'androidx.appcompat:appcompat:1.7.0-alpha01'
61+
implementation 'androidx.appcompat:appcompat:1.7.0'
6062
implementation 'androidx.biometric:biometric:1.2.0-alpha05'
61-
implementation 'androidx.browser:browser:1.4.0'
63+
implementation 'androidx.browser:browser:1.8.0'
6264
implementation 'androidx.cardview:cardview:1.0.0'
6365
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
6466
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
65-
def lifecycleVersion = "2.5.1"
67+
implementation 'androidx.activity:activity:1.9.0'
68+
def lifecycleVersion = "2.7.0"
6669
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion"
6770
implementation "androidx.lifecycle:lifecycle-livedata:$lifecycleVersion"
6871
implementation "androidx.lifecycle:lifecycle-process:$lifecycleVersion"
6972
implementation "androidx.lifecycle:lifecycle-runtime:$lifecycleVersion"
7073
implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycleVersion"
7174

72-
def pagingVersion = '3.2.0-alpha03'
75+
def pagingVersion = '3.3.0'
7376
implementation "androidx.paging:paging-runtime:$pagingVersion"
7477
implementation "androidx.paging:paging-guava:$pagingVersion"
75-
implementation 'androidx.preference:preference:1.2.0'
76-
implementation 'androidx.recyclerview:recyclerview:1.2.1'
77-
def roomVersion = "2.4.3"
78+
implementation 'androidx.preference:preference:1.2.1'
79+
implementation 'androidx.recyclerview:recyclerview:1.3.2'
80+
def roomVersion = "2.6.1"
7881
implementation "androidx.room:room-runtime:$roomVersion"
7982
annotationProcessor "androidx.room:room-compiler:$roomVersion"
8083
implementation "androidx.room:room-guava:$roomVersion"
81-
implementation 'androidx.viewpager2:viewpager2:1.1.0-beta01'
82-
implementation 'androidx.work:work-runtime:2.7.1'
83-
implementation 'com.google.android.material:material:1.8.0'
84+
implementation 'androidx.viewpager2:viewpager2:1.1.0'
85+
implementation 'androidx.work:work-runtime:2.9.0'
86+
implementation 'com.google.android.material:material:1.12.0'
8487

8588
/** ExoPlayer **/
86-
def exoplayerVersion = "2.18.2"
87-
implementation "com.google.android.exoplayer:exoplayer-core:$exoplayerVersion"
88-
implementation "com.google.android.exoplayer:exoplayer-dash:$exoplayerVersion"
89-
implementation "com.google.android.exoplayer:exoplayer-hls:$exoplayerVersion"
90-
implementation "com.google.android.exoplayer:exoplayer-ui:$exoplayerVersion"
91-
implementation "com.google.android.exoplayer:exoplayer-smoothstreaming:$exoplayerVersion"
89+
def media3_version = "1.4.0-alpha02"
90+
implementation "androidx.media3:media3-exoplayer:$media3_version"
91+
implementation "androidx.media3:media3-exoplayer-dash:$media3_version"
92+
implementation "androidx.media3:media3-exoplayer-hls:$media3_version"
93+
implementation "androidx.media3:media3-ui:$media3_version"
94+
implementation "androidx.media3:media3-exoplayer-smoothstreaming:$media3_version"
9295

9396
/** Third-party **/
9497

9598
/**** Backend logic ****/
9699

97100
// HTTP clients
98-
def retrofitVersion = "2.9.0"
101+
def retrofitVersion = '2.11.0'
99102
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
100103
implementation "com.squareup.retrofit2:converter-scalars:$retrofitVersion"
101104
implementation "com.squareup.retrofit2:adapter-guava:$retrofitVersion"
102105
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
103106

104107
// Dependency injection
105-
def daggerVersion = '2.40.5'
108+
def daggerVersion = '2.51.1'
106109
implementation "com.google.dagger:dagger:$daggerVersion"
107110
annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
108111

109112
// Binding
110-
// NOTE: Deprecated in favor of viewbinding
111-
def butterknifeVersion = "10.2.3"
112-
implementation "com.jakewharton:butterknife:$butterknifeVersion"
113-
annotationProcessor "com.jakewharton:butterknife-compiler:$butterknifeVersion"
114-
compileOnly 'com.android.databinding:viewbinding:8.3.1'
113+
compileOnly 'com.android.databinding:viewbinding:8.5.1'
115114

116115
// Events
117116
def eventbusVersion = "3.3.1"
@@ -129,13 +128,13 @@ dependencies {
129128

130129
// Object to JSON
131130
// NOTE: Replace with Squareup's Moshi?
132-
implementation 'com.google.code.gson:gson:2.8.9'
131+
implementation 'com.google.code.gson:gson:2.11.0'
133132

134133
// Java library for zip files and streams
135-
implementation 'net.lingala.zip4j:zip4j:2.11.2'
134+
implementation 'net.lingala.zip4j:zip4j:2.11.5'
136135

137136
// IO functionality
138-
implementation 'commons-io:commons-io:2.13.0'
137+
implementation 'commons-io:commons-io:2.16.1'
139138

140139
// Crash reporting
141140
implementation 'com.github.FunkyMuse:Crashy:1.2.0'
@@ -149,7 +148,7 @@ dependencies {
149148
annotationProcessor "com.github.bumptech.glide:compiler:$glideVersion"
150149
implementation 'jp.wasabeef:glide-transformations:4.3.0'
151150
implementation 'com.github.santalu:aspect-ratio-imageview:1.0.9'
152-
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.28'
151+
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.29'
153152
def bivVersion = "1.8.1"
154153
implementation "com.github.piasy:BigImageViewer:$bivVersion"
155154
implementation "com.github.piasy:GlideImageLoader:$bivVersion"
@@ -168,7 +167,7 @@ dependencies {
168167
implementation 'me.saket:better-link-movement-method:2.2.0'
169168

170169
// Animations
171-
implementation 'com.airbnb.android:lottie:4.2.2'
170+
implementation 'com.airbnb.android:lottie:6.4.1'
172171

173172
// Loading ProgressBar
174173
implementation 'com.lsjwzh:materialloadingprogressbar:0.5.8-RELEASE'
@@ -186,7 +185,7 @@ dependencies {
186185
implementation 'com.nex3z:flow-layout:1.3.3'
187186

188187
// RecyclerView fast scrolling
189-
implementation 'me.zhanghai.android.fastscroll:library:1.1.8'
188+
implementation 'me.zhanghai.android.fastscroll:library:1.3.0'
190189

191190
implementation 'com.otaliastudios:zoomlayout:1.9.0'
192191

app/proguard-rules.pro

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
## Preferences reflection
1010
-keep class * extends androidx.preference.PreferenceFragmentCompat
1111

12-
-keep class ml.docilealligator.infinityforreddit.settings.FontPreviewFragment { *; }
13-
-keep class ml.docilealligator.infinityforreddit.settings.CrashReportsFragment { *; }
12+
-keep public class ml.docilealligator.infinityforreddit.settings.**
1413

1514
## EventBus Rules
1615
-keepattributes *Annotation*
@@ -66,6 +65,14 @@
6665
-keep class ml.docilealligator.infinityforreddit.customtheme.CustomTheme { <fields>; }
6766
-keep class ml.docilealligator.infinityforreddit.multireddit.MultiRedditJSONModel { <fields>; }
6867
-keep class ml.docilealligator.infinityforreddit.multireddit.SubredditInMultiReddit { <fields>; }
68+
-keep class ml.docilealligator.infinityforreddit.subscribedsubreddit.SubscribedSubredditData { <fields>; }
69+
-keep class ml.docilealligator.infinityforreddit.subscribeduser.SubscribedUserData { <fields>; }
70+
-keep class ml.docilealligator.infinityforreddit.multireddit.MultiReddit { <fields>; }
71+
-keep class ml.docilealligator.infinityforreddit.multireddit.AnonymousMultiredditSubreddit { <fields>; }
72+
-keep class ml.docilealligator.infinityforreddit.postfilter.PostFilter { <fields>; }
73+
-keep class ml.docilealligator.infinityforreddit.postfilter.PostFilterUsage { <fields>; }
74+
-keep class ml.docilealligator.infinityforreddit.commentfilter.CommentFilter { <fields>; }
75+
-keep class ml.docilealligator.infinityforreddit.commentfilter.CommentFilterUsage { <fields>; }
6976

7077
# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
7178
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)

app/src/main/AndroidManifest.xml

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:tools="http://schemas.android.com/tools"
4-
package="ml.docilealligator.infinityforreddit">
3+
xmlns:tools="http://schemas.android.com/tools">
54

65
<queries>
76
<intent>
@@ -24,6 +23,7 @@
2423

2524
<uses-permission android:name="android.permission.WAKE_LOCK" />
2625
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
26+
<uses-permission android:name="android.permission.RUN_USER_INITIATED_JOBS" />
2727

2828
<application
2929
android:name=".Infinity"
@@ -35,23 +35,43 @@
3535
android:theme="@style/AppTheme"
3636
android:usesCleartextTraffic="true"
3737
tools:replace="android:label">
38+
<activity
39+
android:name=".activities.LoginChromeCustomTabActivity"
40+
android:label="@string/login_activity_label"
41+
android:parentActivityName=".activities.MainActivity"
42+
android:theme="@style/AppTheme.Slidable"
43+
android:launchMode="singleTop"
44+
android:exported="true">
45+
46+
<intent-filter>
47+
<action android:name="android.intent.action.VIEW" />
48+
49+
<category android:name="android.intent.category.DEFAULT" />
50+
<category android:name="android.intent.category.BROWSABLE" />
51+
52+
<data
53+
android:host="localhost"
54+
android:scheme="infinity" />
55+
</intent-filter>
56+
57+
</activity>
3858
<activity
3959
android:name=".activities.CommentFilterUsageListingActivity"
60+
android:exported="false"
4061
android:parentActivityName=".activities.SettingsActivity"
41-
android:theme="@style/AppTheme.NoActionBar"
42-
android:exported="false" />
62+
android:theme="@style/AppTheme.NoActionBar" />
4363
<activity
4464
android:name=".activities.CustomizeCommentFilterActivity"
65+
android:exported="false"
4566
android:label="@string/customize_comment_filter_activity_label"
4667
android:parentActivityName=".activities.SettingsActivity"
47-
android:theme="@style/AppTheme.NoActionBar"
48-
android:exported="false" />
68+
android:theme="@style/AppTheme.NoActionBar" />
4969
<activity
5070
android:name=".activities.CommentFilterPreferenceActivity"
71+
android:exported="false"
5172
android:label="@string/comment_filter_preference_activity_label"
5273
android:parentActivityName=".activities.SettingsActivity"
53-
android:theme="@style/AppTheme.NoActionBar"
54-
android:exported="false" />
74+
android:theme="@style/AppTheme.NoActionBar" />
5575
<activity
5676
android:name=".activities.HistoryActivity"
5777
android:exported="false"
@@ -75,11 +95,6 @@
7595
android:label="@string/wiki_activity_label"
7696
android:parentActivityName=".activities.MainActivity"
7797
android:theme="@style/AppTheme.Slidable" />
78-
<activity
79-
android:name=".activities.TrendingActivity"
80-
android:label="@string/trending_activity_label"
81-
android:parentActivityName=".activities.MainActivity"
82-
android:theme="@style/AppTheme.Slidable" />
8398
<activity
8499
android:name=".activities.PostGalleryActivity"
85100
android:label="@string/post_gallery_activity_label"
@@ -128,11 +143,6 @@
128143
android:name=".activities.FetchRandomSubredditOrPostActivity"
129144
android:parentActivityName=".activities.MainActivity"
130145
android:theme="@style/AppTheme.NoActionBar" />
131-
<activity
132-
android:name=".activities.GiveAwardActivity"
133-
android:label="@string/give_award_activity_label"
134-
android:parentActivityName=".activities.MainActivity"
135-
android:theme="@style/AppTheme.Slidable" />
136146
<activity
137147
android:name=".activities.SelectUserFlairActivity"
138148
android:parentActivityName=".activities.MainActivity"
@@ -151,6 +161,7 @@
151161
<service
152162
android:name=".services.DownloadMediaService"
153163
android:enabled="true"
164+
android:permission="android.permission.BIND_JOB_SERVICE"
154165
android:exported="false" />
155166

156167
<activity
@@ -168,6 +179,7 @@
168179
<service
169180
android:name=".services.DownloadRedditVideoService"
170181
android:enabled="true"
182+
android:permission="android.permission.BIND_JOB_SERVICE"
171183
android:exported="false" />
172184

173185
<activity
@@ -452,10 +464,12 @@
452464
<service
453465
android:name=".services.SubmitPostService"
454466
android:enabled="true"
467+
android:permission="android.permission.BIND_JOB_SERVICE"
455468
android:exported="false" />
456469
<service
457470
android:name=".services.EditProfileService"
458471
android:enabled="true"
472+
android:permission="android.permission.BIND_JOB_SERVICE"
459473
android:exported="false" />
460474

461475
<receiver android:name=".broadcastreceivers.DownloadedMediaDeleteActionBroadcastReceiver" />

app/src/main/java/ml/docilealligator/infinityforreddit/AppComponent.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import ml.docilealligator.infinityforreddit.activities.LinkResolverActivity;
3030
import ml.docilealligator.infinityforreddit.activities.LockScreenActivity;
3131
import ml.docilealligator.infinityforreddit.activities.LoginActivity;
32+
import ml.docilealligator.infinityforreddit.activities.LoginChromeCustomTabActivity;
3233
import ml.docilealligator.infinityforreddit.activities.MainActivity;
3334
import ml.docilealligator.infinityforreddit.activities.MultiredditSelectionActivity;
3435
import ml.docilealligator.infinityforreddit.activities.PostFilterPreferenceActivity;
@@ -54,7 +55,6 @@
5455
import ml.docilealligator.infinityforreddit.activities.SubredditSelectionActivity;
5556
import ml.docilealligator.infinityforreddit.activities.SubscribedThingListingActivity;
5657
import ml.docilealligator.infinityforreddit.activities.SuicidePreventionActivity;
57-
import ml.docilealligator.infinityforreddit.activities.TrendingActivity;
5858
import ml.docilealligator.infinityforreddit.activities.ViewImageOrGifActivity;
5959
import ml.docilealligator.infinityforreddit.activities.ViewImgurMediaActivity;
6060
import ml.docilealligator.infinityforreddit.activities.ViewMultiRedditDetailActivity;
@@ -69,6 +69,7 @@
6969
import ml.docilealligator.infinityforreddit.bottomsheetfragments.AccountChooserBottomSheetFragment;
7070
import ml.docilealligator.infinityforreddit.bottomsheetfragments.FlairBottomSheetFragment;
7171
import ml.docilealligator.infinityforreddit.fragments.CommentsListingFragment;
72+
import ml.docilealligator.infinityforreddit.fragments.CustomThemeListingFragment;
7273
import ml.docilealligator.infinityforreddit.fragments.FollowedUsersListingFragment;
7374
import ml.docilealligator.infinityforreddit.fragments.HistoryPostFragment;
7475
import ml.docilealligator.infinityforreddit.fragments.InboxFragment;
@@ -281,8 +282,6 @@ public interface AppComponent {
281282

282283
void inject(PostGalleryActivity postGalleryActivity);
283284

284-
void inject(TrendingActivity trendingActivity);
285-
286285
void inject(WikiActivity wikiActivity);
287286

288287
void inject(Infinity infinity);
@@ -313,6 +312,10 @@ public interface AppComponent {
313312

314313
void inject(CommentFilterUsageListingActivity commentFilterUsageListingActivity);
315314

315+
void inject(CustomThemeListingFragment customThemeListingFragment);
316+
317+
void inject(LoginChromeCustomTabActivity loginChromeCustomTabActivity);
318+
316319
@Component.Factory
317320
interface Factory {
318321
AppComponent create(@BindsInstance Application application);

0 commit comments

Comments
 (0)