Firstly, this may seem like the wrong place to ask about it ... But since I just noticed this problem with my own application, I think there is no other place to ask about it. Maybe I'm doing something wrong, but I have no idea what ...
As you probably know, ICS allows you to take a screenshot on the screen by pressing Power + VolumeDown . I have HTC One X, and the shortcut is Power + Home . I don't know if this will change anything (maybe someone with a Galaxy Nexus can try it).
My own application, Notification Agenda (I am not going to bind it, so I am not accused of SPAM or something like that, but I really cannot post this question without the self-promotion that caused my application) t let me take screenshots with the above key combination with my One X. I can take screenshots of any other application, but it does not work on its own ...
What the hell do you think I'm doing to "disable" this? My application is very simple, and not much is happening for this. Any ideas?
Every time I try to take a screenshot of my application, I get this in logcat:
08-24 00:15:40.570: E/InputManager-JNI(277): An exception was thrown by callback 'interceptKeyBeforeDispatching'. 08-24 00:15:40.570: E/InputManager-JNI(277): java.lang.StringIndexOutOfBoundsException: length=83; regionStart=-1; regionLength=83 08-24 00:15:40.570: E/InputManager-JNI(277): at java.lang.String.startEndAndLength(String.java:593) 08-24 00:15:40.570: E/InputManager-JNI(277): at java.lang.String.substring(String.java:1474) 08-24 00:15:40.570: E/InputManager-JNI(277): at com.android.internal.policy.impl.PhoneWindowManager.interceptKeyBeforeDispatching(PhoneWindowManager.java:2375) 08-24 00:15:40.570: E/InputManager-JNI(277): at com.android.server.wm.InputMonitor.interceptKeyBeforeDispatching(InputMonitor.java:307) 08-24 00:15:40.570: E/InputManager-JNI(277): at com.android.server.wm.InputManager$Callbacks.interceptKeyBeforeDispatching(InputManager.java:663) 08-24 00:15:40.570: E/InputManager-JNI(277): at dalvik.system.NativeStart.run(Native Method)
This does not happen when the screenshot works. Instead, many other screenshot application calls are logged and more.
Why does my application prevent a screenshot and generate an error above?
Ricardo amaral
source share