Describe the bug
The crash was caused by creating a shortcut
To Reproduce
Steps to reproduce the behavior:
- Install a2dp and open the app
- Click "Load Devices"
- Click on any Bluetooth device.
- Click "EDIT“
- Click "START APP ON CONNECT"
- Click "Create Shortcut"
- Click "Flashlight"
- Crash
Expected behavior
Not crash
Smartphone (please complete the following information):
- Device: HUAWEI nova 5 pro
- OS: HarmonyOS 2.0.0
- Rooted: No
- Version: v2.13.0.4
Additional context
logcat:
10-27 12:27:21.219 32413 32413 E AndroidRuntime: FATAL EXCEPTION: main
10-27 12:27:21.219 32413 32413 E AndroidRuntime: Process: a2dp.Vol, PID: 32413
10-27 12:27:21.219 32413 32413 E AndroidRuntime: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=14, result=-1, data=Intent { act=android.intent.action.CREATE_SHORTCUT cmp=com.android.systemui/.flashlight.FlashlightShortcutActivity }} to activity {a2dp.Vol/a2dp.Vol.EditDevice}: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.CREATE_SHORTCUT cmp=com.android.systemui/.flashlight.FlashlightShortcutActivity } from ProcessRecord{24b8e09 32413:a2dp.Vol/u0a0} (pid=32413, uid=10000) requires huawei.android.permission.HW_SIGNATURE_OR_SYSTEM
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at android.app.ActivityThread.deliverResults(ActivityThread.java:5782)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at android.app.ActivityThread.handleSendResult(ActivityThread.java:5823)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2613)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:110)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at android.os.Looper.loop(Looper.java:219)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:8668)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: Caused by: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.CREATE_SHORTCUT cmp=com.android.systemui/.flashlight.FlashlightShortcutActivity } from ProcessRecord{24b8e09 32413:a2dp.Vol/u0a0} (pid=32413, uid=10000) requires huawei.android.permission.HW_SIGNATURE_OR_SYSTEM
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at android.os.Parcel.createException(Parcel.java:2090)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:2058)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:2006)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at android.app.IActivityTaskManager$Stub$Proxy.startActivity(IActivityTaskManager.java:3908)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at android.app.Instrumentation.execStartActivity(Instrumentation.java:1738)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at android.app.Activity.startActivityForResult(Activity.java:5412)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at android.app.Activity.startActivityForResult(Activity.java:5337)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at a2dp.Vol.EditDevice.onActivityResult(EditDevice.java:722)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at android.app.Activity.dispatchActivityResult(Activity.java:8541)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at android.app.ActivityThread.deliverResults(ActivityThread.java:5775)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: ... 11 more
10-27 12:27:21.219 32413 32413 E AndroidRuntime: Caused by: android.os.RemoteException: Remote stack trace:
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at com.android.server.wm.ActivityStackSupervisor.checkStartAnyActivityPermission(libmapleservices.so:5247696)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at com.android.server.wm.ActivityStarter.startActivity(libmapleservices.so:5259820)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at com.android.server.wm.ActivityStarter.startActivity(libmapleservices.so:5283304)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at com.android.server.wm.HwActivityStarter.startActivity(libmaplehwServices.so:2034000)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: at com.android.server.wm.ActivityStarter.startActivityMayWait(libmapleservices.so:5616684)
10-27 12:27:21.219 32413 32413 E AndroidRuntime: callee: null 1631/2029
10-27 12:27:21.219 32413 32413 E AndroidRuntime:
record:

Describe the bug
The crash was caused by creating a shortcut
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Not crash
Smartphone (please complete the following information):
Additional context
logcat:
record:
