I get java.lang.SecurityException when try to startActivityForResult(intent, requestCode);
with final Intent intent = new Intent(Settings.ACTION_USAGE_ACC
For whatever reason, Huawei left the <intent-filter>
in place for this activity, but they marked it as not exported. There is no way that you can start the activity. All you can do is catch the exception and explain to the user that you cannot navigate there.
According to android developer documentation.
In some cases, a matching Activity may not exist, so ensure you safeguard against this.
Link : ACTION_USAGE_ACCESS_SETTINGS