mirror of
https://github.com/emanuele-f/PCAPdroid.git
synced 2026-06-19 21:05:25 +08:00
Avoid duplicate cliboard copy notification on 13+
Since Android 13, Android itself will show a notification when copying data to the clipboard
This commit is contained in:
parent
78f67e75e5
commit
16ccc20750
@ -917,7 +917,9 @@ public class Utils {
|
||||
ClipData clip = ClipData.newPlainText(ctx.getString(R.string.stats), contents);
|
||||
clipboard.setPrimaryClip(clip);
|
||||
|
||||
Utils.showToast(ctx, R.string.copied);
|
||||
// Only show a toast for Android 12 and lower
|
||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.S_V2)
|
||||
Utils.showToast(ctx, R.string.copied);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "copyToClipboard failed: " + e.getMessage());
|
||||
Utils.showToastLong(ctx, R.string.error);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user