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

Commit da2db6bb authored by Mathew Inwood's avatar Mathew Inwood
Browse files

Greylist methods erroneously removed in ag/4397724.

Due to b/79409988, these methods were removed from the greylist when
they should not have been. Reinstate them.

Bug: 79409988
Test: m
Change-Id: I20777f2abb3faba9e915b9ed6884ec8e9adc9767
parent ea1e4131
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.internal.util;

import android.annotation.UnsupportedAppUsage;

import java.io.File;
import java.io.IOException;

@@ -33,6 +35,7 @@ public class JournaledFile {
    File mTemp;
    boolean mWriting;

    @UnsupportedAppUsage
    public JournaledFile(File real, File temp) {
        mReal = real;
        mTemp = temp;
@@ -44,6 +47,7 @@ public class JournaledFile {
     * it to the real one.  If there is both a real file and a temp one, assumes that the
     * temp one isn't fully written and deletes it.
     */
    @UnsupportedAppUsage
    public File chooseForRead() {
        File result;
        if (mReal.exists()) {
@@ -68,6 +72,7 @@ public class JournaledFile {
     * <p>
     * Call {@link #commit} to commit the changes, or {@link #rollback} to forget the changes.
     */
    @UnsupportedAppUsage
    public File chooseForWrite() {
        if (mWriting) {
            throw new IllegalStateException("uncommitted write already in progress");
@@ -95,6 +100,7 @@ public class JournaledFile {
    /**
     * Commit changes.
     */
    @UnsupportedAppUsage
    public void commit() {
        if (!mWriting) {
            throw new IllegalStateException("no file to commit");
@@ -106,6 +112,7 @@ public class JournaledFile {
    /**
     * Roll back changes.
     */
    @UnsupportedAppUsage
    public void rollback() {
        if (!mWriting) {
            throw new IllegalStateException("no file to roll back");