关于mContext.startActivity(intent)启动后系统异常错误
原帖http://topic.csdn.net/u/20101102/09/b4352364-eec8-49c1-b94e-48befd707681.html
移植2.2版本电池警报到1.5
用了这个INTENT
Intent intent = new Intent(Intent.ACTION_REQUEST_SHUTDOWN);
intent.putExtra(Intent.EXTRA_KEY_CONFIRM, false);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
mContext.startActivity(intent);
出现异常
LOGCAT:
/ActivityManager( 1848): Starting activity: Intent { action=android.intent.action.ACTION_REQUEST_SHUTDOWN flags=0x10000000 (has extras) }
W/dalvikvm( 1848): threadid=27: thread exiting with uncaught exception (group=0x4000fe70)
E/AndroidRuntime( 1848): Uncaught handler: thread UEventObserver exiting due to uncaught exception
E/AndroidRuntime( 1848): *** EXCEPTION IN SYSTEM PROCESS. System will crash.
E/AndroidRuntime( 1848): android.content.ActivityNotFoundException: No Activity found to handle Intent { action=android.intent.action.ACTION_REQUEST_SHUTDOWN
我是在framework下面做的,没有设计应用~
这个也是权限问题?怎么加,给点建议,实在不行我就直接调用关机API了~