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

Commit 74af8b54 authored by Elliott Hughes's avatar Elliott Hughes Committed by Android (Google) Code Review
Browse files

Merge "Move internal libcore.os users over to android.system."

parents 5830df4d f97c6335
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -26,6 +26,9 @@ import android.content.pm.PackageInfo;
import android.os.Environment;
import android.os.ParcelFileDescriptor;
import android.os.SELinux;
import android.system.ErrnoException;
import android.system.Os;
import android.system.StructStat;
import android.util.Log;

import com.android.org.bouncycastle.util.encoders.Base64;
@@ -37,10 +40,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;

import libcore.io.ErrnoException;
import libcore.io.Libcore;
import libcore.io.StructStat;
import static libcore.io.OsConstants.*;
import static android.system.OsConstants.*;

/**
 * Backup transport for stashing stuff into a known location on disk, and
@@ -109,7 +109,7 @@ public class LocalTransport extends IBackupTransport.Stub {
    public int performBackup(PackageInfo packageInfo, ParcelFileDescriptor data) {
        if (DEBUG) {
            try {
            StructStat ss = Libcore.os.fstat(data.getFileDescriptor());
            StructStat ss = Os.fstat(data.getFileDescriptor());
            Log.v(TAG, "performBackup() pkg=" + packageInfo.packageName
                    + " size=" + ss.st_size);
            } catch (ErrnoException e) {
@@ -152,7 +152,7 @@ public class LocalTransport extends IBackupTransport.Stub {
                    changeSet.readEntityData(buf, 0, dataSize);
                    if (DEBUG) {
                        try {
                            long cur = Libcore.os.lseek(data.getFileDescriptor(), 0, SEEK_CUR);
                            long cur = Os.lseek(data.getFileDescriptor(), 0, SEEK_CUR);
                            Log.v(TAG, "  read entity data; new pos=" + cur);
                        }
                        catch (ErrnoException e) {
+3 −3
Original line number Diff line number Diff line
@@ -21,11 +21,11 @@ import static android.drm.DrmManagerClient.INVALID_SESSION;
import static libcore.io.OsConstants.SEEK_SET;

import android.os.ParcelFileDescriptor;
import android.system.ErrnoException;
import android.system.Os;
import android.util.Log;

import libcore.io.ErrnoException;
import libcore.io.IoBridge;
import libcore.io.Libcore;
import libcore.io.Streams;

import java.io.FileDescriptor;
@@ -69,7 +69,7 @@ public class DrmOutputStream extends OutputStream {
        final DrmConvertedStatus status = mClient.closeConvertSession(mSessionId);
        if (status.statusCode == STATUS_OK) {
            try {
                Libcore.os.lseek(mFd, status.offset, SEEK_SET);
                Os.lseek(mFd, status.offset, SEEK_SET);
            } catch (ErrnoException e) {
                e.rethrowAsIOException();
            }
+3 −4
Original line number Diff line number Diff line
@@ -74,6 +74,8 @@ import android.os.WorkSource;
import android.os.Environment.UserEnvironment;
import android.os.storage.IMountService;
import android.provider.Settings;
import android.system.ErrnoException;
import android.system.Os;
import android.util.EventLog;
import android.util.Log;
import android.util.Slog;
@@ -142,9 +144,6 @@ import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.spec.SecretKeySpec;

import libcore.io.ErrnoException;
import libcore.io.Libcore;

public class BackupManagerService extends IBackupManager.Stub {

    private static final String TAG = "BackupManagerService";
@@ -2471,7 +2470,7 @@ public class BackupManagerService extends IBackupManager.Stub {
                // operations any more during this pass).
                Slog.w(TAG, "Unable to save widget state for " + pkgName);
                try {
                    Libcore.os.ftruncate(fd, filepos);
                    Os.ftruncate(fd, filepos);
                } catch (ErrnoException ee) {
                    Slog.w(TAG, "Unable to roll back!");
                }