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

Commit 5a1b6c43 authored by Danny Baumann's avatar Danny Baumann Committed by Steve Kondik
Browse files

Don't remove permission checks for no reason.

Change I684c271f2b52af56090e8b26013c94c8c4a56b65 removed those checks,
but no reason was given and grepping the whole source tree for getTasks
didn't yield any result either.
parent 044e8495
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -4730,7 +4730,6 @@ public final class ActivityManagerService extends ActivityManagerNative
            if (localLOGV) Slog.v(
                TAG, "getTasks: max=" + maxNum + ", flags=" + flags
                + ", receiver=" + receiver);
	    /** This could be bad? Possibly, Might look into better way to do it: Pedlar
            if (checkCallingPermission(android.Manifest.permission.GET_TASKS)
                    != PackageManager.PERMISSION_GRANTED) {
                if (receiver != null) {
@@ -4747,7 +4746,7 @@ public final class ActivityManagerService extends ActivityManagerNative
                        + " requires " + android.Manifest.permission.GET_TASKS;
                Slog.w(TAG, msg);
                throw new SecurityException(msg);
            } **/
            }

            int pos = mMainStack.mHistory.size()-1;
            ActivityRecord next =
@@ -4859,8 +4858,8 @@ public final class ActivityManagerService extends ActivityManagerNative
    public List<ActivityManager.RecentTaskInfo> getRecentTasks(int maxNum,
            int flags) {
        synchronized (this) {
            //enforceCallingPermission(android.Manifest.permission.GET_TASKS,
            //        "getRecentTasks()");
            enforceCallingPermission(android.Manifest.permission.GET_TASKS,
                    "getRecentTasks()");

            IPackageManager pm = AppGlobals.getPackageManager();