Default screen context permissions for NIU Actions
This updates the checks for ASSIST_STRUCTURE_ENABLED and ASSIST_SCREENSHOT_ENABLED to return 1 if the settings do not exist. This matches the logic in the Settings app iself, which has the toggle boxes on by default but does not actually initialize those values until they are toggled for the first time. Bug: 187868947 Test: Manual (tested on Pixel 3A) Change-Id: I4ef067dcf21b40eea71199e057d7a00d1d8fb2b3
This commit is contained in:
parent
3e0c115196
commit
9e0189bac6
|
@ -170,9 +170,9 @@ public final class TaskOverlayFactoryGo extends TaskOverlayFactory {
|
|||
public void checkPermissions() {
|
||||
ContentResolver contentResolver = mApplicationContext.getContentResolver();
|
||||
boolean structureEnabled = Settings.Secure.getInt(contentResolver,
|
||||
Settings.Secure.ASSIST_STRUCTURE_ENABLED, 0) != 0;
|
||||
Settings.Secure.ASSIST_STRUCTURE_ENABLED, 1) != 0;
|
||||
boolean screenshotEnabled = Settings.Secure.getInt(contentResolver,
|
||||
Settings.Secure.ASSIST_SCREENSHOT_ENABLED, 0) != 0;
|
||||
Settings.Secure.ASSIST_SCREENSHOT_ENABLED, 1) != 0;
|
||||
mAssistPermissionsEnabled = structureEnabled && screenshotEnabled;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue