Closed Bug 1255554 Opened 9 years ago Closed 4 years ago

[Lint: MissingPermission #2] Fix permissions in tests & add error to lint.xml

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: mcomella, Unassigned)

References

Details

Sebastian, the warnings are in FennecInstrumentationTestRunner: ../../../../../../../mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecInstrumentationTestRunner.java:51: Missing permissions required by KeyguardManager.KeyguardLock.disableKeyguard: android.permission.DISABLE_KEYGUARD 48 final KeyguardManager keyguard = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE); 49 // Deprecated in favour of window flags, which aren't appropriate here. 50 keyguardLock = keyguard.newKeyguardLock(name); 51 keyguardLock.disableKeyguard(); 52 53 // Wake up the screen. ../../../../../../../mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecInstrumentationTestRunner.java:76: Missing permissions required by KeyguardManager.KeyguardLock.reenableKeyguard: android.permission.DISABLE_KEYGUARD 73 } 74 if (keyguardLock != null) { 75 // Deprecated in favour of window flags, which aren't appropriate here. 76 keyguardLock.reenableKeyguard(); 77 } 78 } Do these need to be fixed?
Flags: needinfo?(s.kaspari)
Good question. It looks like all our testing manifests include the permission: https://dxr.mozilla.org/mozilla-central/search?q=DISABLE_KEYGUARD&redirect=false&case=true The permission itself has protection level "normal". So this is not affected by runtime permissions on Android 6+: http://developer.android.com/reference/android/Manifest.permission.html#DISABLE_KEYGUARD I almost think this is a false alarm. This has been added in bug 1168175. And I recently saw bug 1247697 rush by: The SecurityException was actually thrown during test. nalexander pushed a patch that suppresses the exception. nalexander: Do you have any more background on this?
Flags: needinfo?(s.kaspari) → needinfo?(nalexander)
> nalexander: Do you have any more background on this? This might be https://code.google.com/p/android/issues/detail?id=187041. I'm inclined to just ignore this for now.
Flags: needinfo?(nalexander)
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.