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

Commit 6ef9f5e2 authored by Li Li's avatar Li Li Committed by Automerger Merge Worker
Browse files

Merge "Freezer: check freeze binder ioctl" into sc-dev-plus-aosp am: c4efd926

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15856979

Change-Id: I0abdc81e4c7b287fcd3a35686a19f34d58a51df0
parents 03b3d827 c4efd926
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -645,21 +645,25 @@ public final class CachedAppOptimizer {
            char state = (char) fr.read();

            if (state == '1' || state == '0') {
                // Also check freezer binder ioctl
                getBinderFreezeInfo(Process.myPid());
                supported = true;
            } else {
                Slog.e(TAG_AM, "unexpected value in cgroup.freeze");
            }
        } catch (java.io.FileNotFoundException e) {
            Slog.d(TAG_AM, "cgroup.freeze not present");
            Slog.w(TAG_AM, "cgroup.freeze not present");
        } catch (RuntimeException e) {
            Slog.w(TAG_AM, "unable to read freezer info");
        } catch (Exception e) {
            Slog.d(TAG_AM, "unable to read cgroup.freeze: " + e.toString());
            Slog.w(TAG_AM, "unable to read cgroup.freeze: " + e.toString());
        }

        if (fr != null) {
            try {
                fr.close();
            } catch (java.io.IOException e) {
                Slog.e(TAG_AM, "Exception closing freezer.killable: " + e.toString());
                Slog.e(TAG_AM, "Exception closing cgroup.freeze: " + e.toString());
            }
        }