sentry-java icon indicating copy to clipboard operation
sentry-java copied to clipboard

Report if `DEVELOPMENT_SETTINGS_ENABLED` is enabled on Android

Open marandaneto opened this issue 2 years ago • 4 comments

Description

This can be part of the device context most likely.

fun Context.isDeveloperOptionsEnabled(): Boolean = Settings.Global.getInt(
    contentResolver, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0
) != 0

marandaneto avatar Jul 06 '23 11:07 marandaneto

@marandaneto Do you have specific use-cases for this in mind? We're wondering if it makes sense to provide more granular information (e.g. Do not keep activities is enabled or not) in addition / instead.

markushi avatar Jul 12 '23 14:07 markushi

Let's check which level of detail can be read out

markushi avatar Jul 19 '23 13:07 markushi

Update: Yes, we could retrieve some more granular settings, e.g.

Settings.Global.ALWAYS_FINISH_ACTIVITIES,
Settings.Global.AIRPLANE_MODE_ON,
Settings.Global.ADB_ENABLED,
Settings.Global.DEVELOPMENT_SETTINGS_ENABLED,
Settings.Global.DATA_ROAMING

markushi avatar Jul 26 '23 09:07 markushi

Let's remember to update relay with the new fields

stefanosiano avatar Jul 26 '23 13:07 stefanosiano