diff options
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/nfc/ILlcpConnectionlessSocket.aidl | 30 | ||||
| -rw-r--r-- | core/java/android/nfc/ILlcpServiceSocket.aidl | 26 | ||||
| -rw-r--r-- | core/java/android/nfc/ILlcpSocket.aidl | 34 | ||||
| -rw-r--r-- | core/java/android/nfc/INfcAdapter.aidl | 14 | ||||
| -rw-r--r--[-rwxr-xr-x] | core/java/android/nfc/INfcAdapterExtras.aidl | 0 | ||||
| -rw-r--r-- | core/java/android/nfc/IP2pInitiator.aidl | 28 | ||||
| -rw-r--r-- | core/java/android/nfc/IP2pTarget.aidl | 29 | ||||
| -rw-r--r-- | core/java/android/view/HardwareRenderer.java | 27 | ||||
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 2 |
9 files changed, 21 insertions, 169 deletions
diff --git a/core/java/android/nfc/ILlcpConnectionlessSocket.aidl b/core/java/android/nfc/ILlcpConnectionlessSocket.aidl deleted file mode 100644 index c6d84e5..0000000 --- a/core/java/android/nfc/ILlcpConnectionlessSocket.aidl +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2010 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.nfc; - -import android.nfc.LlcpPacket; - -/** - * @hide - */ -interface ILlcpConnectionlessSocket -{ - void close(int nativeHandle); - int getSap(int nativeHandle); - LlcpPacket receiveFrom(int nativeHandle); - int sendTo(int nativeHandle, in LlcpPacket packet); -}
\ No newline at end of file diff --git a/core/java/android/nfc/ILlcpServiceSocket.aidl b/core/java/android/nfc/ILlcpServiceSocket.aidl deleted file mode 100644 index 581c21d..0000000 --- a/core/java/android/nfc/ILlcpServiceSocket.aidl +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2010 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.nfc; - -/** - * {@hide} - */ -interface ILlcpServiceSocket -{ - int accept(int nativeHandle); - void close(int nativeHandle); -} diff --git a/core/java/android/nfc/ILlcpSocket.aidl b/core/java/android/nfc/ILlcpSocket.aidl deleted file mode 100644 index 3166e72..0000000 --- a/core/java/android/nfc/ILlcpSocket.aidl +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2010 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.nfc; - -/** - * @hide - */ -interface ILlcpSocket -{ - int close(int nativeHandle); - int connect(int nativeHandle, int sap); - int connectByName(int nativeHandle, String sn); - int getLocalSap(int nativeHandle); - int getLocalSocketMiu(int nativeHandle); - int getLocalSocketRw(int nativeHandle); - int getRemoteSocketMiu(int nativeHandle); - int getRemoteSocketRw(int nativeHandle); - int receive(int nativeHandle, out byte[] receiveBuffer); - int send(int nativeHandle, in byte[] data); -}
\ No newline at end of file diff --git a/core/java/android/nfc/INfcAdapter.aidl b/core/java/android/nfc/INfcAdapter.aidl index 2ed6619..83a055c 100644 --- a/core/java/android/nfc/INfcAdapter.aidl +++ b/core/java/android/nfc/INfcAdapter.aidl @@ -22,13 +22,8 @@ import android.content.IntentFilter; import android.nfc.NdefMessage; import android.nfc.Tag; import android.nfc.TechListParcel; -import android.nfc.ILlcpSocket; -import android.nfc.ILlcpServiceSocket; -import android.nfc.ILlcpConnectionlessSocket; import android.nfc.INdefPushCallback; import android.nfc.INfcTag; -import android.nfc.IP2pTarget; -import android.nfc.IP2pInitiator; import android.nfc.INfcAdapterExtras; /** @@ -36,12 +31,7 @@ import android.nfc.INfcAdapterExtras; */ interface INfcAdapter { - ILlcpSocket getLlcpInterface(); - ILlcpConnectionlessSocket getLlcpConnectionlessInterface(); - ILlcpServiceSocket getLlcpServiceInterface(); INfcTag getNfcTagInterface(); - IP2pTarget getP2pTargetInterface(); - IP2pInitiator getP2pInitiatorInterface(); INfcAdapterExtras getNfcAdapterExtrasInterface(); // NfcAdapter-class related methods @@ -54,10 +44,6 @@ interface INfcAdapter void disableForegroundNdefPush(in ComponentName activity); // Non-public methods - // TODO: check and complete - int createLlcpConnectionlessSocket(int sap); - int createLlcpServiceSocket(int sap, String sn, int miu, int rw, int linearBufferLength); - int createLlcpSocket(int sap, int miu, int rw, int linearBufferLength); boolean disable(); boolean enable(); boolean enableZeroClick(); diff --git a/core/java/android/nfc/INfcAdapterExtras.aidl b/core/java/android/nfc/INfcAdapterExtras.aidl index 0c2a2fd..0c2a2fd 100755..100644 --- a/core/java/android/nfc/INfcAdapterExtras.aidl +++ b/core/java/android/nfc/INfcAdapterExtras.aidl diff --git a/core/java/android/nfc/IP2pInitiator.aidl b/core/java/android/nfc/IP2pInitiator.aidl deleted file mode 100644 index 931f1f8..0000000 --- a/core/java/android/nfc/IP2pInitiator.aidl +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2010 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.nfc; - -/** - * @hide - */ -interface IP2pInitiator -{ - byte[] getGeneralBytes(int nativeHandle); - int getMode(int nativeHandle); - byte[] receive(int nativeHandle); - boolean send(int nativeHandle, in byte[] data); -}
\ No newline at end of file diff --git a/core/java/android/nfc/IP2pTarget.aidl b/core/java/android/nfc/IP2pTarget.aidl deleted file mode 100644 index ddaaed42..0000000 --- a/core/java/android/nfc/IP2pTarget.aidl +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2010 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.nfc; - -/** - * @hide - */ -interface IP2pTarget -{ - byte[] getGeneralBytes(int nativeHandle); - int getMode(int nativeHandle); - int connect(int nativeHandle); - boolean disconnect(int nativeHandle); - byte[] transceive(int nativeHandle, in byte[] data); -}
\ No newline at end of file diff --git a/core/java/android/view/HardwareRenderer.java b/core/java/android/view/HardwareRenderer.java index 6f7183a..66d2641 100644 --- a/core/java/android/view/HardwareRenderer.java +++ b/core/java/android/view/HardwareRenderer.java @@ -135,7 +135,7 @@ public abstract class HardwareRenderer { /** * Updates the hardware renderer for the specified surface. * - * @param holder The holder for the surface to hardware accelerate. + * @param holder The holder for the surface to hardware accelerate */ abstract void updateSurface(SurfaceHolder holder) throws Surface.OutOfResourcesException; @@ -148,9 +148,11 @@ public abstract class HardwareRenderer { /** * This method should be invoked whenever the current hardware renderer - * context should be reset. + * context should be reset. + * + * @param holder The holder for the surface to hardware accelerate */ - abstract void invalidate(); + abstract void invalidate(SurfaceHolder holder); /** * This method should be invoked to ensure the hardware renderer is in @@ -707,13 +709,24 @@ public abstract class HardwareRenderer { } @Override - void invalidate() { + void invalidate(SurfaceHolder holder) { // Cancels any existing buffer to ensure we'll get a buffer // of the right size before we call eglSwapBuffers - sEgl.eglMakeCurrent(sEglDisplay, EGL_NO_SURFACE, - EGL_NO_SURFACE, EGL_NO_CONTEXT); + sEgl.eglMakeCurrent(sEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + sEgl.eglDestroySurface(sEglDisplay, mEglSurface); + mEglSurface = sEgl.eglCreateWindowSurface(sEglDisplay, sEglConfig, holder, null); + + if (mEglSurface == null || mEglSurface == EGL_NO_SURFACE) { + int error = sEgl.eglGetError(); + if (error == EGL_BAD_NATIVE_WINDOW) { + Log.e(LOG_TAG, "createWindowSurface returned EGL_BAD_NATIVE_WINDOW."); + return; + } + throw new RuntimeException("createWindowSurface failed " + + getEGLErrorString(error)); + } } - + @Override boolean validate() { return checkCurrent() != SURFACE_STATE_ERROR; diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index b22ab7e..911bf2f 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -1344,7 +1344,7 @@ public final class ViewRootImpl extends Handler implements ViewParent, mAttachInfo.mHardwareRenderer.isEnabled())) { mAttachInfo.mHardwareRenderer.setup(mWidth, mHeight); if (!hwInitialized) { - mAttachInfo.mHardwareRenderer.invalidate(); + mAttachInfo.mHardwareRenderer.invalidate(mHolder); } } |
