WAKE_LOCK
AndEngine で許可を与えることは必須ですか? このWAKE_LOCK
アクセス許可を削除しようとすると、SecurityException が発生します。
logCat エラー:
01-28 09:57:48.417: DEBUG/dalvikvm(166): Added shared lib /system/lib/libjni_latinime.so 0x437577d0
01-28 09:59:02.966: ERROR/AndEngine(225): You have to add
01-28 09:59:02.966: ERROR/AndEngine(225): <uses-permission android:name="android.permission.WAKE_LOCK"/>
01-28 09:59:02.966: ERROR/AndEngine(225): to your AndroidManifest.xml !
01-28 09:59:02.966: ERROR/AndEngine(225): java.lang.SecurityException: Neither user 10024 nor current process has android.permission.WAKE_LOCK.
01-28 09:59:02.966: ERROR/AndEngine(225): at android.os.Parcel.readException(Parcel.java:1218)
01-28 09:59:02.966: ERROR/AndEngine(225): at android.os.Parcel.readException(Parcel.java:1206)
01-28 09:59:02.966: ERROR/AndEngine(225): at android.os.IPowerManager$Stub$Proxy.acquireWakeLock(IPowerManager.java:178)
01-28 09:59:02.966: ERROR/AndEngine(225): at android.os.PowerManager$WakeLock.acquire(PowerManager.java:228)
01-28 09:59:02.966: ERROR/AndEngine(225): at org.anddev.andengine.ui.activity.BaseGameActivity.acquireWakeLock(BaseGameActivity.java:200)
01-28 09:59:02.966: ERROR/AndEngine(225): at org.anddev.andengine.ui.activity.BaseGameActivity.doResume(BaseGameActivity.java:166)
01-28 09:59:02.966: ERROR/AndEngine(225): at org.anddev.andengine.ui.activity.BaseGameActivity.onWindowFocusChanged(BaseGameActivity.java:83)
01-28 09:59:02.966: ERROR/AndEngine(225): at com.android.internal.policy.impl.PhoneWindow$DecorView.onWindowFocusChanged(PhoneWindow.java:2027)
01-28 09:59:02.966: ERROR/AndEngine(225): at android.view.View.dispatchWindowFocusChanged(View.java:3694)
01-28 09:59:02.966: ERROR/AndEngine(225): at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:655)
01-28 09:59:02.966: ERROR/AndEngine(225): at android.view.ViewRoot.handleMessage(ViewRoot.java:1782)
01-28 09:59:02.966: ERROR/AndEngine(225): at android.os.Handler.dispatchMessage(Handler.java:99)
01-28 09:59:02.966: ERROR/AndEngine(225): at android.os.Looper.loop(Looper.java:123)
01-28 09:59:02.966: ERROR/AndEngine(225): at android.app.ActivityThread.main(ActivityThread.java:4203)
01-28 09:59:02.966: ERROR/AndEngine(225): at java.lang.reflect.Method.invokeNative(Native Method)
01-28 09:59:02.966: ERROR/AndEngine(225): at java.lang.reflect.Method.invoke(Method.java:521)
01-28 09:59:02.966: ERROR/AndEngine(225): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
01-28 09:59:02.966: ERROR/AndEngine(225): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
01-28 09:59:02.966: ERROR/AndEngine(225): at dalvik.system.NativeStart.main(Native Method)