mirror of
https://github.com/syncthing/syncthing-android.git
synced 2025-02-02 15:21:36 +00:00
Remove copied device ID toast on android 13+ (#1854)
https://developer.android.com/develop/ui/views/touch-and-input/copy-paste#duplicate-notifications
This commit is contained in:
parent
c8ac58586e
commit
d46fe60888
1 changed files with 4 additions and 2 deletions
|
@ -42,9 +42,11 @@ public class Util {
|
||||||
context.getSystemService(Context.CLIPBOARD_SERVICE);
|
context.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||||
ClipData clip = ClipData.newPlainText(context.getString(R.string.device_id), id);
|
ClipData clip = ClipData.newPlainText(context.getString(R.string.device_id), id);
|
||||||
clipboard.setPrimaryClip(clip);
|
clipboard.setPrimaryClip(clip);
|
||||||
|
if (android.os.Build.VERSION.SDK_INT < 33) {
|
||||||
Toast.makeText(context, R.string.device_id_copied_to_clipboard, Toast.LENGTH_SHORT)
|
Toast.makeText(context, R.string.device_id_copied_to_clipboard, Toast.LENGTH_SHORT)
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts a number of bytes to a human readable file size (eg 3.5 GiB).
|
* Converts a number of bytes to a human readable file size (eg 3.5 GiB).
|
||||||
|
|
Loading…
Reference in a new issue