Skip to content

Commit

Permalink
Release 0.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
weiqiangliu committed Aug 31, 2021
1 parent ac39197 commit eb1748f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion SensorsABTestSDK/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
apply plugin: 'signing'
apply plugin: 'maven-publish'

version = "0.0.7"
version = "0.0.8"
android {
compileSdkVersion 29

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,17 @@ public class AlarmManagerUtils {
private static AlarmManagerUtils instance = null;

private AlarmManagerUtils(Context context) {
mAlarm = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
Intent intent = new Intent(context, GlobalLoopService.class);
mPendingIntent = PendingIntent.getService(context, 0, intent, 0);
try {
mAlarm = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
Intent intent = new Intent(context, GlobalLoopService.class);
int flag = 0;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
flag = PendingIntent.FLAG_IMMUTABLE;
}
mPendingIntent = PendingIntent.getService(context, 0, intent, flag);
} catch (Exception e) {
SALog.printStackTrace(e);
}
}

public static AlarmManagerUtils getInstance(Context context) {
Expand Down

0 comments on commit eb1748f

Please sign in to comment.