diff options
| author | Narayan Kamath <narayan@google.com> | 2014-01-08 12:05:13 +0000 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2014-01-08 12:05:13 +0000 |
| commit | 651807fcd0b1012ea848efe5f67b4381d8ce6797 (patch) | |
| tree | e5728c4731c73b0a5d5d3f3f698a2dcc2e01baf1 /core/java | |
| parent | 72a8fe6d03a7c9e88e8fdd7181ca6896a2d475eb (diff) | |
| parent | 3f589e5d1e09e17a2aaa0a52fc15e16520d1bd5a (diff) | |
am 3f589e5d: am 2842bd02: am de8c3cf1: Merge "AArch64: Use long for pointers in App/Backup"
* commit '3f589e5d1e09e17a2aaa0a52fc15e16520d1bd5a':
AArch64: Use long for pointers in App/Backup
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/app/NativeActivity.java | 37 | ||||
| -rw-r--r-- | core/java/android/app/backup/BackupDataInput.java | 12 | ||||
| -rw-r--r-- | core/java/android/app/backup/BackupDataOutput.java | 12 | ||||
| -rw-r--r-- | core/java/android/app/backup/FileBackupHelperBase.java | 13 |
4 files changed, 36 insertions, 38 deletions
diff --git a/core/java/android/app/NativeActivity.java b/core/java/android/app/NativeActivity.java index 4ca37476db6a..2e05edb2e7d9 100644 --- a/core/java/android/app/NativeActivity.java +++ b/core/java/android/app/NativeActivity.java @@ -76,7 +76,7 @@ public class NativeActivity extends Activity implements SurfaceHolder.Callback2, private NativeContentView mNativeContentView; private InputMethodManager mIMM; - private int mNativeHandle; + private long mNativeHandle; private InputQueue mCurInputQueue; private SurfaceHolder mCurSurfaceHolder; @@ -91,27 +91,26 @@ public class NativeActivity extends Activity implements SurfaceHolder.Callback2, private boolean mDestroyed; - private native int loadNativeCode(String path, String funcname, MessageQueue queue, + private native long loadNativeCode(String path, String funcname, MessageQueue queue, String internalDataPath, String obbPath, String externalDataPath, int sdkVersion, AssetManager assetMgr, byte[] savedState); - private native void unloadNativeCode(int handle); - - private native void onStartNative(int handle); - private native void onResumeNative(int handle); - private native byte[] onSaveInstanceStateNative(int handle); - private native void onPauseNative(int handle); - private native void onStopNative(int handle); - private native void onConfigurationChangedNative(int handle); - private native void onLowMemoryNative(int handle); - private native void onWindowFocusChangedNative(int handle, boolean focused); - private native void onSurfaceCreatedNative(int handle, Surface surface); - private native void onSurfaceChangedNative(int handle, Surface surface, + private native void unloadNativeCode(long handle); + private native void onStartNative(long handle); + private native void onResumeNative(long handle); + private native byte[] onSaveInstanceStateNative(long handle); + private native void onPauseNative(long handle); + private native void onStopNative(long handle); + private native void onConfigurationChangedNative(long handle); + private native void onLowMemoryNative(long handle); + private native void onWindowFocusChangedNative(long handle, boolean focused); + private native void onSurfaceCreatedNative(long handle, Surface surface); + private native void onSurfaceChangedNative(long handle, Surface surface, int format, int width, int height); - private native void onSurfaceRedrawNeededNative(int handle, Surface surface); - private native void onSurfaceDestroyedNative(int handle); - private native void onInputQueueCreatedNative(int handle, int queuePtr); - private native void onInputQueueDestroyedNative(int handle, int queuePtr); - private native void onContentRectChangedNative(int handle, int x, int y, int w, int h); + private native void onSurfaceRedrawNeededNative(long handle, Surface surface); + private native void onSurfaceDestroyedNative(long handle); + private native void onInputQueueCreatedNative(long handle, long queuePtr); + private native void onInputQueueDestroyedNative(long handle, long queuePtr); + private native void onContentRectChangedNative(long handle, int x, int y, int w, int h); static class NativeContentView extends View { NativeActivity mActivity; diff --git a/core/java/android/app/backup/BackupDataInput.java b/core/java/android/app/backup/BackupDataInput.java index 43b920a9b180..03205fb05d52 100644 --- a/core/java/android/app/backup/BackupDataInput.java +++ b/core/java/android/app/backup/BackupDataInput.java @@ -59,7 +59,7 @@ import java.io.IOException; * }</pre> */ public class BackupDataInput { - int mBackupReader; + long mBackupReader; private EntityHeader mHeader = new EntityHeader(); private boolean mHeaderReady; @@ -185,10 +185,10 @@ public class BackupDataInput { } } - private native static int ctor(FileDescriptor fd); - private native static void dtor(int mBackupReader); + private native static long ctor(FileDescriptor fd); + private native static void dtor(long mBackupReader); - private native int readNextHeader_native(int mBackupReader, EntityHeader entity); - private native int readEntityData_native(int mBackupReader, byte[] data, int offset, int size); - private native int skipEntityData_native(int mBackupReader); + private native int readNextHeader_native(long mBackupReader, EntityHeader entity); + private native int readEntityData_native(long mBackupReader, byte[] data, int offset, int size); + private native int skipEntityData_native(long mBackupReader); } diff --git a/core/java/android/app/backup/BackupDataOutput.java b/core/java/android/app/backup/BackupDataOutput.java index 22668b6533ab..3a070b602c12 100644 --- a/core/java/android/app/backup/BackupDataOutput.java +++ b/core/java/android/app/backup/BackupDataOutput.java @@ -62,7 +62,7 @@ import java.io.IOException; * @see BackupAgent */ public class BackupDataOutput { - int mBackupWriter; + long mBackupWriter; /** @hide */ public BackupDataOutput(FileDescriptor fd) { @@ -121,11 +121,11 @@ public class BackupDataOutput { } } - private native static int ctor(FileDescriptor fd); - private native static void dtor(int mBackupWriter); + private native static long ctor(FileDescriptor fd); + private native static void dtor(long mBackupWriter); - private native static int writeEntityHeader_native(int mBackupWriter, String key, int dataSize); - private native static int writeEntityData_native(int mBackupWriter, byte[] data, int size); - private native static void setKeyPrefix_native(int mBackupWriter, String keyPrefix); + private native static int writeEntityHeader_native(long mBackupWriter, String key, int dataSize); + private native static int writeEntityData_native(long mBackupWriter, byte[] data, int size); + private native static void setKeyPrefix_native(long mBackupWriter, String keyPrefix); } diff --git a/core/java/android/app/backup/FileBackupHelperBase.java b/core/java/android/app/backup/FileBackupHelperBase.java index 887a2e69374c..4ed5197aa6b4 100644 --- a/core/java/android/app/backup/FileBackupHelperBase.java +++ b/core/java/android/app/backup/FileBackupHelperBase.java @@ -29,7 +29,7 @@ import java.io.FileDescriptor; class FileBackupHelperBase { private static final String TAG = "FileBackupHelperBase"; - int mPtr; + long mPtr; Context mContext; boolean mExceptionLogged; @@ -115,14 +115,13 @@ class FileBackupHelperBase { return false; } - private static native int ctor(); - private static native void dtor(int ptr); + private static native long ctor(); + private static native void dtor(long ptr); native private static int performBackup_native(FileDescriptor oldState, - int data, FileDescriptor newState, String[] files, String[] keys); - - private static native int writeFile_native(int ptr, String filename, int backupReader); - private static native int writeSnapshot_native(int ptr, FileDescriptor fd); + long data, FileDescriptor newState, String[] files, String[] keys); + private static native int writeFile_native(long ptr, String filename, long backupReader); + private static native int writeSnapshot_native(long ptr, FileDescriptor fd); } |
