am fb75487f: Merge "Explain what warnIfCallingFromSystemProcess() is about" into klp-dev
* commit 'fb75487f8af748feb83ce3116c4d6dcc4e819027': Explain what warnIfCallingFromSystemProcess() is about
This commit is contained in:
@@ -1827,6 +1827,11 @@ class ContextImpl extends Context {
|
||||
message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs a warning if the system process directly called a method such as
|
||||
* {@link #startService(Intent)} instead of {@link #startServiceAsUser(Intent, UserHandle)}.
|
||||
* The "AsUser" variants allow us to properly enforce the user's restrictions.
|
||||
*/
|
||||
private void warnIfCallingFromSystemProcess() {
|
||||
if (Process.myUid() == Process.SYSTEM_UID) {
|
||||
Slog.w(TAG, "Calling a method in the system process without a qualified user: "
|
||||
|
||||
Reference in New Issue
Block a user