Open GeekyDevs opened 12 years ago
Tried to create a new basic alarm but application threw an exception dialog and user had to force close and return to device home screen. Below is the exception shown in the console.
03-12 22:22:23.662: E/AndroidRuntime(307): Uncaught handler: thread main exiting due to uncaught exception 03-12 22:22:23.900: E/AndroidRuntime(307): java.lang.RuntimeException: Unable to create service com.geekydevs.alarmclock.AlarmService: java.lang.SecurityException: Neither user 10028 nor current process has android.permission.WAKE_LOCK. 03-12 22:22:23.900: E/AndroidRuntime(307): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2790) 03-12 22:22:23.900: E/AndroidRuntime(307): at android.app.ActivityThread.access$3200(ActivityThread.java:119) 03-12 22:22:23.900: E/AndroidRuntime(307): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1917) 03-12 22:22:23.900: E/AndroidRuntime(307): at android.os.Handler.dispatchMessage(Handler.java:99) 03-12 22:22:23.900: E/AndroidRuntime(307): at android.os.Looper.loop(Looper.java:123) 03-12 22:22:23.900: E/AndroidRuntime(307): at android.app.ActivityThread.main(ActivityThread.java:4363) 03-12 22:22:23.900: E/AndroidRuntime(307): at java.lang.reflect.Method.invokeNative(Native Method) 03-12 22:22:23.900: E/AndroidRuntime(307): at java.lang.reflect.Method.invoke(Method.java:521) 03-12 22:22:23.900: E/AndroidRuntime(307): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) 03-12 22:22:23.900: E/AndroidRuntime(307): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 03-12 22:22:23.900: E/AndroidRuntime(307): at dalvik.system.NativeStart.main(Native Method) 03-12 22:22:23.900: E/AndroidRuntime(307): Caused by: java.lang.SecurityException: Neither user 10028 nor current process has android.permission.WAKE_LOCK. 03-12 22:22:23.900: E/AndroidRuntime(307): at android.os.Parcel.readException(Parcel.java:1218) 03-12 22:22:23.900: E/AndroidRuntime(307): at android.os.Parcel.readException(Parcel.java:1206) 03-12 22:22:23.900: E/AndroidRuntime(307): at android.os.IPowerManager$Stub$Proxy.acquireWakeLock(IPowerManager.java:204) 03-12 22:22:23.900: E/AndroidRuntime(307): at android.os.PowerManager$WakeLock.acquire(PowerManager.java:250) 03-12 22:22:23.900: E/AndroidRuntime(307): at com.geekydevs.alarmclock.AlarmService.onCreate(AlarmService.java:55) 03-12 22:22:23.900: E/AndroidRuntime(307): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2780) 03-12 22:22:23.900: E/AndroidRuntime(307): ... 10 more
Steps:
Expectation: