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

Commit 685a0a72 authored by Elliott Hughes's avatar Elliott Hughes Committed by Android Git Automerger
Browse files

am bbd87eb9: Merge "Track libcore.os\' move to android.system."

* commit 'bbd87eb9':
  Track libcore.os' move to android.system.
parents 18582a82 bbd87eb9
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -19,6 +19,9 @@ package android.app;
import android.content.SharedPreferences;
import android.os.FileUtils;
import android.os.Looper;
import android.system.ErrnoException;
import android.system.Os;
import android.system.StructStat;
import android.util.Log;

import com.google.android.collect.Maps;
@@ -44,10 +47,7 @@ import java.util.WeakHashMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;

import libcore.io.ErrnoException;
import libcore.io.IoUtils;
import libcore.io.Libcore;
import libcore.io.StructStat;

final class SharedPreferencesImpl implements SharedPreferences {
    private static final String TAG = "SharedPreferencesImpl";
@@ -111,7 +111,7 @@ final class SharedPreferencesImpl implements SharedPreferences {
        Map map = null;
        StructStat stat = null;
        try {
            stat = Libcore.os.stat(mFile.getPath());
            stat = Os.stat(mFile.getPath());
            if (mFile.canRead()) {
                BufferedInputStream str = null;
                try {
@@ -173,7 +173,7 @@ final class SharedPreferencesImpl implements SharedPreferences {
             * violation, but we explicitly want this one.
             */
            BlockGuard.getThreadPolicy().onReadFromDisk();
            stat = Libcore.os.stat(mFile.getPath());
            stat = Os.stat(mFile.getPath());
        } catch (ErrnoException e) {
            return true;
        }
@@ -600,7 +600,7 @@ final class SharedPreferencesImpl implements SharedPreferences {
            str.close();
            ContextImpl.setFilePermissionsFromMode(mFile.getPath(), mMode, 0);
            try {
                final StructStat stat = Libcore.os.stat(mFile.getPath());
                final StructStat stat = Os.stat(mFile.getPath());
                synchronized (this) {
                    mStatTimestamp = stat.st_mtime;
                    mStatSize = stat.st_size;
+7 −8
Original line number Diff line number Diff line
@@ -29,6 +29,10 @@ import android.os.Looper;
import android.os.ParcelFileDescriptor;
import android.os.Process;
import android.os.RemoteException;
import android.system.ErrnoException;
import android.system.Os;
import android.system.OsConstants;
import android.system.StructStat;
import android.util.Log;

import java.io.File;
@@ -38,11 +42,6 @@ import java.util.HashSet;
import java.util.LinkedList;
import java.util.concurrent.CountDownLatch;

import libcore.io.ErrnoException;
import libcore.io.Libcore;
import libcore.io.OsConstants;
import libcore.io.StructStat;

/**
 * Provides the central interface between an
 * application and Android's data backup infrastructure.  An application that wishes
@@ -412,7 +411,7 @@ public abstract class BackupAgent extends ContextWrapper {
                    }

                    // If it's a directory, enqueue its contents for scanning.
                    StructStat stat = Libcore.os.lstat(filePath);
                    StructStat stat = Os.lstat(filePath);
                    if (OsConstants.S_ISLNK(stat.st_mode)) {
                        if (DEBUG) Log.i(TAG, "Symlink (skipping)!: " + file);
                        continue;
+3 −4
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@ import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.os.ParcelFileDescriptor;
import android.system.ErrnoException;
import android.system.Os;
import android.util.Log;

import java.io.File;
@@ -27,9 +29,6 @@ import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

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

/**
 * Global constant definitions et cetera related to the full-backup-to-fd
 * binary format.  Nothing in this namespace is part of any API; it's all
@@ -150,7 +149,7 @@ public class FullBackup {
            try {
                // explicitly prevent emplacement of files accessible by outside apps
                mode &= 0700;
                Libcore.os.chmod(outFile.getPath(), (int)mode);
                Os.chmod(outFile.getPath(), (int)mode);
            } catch (ErrnoException e) {
                e.rethrowAsIOException();
            }
+7 −7
Original line number Diff line number Diff line
@@ -24,13 +24,13 @@ import java.net.InetAddress;
import java.net.InterfaceAddress;
import java.net.UnknownHostException;

import static libcore.io.OsConstants.IFA_F_DADFAILED;
import static libcore.io.OsConstants.IFA_F_DEPRECATED;
import static libcore.io.OsConstants.IFA_F_TENTATIVE;
import static libcore.io.OsConstants.RT_SCOPE_HOST;
import static libcore.io.OsConstants.RT_SCOPE_LINK;
import static libcore.io.OsConstants.RT_SCOPE_SITE;
import static libcore.io.OsConstants.RT_SCOPE_UNIVERSE;
import static android.system.OsConstants.IFA_F_DADFAILED;
import static android.system.OsConstants.IFA_F_DEPRECATED;
import static android.system.OsConstants.IFA_F_TENTATIVE;
import static android.system.OsConstants.RT_SCOPE_HOST;
import static android.system.OsConstants.RT_SCOPE_LINK;
import static android.system.OsConstants.RT_SCOPE_SITE;
import static android.system.OsConstants.RT_SCOPE_UNIVERSE;

/**
 * Identifies an IP address on a network link.
+5 −5
Original line number Diff line number Diff line
@@ -22,9 +22,9 @@ import java.io.InputStream;
import java.io.FileDescriptor;
import java.net.SocketOptions;

import libcore.io.ErrnoException;
import libcore.io.Libcore;
import libcore.io.OsConstants;
import android.system.ErrnoException;
import android.system.Os;
import android.system.OsConstants;

/**
 * Socket implementation used for android.net.LocalSocket and
@@ -248,7 +248,7 @@ class LocalSocketImpl
                    throw new IllegalStateException("unknown sockType");
            }
            try {
                fd = Libcore.os.socket(OsConstants.AF_UNIX, osType, 0);
                fd = Os.socket(OsConstants.AF_UNIX, osType, 0);
                mFdCreatedInternally = true;
            } catch (ErrnoException e) {
                e.rethrowAsIOException();
@@ -268,7 +268,7 @@ class LocalSocketImpl
                return;
            }
            try {
                Libcore.os.close(fd);
                Os.close(fd);
            } catch (ErrnoException e) {
                e.rethrowAsIOException();
            }
Loading