Camera Shooting with the power button - application drops
VadimDedeiko opened this issue · 3 comments
ISSUES ARE NOT A DISCUSSION/SUPPORT FORUM. Comments irrelevant to the issue WILL be removed.
If this issue is to report a bug, please provide everything you can from the list below:
- ROM build version (date):
- logcat (pastebin link):
- dmesg (pastebin link):
- console-ramoops (pastebin link):
- Steps to reproduce:
Release 20170822
Go into the camera app
slide from left to right
Change Shooting with the power button On
I started this app 4 times. You can see in Logcat
08-29 15:33:23.815 E/AndroidRuntime( 8465): FATAL EXCEPTION: main
08-29 15:33:23.815 E/AndroidRuntime( 8465): Process: org.cyanogenmod.snap, PID: 8465
08-29 15:33:23.815 E/AndroidRuntime( 8465): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.cyanogenmod.snap/com.android.camera.CameraActivity}: java.lang.SecurityException: No permission to prevent power key: Neither user 10104 nor current process has android.permission.PREVENT_POWER_KEY.
08-29 15:33:23.815 E/AndroidRuntime( 8465): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2699)
08-29 15:33:23.815 E/AndroidRuntime( 8465): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2766)
08-29 15:33:23.815 E/AndroidRuntime( 8465): at android.app.ActivityThread.-wrap12(ActivityThread.java)
08-29 15:33:23.815 E/AndroidRuntime( 8465): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1507)
08-29 15:33:23.815 E/AndroidRuntime( 8465): at android.os.Handler.dispatchMessage(Handler.java:102)
08-29 15:33:23.815 E/AndroidRuntime( 8465): at android.os.Looper.loop(Looper.java:154)
08-29 15:33:23.815 E/AndroidRuntime( 8465): at android.app.ActivityThread.main(ActivityThread.java:6236)
08-29 15:33:23.815 E/AndroidRuntime( 8465): at java.lang.reflect.Method.invoke(Native Method)
08-29 15:33:23.815 E/AndroidRuntime( 8465): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:891)
08-29 15:33:23.815 E/AndroidRuntime( 8465): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781)
08-29 15:33:23.815 E/AndroidRuntime( 8465): Caused by: java.lang.SecurityException: No permission to prevent power key: Neither user 10104 nor current process has android.permission.PREVENT_POWER_KEY.
08-29 15:33:23.815 E/AndroidRuntime( 8465): at android.app.ContextImpl.enforce(ContextImpl.java:1585)
08-29 15:33:23.815 E/AndroidRuntime( 8465): at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:1617)
08-29 15:33:23.815 E/AndroidRuntime( 8465): at android.content.ContextWrapper.enforceCallingOrSelfPermission(ContextWrapper.java:707)
08-29 15:33:23.815 E/AndroidRuntime( 8465): at android.view.Window.setPrivateFlags(Window.java:1114)
08-29 15:33:23.815 E/AndroidRuntime( 8465): at android.view.Window.addPrivateFlags(Window.java:1067)
08-29 15:33:23.815 E/AndroidRuntime( 8465): at com.android.camera.CameraActivity.initPowerShutter(CameraActivity.java:1969)
08-29 15:33:23.815 E/AndroidRuntime( 8465): at com.android.camera.PhotoModule.init(PhotoModule.java:580)
08-29 15:33:23.815 E/AndroidRuntime( 8465): at com.android.camera.CameraActivity.selectModule(CameraActivity.java:2180)
08-29 15:33:23.815 E/AndroidRuntime( 8465): at com.android.camera.CameraActivity.setModuleFromIndex(CameraActivity.java:2146)
08-29 15:33:23.815 E/AndroidRuntime( 8465): at com.android.camera.CameraActivity.onCreate(CameraActivity.java:1517)
08-29 15:33:23.815 E/AndroidRuntime( 8465): at android.app.Activity.performCreate(Activity.java:6684)
08-29 15:33:23.815 E/AndroidRuntime( 8465): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
08-29 15:33:23.815 E/AndroidRuntime( 8465): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2652)
As I understand that there are no permissions to capture the power button
This is working fine in release 20170904, can you verify it?
Closed for no response