Loading api/current.xml +2 −2 Original line number Diff line number Diff line Loading @@ -23853,11 +23853,11 @@ <parameter name="holder" type="android.view.SurfaceHolder"> </parameter> </method> <field name="KEY_NATIVE_SAVED_STATE" <field name="META_DATA_FUNC_NAME" type="java.lang.String" transient="false" volatile="false" value=""android:native_state"" value=""android.app.func_name"" static="true" final="true" deprecated="not deprecated" core/java/android/app/NativeActivity.java +19 −4 Original line number Diff line number Diff line Loading @@ -5,7 +5,6 @@ import com.android.internal.view.IInputMethodSession; import android.content.Context; import android.content.pm.ActivityInfo; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.res.AssetManager; import android.content.res.Configuration; Loading Loading @@ -48,9 +47,22 @@ import java.lang.ref.WeakReference; */ public class NativeActivity extends Activity implements SurfaceHolder.Callback2, InputQueue.Callback, OnGlobalLayoutListener { /** * Optional meta-that can be in the manifest for this component, specifying * the name of the native shared library to load. If not specified, * "main" is used. */ public static final String META_DATA_LIB_NAME = "android.app.lib_name"; public static final String KEY_NATIVE_SAVED_STATE = "android:native_state"; /** * Optional meta-that can be in the manifest for this component, specifying * the name of the main entry point for this native activity in the * {@link #META_DATA_LIB_NAME} native code. If not specified, * "ANativeActivity_onCreate" is used. */ public static final String META_DATA_FUNC_NAME = "android.app.func_name"; private static final String KEY_NATIVE_SAVED_STATE = "android:native_state"; private NativeContentView mNativeContentView; private InputMethodManager mIMM; Loading @@ -71,7 +83,7 @@ public class NativeActivity extends Activity implements SurfaceHolder.Callback2, private boolean mDestroyed; private native int loadNativeCode(String path, MessageQueue queue, private native int loadNativeCode(String path, String funcname, MessageQueue queue, String internalDataPath, String externalDataPath, int sdkVersion, AssetManager assetMgr, byte[] savedState); private native void unloadNativeCode(int handle); Loading Loading @@ -131,6 +143,7 @@ public class NativeActivity extends Activity implements SurfaceHolder.Callback2, @Override protected void onCreate(Bundle savedInstanceState) { String libname = "main"; String funcname = "ANativeActivity_onCreate"; ActivityInfo ai; mIMM = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); Loading @@ -155,6 +168,8 @@ public class NativeActivity extends Activity implements SurfaceHolder.Callback2, if (ai.metaData != null) { String ln = ai.metaData.getString(META_DATA_LIB_NAME); if (ln != null) libname = ln; ln = ai.metaData.getString(META_DATA_FUNC_NAME); if (ln != null) funcname = ln; } } catch (PackageManager.NameNotFoundException e) { throw new RuntimeException("Error getting activity info", e); Loading @@ -175,7 +190,7 @@ public class NativeActivity extends Activity implements SurfaceHolder.Callback2, byte[] nativeSavedState = savedInstanceState != null ? savedInstanceState.getByteArray(KEY_NATIVE_SAVED_STATE) : null; mNativeHandle = loadNativeCode(path, Looper.myQueue(), mNativeHandle = loadNativeCode(path, funcname, Looper.myQueue(), getFilesDir().toString(), Environment.getExternalStorageAppFilesDirectory(ai.packageName).toString(), Build.VERSION.SDK_INT, getAssets(), nativeSavedState); Loading core/java/android/nfc/NdefTag.java +1 −0 Original line number Diff line number Diff line Loading @@ -205,6 +205,7 @@ public class NdefTag extends Tag implements Parcelable { dest.writeStringArray(mNdefTargets); dest.writeInt(mMessages.length); for (NdefMessage[] ms : mMessages) { dest.writeInt(ms.length); dest.writeTypedArray(ms, flags); } } Loading core/java/android/nfc/RawTagConnection.java +0 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,6 @@ public class RawTagConnection { mService = service; mTagService = service.getNfcTagInterface(); mService.openTagConnection(tag); // TODO(nxp): don't connect until connect() mTag = tag; mSelectedTarget = target; } Loading core/java/android/nfc/Tag.java +13 −1 Original line number Diff line number Diff line Loading @@ -149,6 +149,12 @@ public class Tag implements Parcelable { * Get the low-level bytes returned by this Tag at poll-time. * <p>These can be used to help with advanced identification of a Tag. * <p>The meaning of these bytes depends on the Tag technology. * <p>ISO14443-3A: ATQA/SENS_RES * <p>ISO14443-3B: Application data (4 bytes) and Protocol Info (3 bytes) from ATQB/SENSB_RES * <p>JIS_X_6319_4: PAD0 (2 byte), PAD1 (2 byte), MRTI(2 byte), PAD2 (1 byte), RC (2 byte) * <p>ISO15693: response flags (1 byte), DSFID (1 byte) * from SENSF_RES * * @return poll bytes, or null if they do not exist for this Tag technology */ public byte[] getPollBytes() { Loading @@ -159,6 +165,12 @@ public class Tag implements Parcelable { * Get the low-level bytes returned by this Tag at activation-time. * <p>These can be used to help with advanced identification of a Tag. * <p>The meaning of these bytes depends on the Tag technology. * <p>ISO14443-3A: SAK/SEL_RES * <p>ISO14443-3B: null * <p>ISO14443-3A & ISO14443-4: SAK/SEL_RES, historical bytes from ATS <TODO: confirm> * <p>ISO14443-3B & ISO14443-4: ATTRIB response * <p>JIS_X_6319_4: null * <p>ISO15693: response flags (1 byte), DSFID (1 byte): null * @return activation bytes, or null if they do not exist for this Tag technology */ public byte[] getActivationBytes() { Loading @@ -185,7 +197,7 @@ public class Tag implements Parcelable { /*package*/ static byte[] readBytesWithNull(Parcel in) { int len = in.readInt(); byte[] result = null; if (len > 0) { if (len >= 0) { result = new byte[len]; in.readByteArray(result); } Loading Loading
api/current.xml +2 −2 Original line number Diff line number Diff line Loading @@ -23853,11 +23853,11 @@ <parameter name="holder" type="android.view.SurfaceHolder"> </parameter> </method> <field name="KEY_NATIVE_SAVED_STATE" <field name="META_DATA_FUNC_NAME" type="java.lang.String" transient="false" volatile="false" value=""android:native_state"" value=""android.app.func_name"" static="true" final="true" deprecated="not deprecated"
core/java/android/app/NativeActivity.java +19 −4 Original line number Diff line number Diff line Loading @@ -5,7 +5,6 @@ import com.android.internal.view.IInputMethodSession; import android.content.Context; import android.content.pm.ActivityInfo; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.res.AssetManager; import android.content.res.Configuration; Loading Loading @@ -48,9 +47,22 @@ import java.lang.ref.WeakReference; */ public class NativeActivity extends Activity implements SurfaceHolder.Callback2, InputQueue.Callback, OnGlobalLayoutListener { /** * Optional meta-that can be in the manifest for this component, specifying * the name of the native shared library to load. If not specified, * "main" is used. */ public static final String META_DATA_LIB_NAME = "android.app.lib_name"; public static final String KEY_NATIVE_SAVED_STATE = "android:native_state"; /** * Optional meta-that can be in the manifest for this component, specifying * the name of the main entry point for this native activity in the * {@link #META_DATA_LIB_NAME} native code. If not specified, * "ANativeActivity_onCreate" is used. */ public static final String META_DATA_FUNC_NAME = "android.app.func_name"; private static final String KEY_NATIVE_SAVED_STATE = "android:native_state"; private NativeContentView mNativeContentView; private InputMethodManager mIMM; Loading @@ -71,7 +83,7 @@ public class NativeActivity extends Activity implements SurfaceHolder.Callback2, private boolean mDestroyed; private native int loadNativeCode(String path, MessageQueue queue, private native int loadNativeCode(String path, String funcname, MessageQueue queue, String internalDataPath, String externalDataPath, int sdkVersion, AssetManager assetMgr, byte[] savedState); private native void unloadNativeCode(int handle); Loading Loading @@ -131,6 +143,7 @@ public class NativeActivity extends Activity implements SurfaceHolder.Callback2, @Override protected void onCreate(Bundle savedInstanceState) { String libname = "main"; String funcname = "ANativeActivity_onCreate"; ActivityInfo ai; mIMM = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); Loading @@ -155,6 +168,8 @@ public class NativeActivity extends Activity implements SurfaceHolder.Callback2, if (ai.metaData != null) { String ln = ai.metaData.getString(META_DATA_LIB_NAME); if (ln != null) libname = ln; ln = ai.metaData.getString(META_DATA_FUNC_NAME); if (ln != null) funcname = ln; } } catch (PackageManager.NameNotFoundException e) { throw new RuntimeException("Error getting activity info", e); Loading @@ -175,7 +190,7 @@ public class NativeActivity extends Activity implements SurfaceHolder.Callback2, byte[] nativeSavedState = savedInstanceState != null ? savedInstanceState.getByteArray(KEY_NATIVE_SAVED_STATE) : null; mNativeHandle = loadNativeCode(path, Looper.myQueue(), mNativeHandle = loadNativeCode(path, funcname, Looper.myQueue(), getFilesDir().toString(), Environment.getExternalStorageAppFilesDirectory(ai.packageName).toString(), Build.VERSION.SDK_INT, getAssets(), nativeSavedState); Loading
core/java/android/nfc/NdefTag.java +1 −0 Original line number Diff line number Diff line Loading @@ -205,6 +205,7 @@ public class NdefTag extends Tag implements Parcelable { dest.writeStringArray(mNdefTargets); dest.writeInt(mMessages.length); for (NdefMessage[] ms : mMessages) { dest.writeInt(ms.length); dest.writeTypedArray(ms, flags); } } Loading
core/java/android/nfc/RawTagConnection.java +0 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,6 @@ public class RawTagConnection { mService = service; mTagService = service.getNfcTagInterface(); mService.openTagConnection(tag); // TODO(nxp): don't connect until connect() mTag = tag; mSelectedTarget = target; } Loading
core/java/android/nfc/Tag.java +13 −1 Original line number Diff line number Diff line Loading @@ -149,6 +149,12 @@ public class Tag implements Parcelable { * Get the low-level bytes returned by this Tag at poll-time. * <p>These can be used to help with advanced identification of a Tag. * <p>The meaning of these bytes depends on the Tag technology. * <p>ISO14443-3A: ATQA/SENS_RES * <p>ISO14443-3B: Application data (4 bytes) and Protocol Info (3 bytes) from ATQB/SENSB_RES * <p>JIS_X_6319_4: PAD0 (2 byte), PAD1 (2 byte), MRTI(2 byte), PAD2 (1 byte), RC (2 byte) * <p>ISO15693: response flags (1 byte), DSFID (1 byte) * from SENSF_RES * * @return poll bytes, or null if they do not exist for this Tag technology */ public byte[] getPollBytes() { Loading @@ -159,6 +165,12 @@ public class Tag implements Parcelable { * Get the low-level bytes returned by this Tag at activation-time. * <p>These can be used to help with advanced identification of a Tag. * <p>The meaning of these bytes depends on the Tag technology. * <p>ISO14443-3A: SAK/SEL_RES * <p>ISO14443-3B: null * <p>ISO14443-3A & ISO14443-4: SAK/SEL_RES, historical bytes from ATS <TODO: confirm> * <p>ISO14443-3B & ISO14443-4: ATTRIB response * <p>JIS_X_6319_4: null * <p>ISO15693: response flags (1 byte), DSFID (1 byte): null * @return activation bytes, or null if they do not exist for this Tag technology */ public byte[] getActivationBytes() { Loading @@ -185,7 +197,7 @@ public class Tag implements Parcelable { /*package*/ static byte[] readBytesWithNull(Parcel in) { int len = in.readInt(); byte[] result = null; if (len > 0) { if (len >= 0) { result = new byte[len]; in.readByteArray(result); } Loading