Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gist which should prevent leaks of Activity in ClipboardUIManager.
public class ExampleApplication extends Application {
@Override public void onCreate() {
super.onCreate();
try {
Class<?> cls = Class.forName("android.sec.clipboard.ClipboardUIManager");
Method m = cls.getDeclaredMethod("getInstance", Context.class);
Object o = m.invoke(null, this);
} catch (Exception ignored) { }
}
}
@AmandaRiu

This comment has been minimized.

Copy link

commented Sep 7, 2016

Thanks you for this! I was ready to yank out all of my hair trying to figure out how to work around this Samsung BS. :)

@SatarTmimi

This comment has been minimized.

Copy link

commented Jun 27, 2017

thank you thank you thank you thank you thank you thank you thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.