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

Commit 37a3e86a authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Print warning log for uses of -f/-F on non-ADB UID.

When an app executes the requestsync command with their own UID,
-f and -F cannot be used.

Let's log it on logcat to make it prominent. People often throw away
command output.

Change-Id: Ie0219e9bdea20edc290785f84a101bb546380136
Fixes: 78901672
Test: manual test
parent 4d099ddc
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1279,7 +1279,9 @@ public final class ContentService extends IContentService.Stub {
                case Process.SYSTEM_UID:
                    break; // Okay
                default:
                    throw new SecurityException("Invalid extras specified.");
                    final String msg = "Invalid extras specified.";
                    Log.w(TAG, msg + " requestsync -f/-F needs to run on 'adb shell'");
                    throw new SecurityException(msg);
            }
        }
    }