Skip to content

Commit

Permalink
Merge branch 'v4.2.0-release' into rotate_feature_realase_pr
Browse files Browse the repository at this point in the history
  • Loading branch information
shankarpriyank committed Oct 19, 2023
2 parents 8447cf8 + 988b83d commit aba7d08
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: 17
distribution: 'temurin'
java-version: '17'

- name: Cache packages
id: cache-packages
Expand Down
6 changes: 5 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ dependencies {
implementation 'in.yuvi:http.fluent:1.3'
implementation 'com.google.code.gson:gson:2.8.5'
implementation ("com.squareup.okhttp3:okhttp:$OKHTTP_VERSION!!"){

// Forcing dependency versions using force = true on a first-level dependency has been deprecated.
// Ref: https://docs.gradle.org/7.5/userguide/upgrading_version_5.html#forced_dependencies

//force = true //API 19 support
}
implementation 'com.squareup.okio:okio:2.2.2'
Expand Down Expand Up @@ -86,7 +90,7 @@ dependencies {

// Unit testing
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.robolectric:robolectric:4.6.1'
testImplementation 'org.robolectric:robolectric:4.10.3'
testImplementation 'androidx.test:core:1.4.0'
testImplementation "com.squareup.okhttp3:mockwebserver:$OKHTTP_VERSION"
testImplementation "com.jraska.livedata:testing-ktx:1.1.2"
Expand Down
2 changes: 2 additions & 0 deletions app/proguard-rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
-keepattributes Signature
# Retain declared checked exceptions for use by a Proxy instance.
-keepattributes Exceptions
# Classes used by retrofit to fetch API repsonse
-keepclasseswithmembers class org.wikipedia.** { *; }
# --- /Retrofit ---

# --- OkHttp + Okio ---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import android.content.Context;
import android.content.Intent;

import android.os.Build;
import androidx.core.app.NotificationCompat;

import javax.inject.Inject;
Expand Down Expand Up @@ -49,21 +50,29 @@ public NotificationHelper(Context context) {
* @param intent the intent to be fired when the notification is clicked
*/
public void showNotification(Context context,
String notificationTitle,
String notificationMessage,
int notificationId,
Intent intent) {
String notificationTitle,
String notificationMessage,
int notificationId,
Intent intent) {

notificationBuilder.setDefaults(DEFAULT_ALL)
.setContentTitle(notificationTitle)
.setStyle(new NotificationCompat.BigTextStyle()
.bigText(notificationMessage))
.setSmallIcon(R.drawable.ic_launcher)
.setProgress(0, 0, false)
.setOngoing(false)
.setPriority(PRIORITY_HIGH);
.setContentTitle(notificationTitle)
.setStyle(new NotificationCompat.BigTextStyle()
.bigText(notificationMessage))
.setSmallIcon(R.drawable.ic_launcher)
.setProgress(0, 0, false)
.setOngoing(false)
.setPriority(PRIORITY_HIGH);

PendingIntent pendingIntent = PendingIntent.getActivity(context, 1, intent, PendingIntent.FLAG_UPDATE_CURRENT);
int flags = PendingIntent.FLAG_UPDATE_CURRENT;

// Check if the API level is 31 or higher to modify the flag
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
// For API level 31 or above, PendingIntent requires either FLAG_IMMUTABLE or FLAG_MUTABLE to be set
flags |= PendingIntent.FLAG_IMMUTABLE;
}

PendingIntent pendingIntent = PendingIntent.getActivity(context, 1, intent, flags);
notificationBuilder.setContentIntent(pendingIntent);
notificationManager.notify(notificationId, notificationBuilder.build());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ class DepictsPresenter @Inject constructor(
)
}
)

}
} else {
repository.cleanup()
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#Thu Mar 01 15:28:48 IST 2018
org.gradle.jvmargs=-Xmx1536M
org.gradle.caching=true
android.enableR8.fullMode=false


KOTLIN_VERSION=1.7.20
BUTTERKNIFE_VERSION=10.1.0
Expand Down

0 comments on commit aba7d08

Please sign in to comment.