Loading core/java/android/app/SharedPreferencesImpl.java +6 −6 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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"; Loading Loading @@ -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 { Loading Loading @@ -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; } Loading Loading @@ -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; Loading core/java/android/app/backup/BackupAgent.java +7 −8 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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 Loading Loading @@ -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; Loading core/java/android/app/backup/FullBackup.java +3 −4 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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 Loading Loading @@ -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(); } Loading core/java/android/net/LinkAddress.java +7 −7 Original line number Diff line number Diff line Loading @@ -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. Loading core/java/android/net/LocalSocketImpl.java +5 −5 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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(); Loading @@ -268,7 +268,7 @@ class LocalSocketImpl return; } try { Libcore.os.close(fd); Os.close(fd); } catch (ErrnoException e) { e.rethrowAsIOException(); } Loading Loading
core/java/android/app/SharedPreferencesImpl.java +6 −6 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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"; Loading Loading @@ -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 { Loading Loading @@ -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; } Loading Loading @@ -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; Loading
core/java/android/app/backup/BackupAgent.java +7 −8 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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 Loading Loading @@ -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; Loading
core/java/android/app/backup/FullBackup.java +3 −4 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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 Loading Loading @@ -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(); } Loading
core/java/android/net/LinkAddress.java +7 −7 Original line number Diff line number Diff line Loading @@ -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. Loading
core/java/android/net/LocalSocketImpl.java +5 −5 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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(); Loading @@ -268,7 +268,7 @@ class LocalSocketImpl return; } try { Libcore.os.close(fd); Os.close(fd); } catch (ErrnoException e) { e.rethrowAsIOException(); } Loading