cancel
Showing results for 
Search instead for 
Did you mean: 

PACKAGE_USAGE_STATS permission not allowed on quest 2?

MadMagic008
Level 2
I am making an app that requires this permission. its a native android application so its not vr, doesnt use oculus sdk etc.
The tool works fine on the regular quest, but when trying to open the activity to grant the permission on the quest 2, settings crashes. The crashing happens when clicking on the name of the app, to grant permissions for that app.
crash log:
10-23 16:12:13.341  8723  8723 E AndroidRuntime: FATAL EXCEPTION: main
10-23 16:12:13.341 8723 8723 E AndroidRuntime: Process: com.android.settings, PID: 8723
10-23 16:12:13.341 8723 8723 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.widget.SearchView.isIconified()' on a null object reference
10-23 16:12:13.341 8723 8723 E AndroidRuntime: at com.android.settings.applications.manageapplications.ManageApplications.onSaveInstanceState(ManageApplications.java:511)
10-23 16:12:13.341 8723 8723 E AndroidRuntime: at androidx.fragment.app.Fragment.performSaveInstanceState(Fragment.java:2799)
10-23 16:12:13.341 8723 8723 E AndroidRuntime: at androidx.fragment.app.FragmentManagerImpl.saveFragmentBasicState(FragmentManagerImpl.java:2276)
10-23 16:12:13.341 8723 8723 E AndroidRuntime: at androidx.fragment.app.FragmentManagerImpl.saveAllState(FragmentManagerImpl.java:2335)
10-23 16:12:13.341 8723 8723 E AndroidRuntime: at androidx.fragment.app.FragmentController.saveAllState(FragmentController.java:151)
10-23 16:12:13.341 8723 8723 E AndroidRuntime: at androidx.fragment.app.FragmentActivity.onSaveInstanceState(FragmentActivity.java:513)
10-23 16:12:13.341 8723 8723 E AndroidRuntime: at com.android.settings.SettingsActivity.onSaveInstanceState(SettingsActivity.java:472)
10-23 16:12:13.341 8723 8723 E AndroidRuntime: at android.app.Activity.performSaveInstanceState(Activity.java:2037)
10-23 16:12:13.341 8723 8723 E AndroidRuntime: at android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1485)
10-23 16:12:13.341 8723 8723 E AndroidRuntime: at android.app.ActivityThread.callActivityOnSaveInstanceState(ActivityThread.java:5312)
10-23 16:12:13.341 8723 8723 E AndroidRuntime: at android.app.ActivityThread.callActivityOnStop(ActivityThread.java:4638)
10-23 16:12:13.341 8723 8723 E AndroidRuntime: at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:4602)
10-23 16:12:13.341 8723 8723 E AndroidRuntime: at android.app.ActivityThread.handleStopActivity(ActivityThread.java:4677)
10-23 16:12:13.341 8723 8723 E AndroidRuntime: at android.app.servertransaction.StopActivityItem.execute(StopActivityItem.java:41)
10-23 16:12:13.341 8723 8723 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
10-23 16:12:13.341 8723 8723 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
10-23 16:12:13.341 8723 8723 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2024)
10-23 16:12:13.341 8723 8723 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:107)
10-23 16:12:13.341 8723 8723 E AndroidRuntime: at android.os.Looper.loop(Looper.java:214)
10-23 16:12:13.341 8723 8723 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7385)
10-23 16:12:13.341 8723 8723 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-23 16:12:13.341 8723 8723 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
10-23 16:12:13.341 8723 8723 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

Is this because this permission is blocked on the quest 2 or is this a possible bug?
2 REPLIES 2

batiti
Level 2
same thing here

batiti
Level 2
It does not crash wherever I go , unless I try to show all the apps to display permissions per app and then it crashes every time I click on an app to see the list of permissions