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

Commit 60bca4e4 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by android-build-merger
Browse files

Enforce PACKAGE_USAGE_STATS for usage data. am: 6df866a8

am: 979f227f

Change-Id: Ia3aaf773b4defb4b1399544ff7475cd4142f16aa
parents 558b0dd4 979f227f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -11139,7 +11139,7 @@ if (MORE_DEBUG) Slog.v(TAG, " + got " + nRead + "; now wanting " + (size - soF
    }
    }
    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;
        if (!DumpUtils.checkDumpAndUsageStatsPermission(mContext, TAG, pw)) return;
        long identityToken = Binder.clearCallingIdentity();
        long identityToken = Binder.clearCallingIdentity();
        try {
        try {
+1 −1
Original line number Original line Diff line number Diff line
@@ -1385,7 +1385,7 @@ class AlarmManagerService extends SystemService {


        @Override
        @Override
        protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
            if (!DumpUtils.checkDumpPermission(getContext(), TAG, pw)) return;
            if (!DumpUtils.checkDumpAndUsageStatsPermission(getContext(), TAG, pw)) return;
            dumpImpl(pw);
            dumpImpl(pw);
        }
        }
    };
    };
+1 −1
Original line number Original line Diff line number Diff line
@@ -2029,7 +2029,7 @@ public class AppOpsService extends IAppOpsService.Stub {


    @Override
    @Override
    protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
    protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;
        if (!DumpUtils.checkDumpAndUsageStatsPermission(mContext, TAG, pw)) return;


        if (args != null) {
        if (args != null) {
            for (int i=0; i<args.length; i++) {
            for (int i=0; i<args.length; i++) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -63,7 +63,7 @@ public class DiskStatsService extends Binder {


    @Override
    @Override
    protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
    protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;
        if (!DumpUtils.checkDumpAndUsageStatsPermission(mContext, TAG, pw)) return;


        // Run a quick-and-dirty performance test: write 512 bytes
        // Run a quick-and-dirty performance test: write 512 bytes
        byte[] junk = new byte[512];
        byte[] junk = new byte[512];
+1 −1
Original line number Original line Diff line number Diff line
@@ -351,7 +351,7 @@ public final class DropBoxManagerService extends SystemService {
    }
    }


    public synchronized void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
    public synchronized void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        if (!DumpUtils.checkDumpPermission(getContext(), TAG, pw)) return;
        if (!DumpUtils.checkDumpAndUsageStatsPermission(getContext(), TAG, pw)) return;


        try {
        try {
            init();
            init();
Loading