Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 343bb5b7 authored by Atneya Nair's avatar Atneya Nair
Browse files

appops: Update checkOp docs

checkOp (non-raw) actually does evaluate fgdness in most cases, and a
previous change adds package validation functionality. Update the docs
to reflect this.

Test: comment only
Flag: EXEMPT DOCS_ONLY
Bug: 294609684
Change-Id: I2f08ede6f1a05061688757dc0f26bb51770ce46d
parent e5b2400c
Loading
Loading
Loading
Loading
+3 −15
Original line number Diff line number Diff line
@@ -8748,21 +8748,9 @@ public class AppOpsManager {
     * Do a quick check for whether an application might be able to perform an operation.
     * This is <em>not</em> a security check; you must use {@link #noteOp(String, int, String,
     * String, String)} or {@link #startOp(String, int, String, String, String)} for your actual
     * security checks, which also ensure that the given uid and package name are consistent. This
     * function can just be used for a quick check to see if an operation has been disabled for the
     * application, as an early reject of some work.  This does not modify the time stamp or other
     * data about the operation.
     *
     * <p>Important things this will not do (which you need to ultimate use
     * {@link #noteOp(String, int, String, String, String)} or
     * {@link #startOp(String, int, String, String, String)} to cover):</p>
     * <ul>
     *     <li>Verifying the uid and package are consistent, so callers can't spoof
     *     their identity.</li>
     *     <li>Taking into account the current foreground/background state of the
     *     app; apps whose mode varies by this state will always be reported
     *     as {@link #MODE_ALLOWED}.</li>
     * </ul>
     * security checks. This function can just be used for a quick check to see if an operation has
     * been disabled for the application, as an early reject of some work.  This does not modify the
     * time stamp or other data about the operation.
     *
     * @param op The operation to check.  One of the OPSTR_* constants.
     * @param uid The user id of the application attempting to perform the operation.