Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

Commit

Permalink
code
Browse files Browse the repository at this point in the history
  • Loading branch information
depler committed Feb 9, 2023
1 parent fd320b2 commit 1dcdbea
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion app/Code/NotificationActionReceiver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ public static NotificationCompat.Action CreateAction(Context context, string tex
var actionIntent = new Intent(context, typeof(NotificationActionReceiver));
actionIntent.PutExtra(ContextAction.Id, id ?? text);

var pIntent = PendingIntent.GetBroadcast(context, ActionCounter++, actionIntent, PendingIntentFlags.CancelCurrent);
var flags = (Build.VERSION.SdkInt >= BuildVersionCodes.S) ?
PendingIntentFlags.CancelCurrent | PendingIntentFlags.Immutable :
PendingIntentFlags.CancelCurrent;

var pIntent = PendingIntent.GetBroadcast(context, ActionCounter++, actionIntent, flags);
var spanText = GetSpan(text, color);

return new NotificationCompat.Action(-1, spanText, pIntent);
Expand Down
2 changes: 1 addition & 1 deletion app/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="4.00 beta" package="com.depler.transmission" android:installLocation="auto" android:versionCode="4">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="4.00" package="com.depler.transmission" android:installLocation="auto" android:versionCode="4">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="33" />
<application android:allowBackup="true" android:icon="@mipmap/ic_transmission" android:label="@string/app_name" android:supportsRtl="true"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Expand Down
4 changes: 2 additions & 2 deletions app/TransmissionAndroid.sln
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Global
{A0BCE607-F35D-49B2-9249-F418BAA14EAC}.Release|ARM.ActiveCfg = Release|Any CPU
{A0BCE607-F35D-49B2-9249-F418BAA14EAC}.Release|ARM.Build.0 = Release|Any CPU
{A0BCE607-F35D-49B2-9249-F418BAA14EAC}.Release|ARM.Deploy.0 = Release|Any CPU
{EA8CA5B8-7658-491F-970F-61DF8F5582F6}.Debug|ARM.ActiveCfg = Debug|ARM
{EA8CA5B8-7658-491F-970F-61DF8F5582F6}.Debug|ARM.Build.0 = Debug|ARM
{EA8CA5B8-7658-491F-970F-61DF8F5582F6}.Debug|ARM.ActiveCfg = Release|ARM
{EA8CA5B8-7658-491F-970F-61DF8F5582F6}.Debug|ARM.Build.0 = Release|ARM
{EA8CA5B8-7658-491F-970F-61DF8F5582F6}.Release|ARM.ActiveCfg = Release|ARM
{EA8CA5B8-7658-491F-970F-61DF8F5582F6}.Release|ARM.Build.0 = Release|ARM
EndGlobalSection
Expand Down

0 comments on commit 1dcdbea

Please sign in to comment.