ClipboardService: Restore different method calls to AppOps to fix PG
Commit 34ffba62 'Limit instant app access to clipboard' (AOSP Bug-ID: 34231507) has introduced the new method 'clipboardAccessAllowed', which replaces all AppOps calls. However, whilst the previous coding made use of the methods checkOp, noteOp and checkOpNoThrow, the new method only uses method 'checkOp'. Different from 'noteOp', the 'checkOp' call only performs a check without setting the counter or initializing the Op. As a consequence, ClipBoard access did not show up any longer in Lineage's Privacy Guard, hence users couldn't control anymore the apps accordingly. This change aims at restoring the former call behavior by extending the 'clipboardAccessAllowed' method with a parameter to specify the AppOp calling method according to the former code, which fixes the Privacy Guard issue. Change-Id: I4db7b4f043eb39068cd7a6346a0eb645648cfada
Loading
Please register or sign in to comment