Skip to content

Commit 2a7b0a7

Browse files
committed
update sample for android S (12)
1 parent 870546b commit 2a7b0a7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
buildscript {
22
ext.versions = [
33
'kotlin': '1.5.21',
4-
'supportLibrary': '1.2.0',
4+
'androidx': '1.2.0',
55
'atsl': '1.4.0'
66
]
77

example/src/main/java/helper/update/widget/com/example/simple/common/CommonRemoteViewBuilder.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ private static PendingIntent getPendingIntent(Context context, String text, Stri
7575

7676
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
7777
return PendingIntent.getForegroundService(context, 0, updateServiceIntent,
78-
PendingIntent.FLAG_UPDATE_CURRENT);
78+
PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT);
7979
} else {
8080
return PendingIntent.getService(context, 0, updateServiceIntent,
8181
PendingIntent.FLAG_UPDATE_CURRENT);

example/src/main/java/helper/update/widget/com/example/simple/single/SingleRemoteViewBuilder.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ private static PendingIntent getPendingIntent(Context context, String text, Stri
7272

7373
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
7474
return PendingIntent.getForegroundService(context, widgetId, updateServiceIntent,
75-
PendingIntent.FLAG_CANCEL_CURRENT);
75+
PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_CANCEL_CURRENT);
7676
} else {
7777
return PendingIntent.getService(context, widgetId, updateServiceIntent,
7878
PendingIntent.FLAG_CANCEL_CURRENT);

0 commit comments

Comments
 (0)