Created
May 21, 2015 14:48
-
-
Save pepyakin/8d2221501fd572d4a61c to your computer and use it in GitHub Desktop.
Gist which should prevent leaks of Activity in ClipboardUIManager.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you thank you thank you thank you thank you thank you thank you