Vibrator.vibrate(长)导致LG-E730频繁重启应用程序

时间:2013-04-02 12:56:21

标签: android vibration

如果我在LG-E370上使用Vibrator.vibrate(long),则会导致频繁的应用程序重启。振动器许可已添加到清单中,振动器在应用程序重新启动前最多振动5次。

如何可靠地振动?

我将堆栈跟踪的输出添加到我的onPause()中,这就是我得到的:

04-02 14:39:36.384:  dalvik.system.VMStack.getThreadStackTrace(Native Method)
04-02 14:39:36.384:  java.lang.Thread.getStackTrace(Thread.java:737)
04-02 14:39:36.384:  com.evotegra.aCoDriver.ACoDriverActivity.onPause(ACoDriverActivity.java:94)
04-02 14:39:36.384:  android.app.Activity.performPause(Activity.java:3851)
04-02 14:39:36.384:  android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1191)
04-02 14:39:36.424:  android.app.ActivityThread.performNewIntents(ActivityThread.java:1747)
04-02 14:39:36.424:  android.app.ActivityThread.handleNewIntent(ActivityThread.java:1757)
04-02 14:39:36.424:  android.app.ActivityThread.access$2300(ActivityThread.java:117)
04-02 14:39:36.424:  android.app.ActivityThread$H.handleMessage(ActivityThread.java:989)
04-02 14:39:36.424:  android.os.Handler.dispatchMessage(Handler.java:99)
04-02 14:39:36.434:  android.os.Looper.loop(Looper.java:130)
04-02 14:39:36.434:  android.app.ActivityThread.main(ActivityThread.java:3740)
04-02 14:39:36.434:  java.lang.reflect.Method.invokeNative(Native Method)
04-02 14:39:36.434:  java.lang.reflect.Method.invoke(Method.java:507)
04-02 14:39:36.444:  com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880)
04-02 14:39:36.444:  com.android.internal.os.ZygoteInit.main(ZygoteInit.java:638)
04-02 14:39:36.444:  dalvik.system.NativeStart.main(Native Method)

04-02 14:39:44.351:  dalvik.system.VMStack.getThreadStackTrace(Native Method)
04-02 14:39:44.371:  java.lang.Thread.getStackTrace(Thread.java:737)
04-02 14:39:44.371:  com.evotegra.aCoDriver.ACoDriverActivity.onPause(ACoDriverActivity.java:94)
04-02 14:39:44.371:  android.app.Activity.performPause(Activity.java:3851)
04-02 14:39:44.381:  android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1191)
04-02 14:39:44.381:  android.app.ActivityThread.performPauseActivity(ActivityThread.java:2356)
04-02 14:39:44.381:  android.app.ActivityThread.performPauseActivity(ActivityThread.java:2326)
04-02 14:39:44.381:  android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:2818)
04-02 14:39:44.401:  android.app.ActivityThread.access$1600(ActivityThread.java:117)
04-02 14:39:44.401:  android.app.ActivityThread$H.handleMessage(ActivityThread.java:946)
04-02 14:39:44.411:  android.os.Handler.dispatchMessage(Handler.java:99)
04-02 14:39:44.411:  android.os.Looper.loop(Looper.java:130)
04-02 14:39:44.411:  android.app.ActivityThread.main(ActivityThread.java:3740)
04-02 14:39:44.462:  java.lang.reflect.Method.invokeNative(Native Method)
04-02 14:39:44.462:  java.lang.reflect.Method.invoke(Method.java:507)
04-02 14:39:44.462:  com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880)
04-02 14:39:44.482:  com.android.internal.os.ZygoteInit.main(ZygoteInit.java:638)
04-02 14:39:44.492:  dalvik.system.NativeStart.main(Native Method)
04-02 14:39:44.772: W/ServerManager(8731): <!>com.evotegra.aCoDriver.data.ServerManager$ConnectionManager 559<!> Connection thread was interrupted. Message: null
04-02 14:39:44.862:  dalvik.system.VMStack.getThreadStackTrace(Native Method)
04-02 14:39:44.862:  java.lang.Thread.getStackTrace(Thread.java:737)
04-02 14:39:44.862:  com.evotegra.aCoDriver.ACoDriverActivity.onPause(ACoDriverActivity.java:94)
04-02 14:39:44.862:  android.app.Activity.performPause(Activity.java:3851)
04-02 14:39:44.862:  android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1191)
04-02 14:39:44.862:  android.app.ActivityThread.performPauseActivity(ActivityThread.java:2356)
04-02 14:39:44.862:  android.app.ActivityThread.performPauseActivity(ActivityThread.java:2326)
04-02 14:39:44.862:  android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:2818)
04-02 14:39:44.872:  android.app.ActivityThread.access$1600(ActivityThread.java:117)
04-02 14:39:44.872:  android.app.ActivityThread$H.handleMessage(ActivityThread.java:946)
04-02 14:39:44.872:  android.os.Handler.dispatchMessage(Handler.java:99)
04-02 14:39:44.872:  android.os.Looper.loop(Looper.java:130)
04-02 14:39:44.872:  android.app.ActivityThread.main(ActivityThread.java:3740)
04-02 14:39:44.872:  java.lang.reflect.Method.invokeNative(Native Method)
04-02 14:39:44.872:  java.lang.reflect.Method.invoke(Method.java:507)
04-02 14:39:44.872:  com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880)
04-02 14:39:44.872:  com.android.internal.os.ZygoteInit.main(ZygoteInit.java:638)
04-02 14:39:44.872:  dalvik.system.NativeStart.main(Native Method)
04-02 14:39:48.315:  dalvik.system.VMStack.getThreadStackTrace(Native Method)
04-02 14:39:48.315:  java.lang.Thread.getStackTrace(Thread.java:737)
04-02 14:39:48.315:  com.evotegra.aCoDriver.ACoDriverActivity.onPause(ACoDriverActivity.java:94)
04-02 14:39:48.315:  android.app.Activity.performPause(Activity.java:3851)
04-02 14:39:48.315:  android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1191)
04-02 14:39:48.325:  android.app.ActivityThread.performPauseActivity(ActivityThread.java:2356)
04-02 14:39:48.335:  android.app.ActivityThread.performPauseActivity(ActivityThread.java:2326)
04-02 14:39:48.345:  android.app.ActivityThread.handlePauseActivity(ActivityThread.java:2306)
04-02 14:39:48.345:  android.app.ActivityThread.access$1700(ActivityThread.java:117)
04-02 14:39:48.345:  android.app.ActivityThread$H.handleMessage(ActivityThread.java:953)
04-02 14:39:48.355:  android.os.Handler.dispatchMessage(Handler.java:99)
04-02 14:39:48.355:  android.os.Looper.loop(Looper.java:130)
04-02 14:39:48.355:  android.app.ActivityThread.main(ActivityThread.java:3740)
04-02 14:39:48.355:  java.lang.reflect.Method.invokeNative(Native Method)
04-02 14:39:48.375:  java.lang.reflect.Method.invoke(Method.java:507)
04-02 14:39:48.375:  com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880)
04-02 14:39:48.375:  com.android.internal.os.ZygoteInit.main(ZygoteInit.java:638)
04-02 14:39:48.385:  dalvik.system.NativeStart.main(Native Method)

0 个答案:

没有答案