Has anyone else tried to mark their clipboard copied data as sensitive as per the following recommendation?
How can I set the sensitivity settings in an android app Java code?
CodePudding user response:
apply()
is a Kotlin scope function. You appear to be programming in Java, so the Kotlin syntax will not work for you.
By eyeball, the Java equivalent would be:
PersistableBundle extras = new PersistableBundle();
extras.putBoolean(ClipDescription.EXTRA_IS_SENSITIVE, true);
clipData.getDescription().setExtras(extras);