1
0
Fork 0
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:
o13e 2022-11-16 20:08:14 +01:00 committed by GitHub
parent c8ac58586e
commit d46fe60888
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,9 +42,11 @@ public class Util {
context.getSystemService(Context.CLIPBOARD_SERVICE);
ClipData clip = ClipData.newPlainText(context.getString(R.string.device_id), id);
clipboard.setPrimaryClip(clip);
if (android.os.Build.VERSION.SDK_INT < 33) {
Toast.makeText(context, R.string.device_id_copied_to_clipboard, Toast.LENGTH_SHORT)
.show();
}
}
/**
* Converts a number of bytes to a human readable file size (eg 3.5 GiB).