diff options
45 files changed, 553 insertions, 192 deletions
diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java index 0519d3ebf1b5..7e1daa49f049 100644 --- a/core/java/android/app/FragmentManager.java +++ b/core/java/android/app/FragmentManager.java @@ -1890,7 +1890,7 @@ final class FragmentManagerImpl extends FragmentManager { if (mActive != null) { for (int i=0; i<mAdded.size(); i++) { Fragment f = mAdded.get(i); - if (f != null && !f.mHidden) { + if (f != null && !f.mHidden && f.mUserVisibleHint) { if (f.onContextItemSelected(item)) { return true; } diff --git a/core/java/android/view/ScaleGestureDetector.java b/core/java/android/view/ScaleGestureDetector.java index 5d2c1a713036..bbb5adef5f0f 100644 --- a/core/java/android/view/ScaleGestureDetector.java +++ b/core/java/android/view/ScaleGestureDetector.java @@ -220,8 +220,10 @@ public class ScaleGestureDetector { mActiveId1 = event.getPointerId(index1); if (index0 < 0 || index0 == index1) { // Probably someone sending us a broken event stream. - index0 = findNewActiveIndex(event, index0 == index1 ? -1 : mActiveId1, index0); - mActiveId0 = event.getPointerId(index0); + boolean valid = handleBrokenEventStream(event); + if (!valid) { + return false; + } } mActive0MostRecent = false; @@ -377,13 +379,10 @@ public class ScaleGestureDetector { int index0 = event.findPointerIndex(mActiveId0); if (index0 < 0 || mActiveId0 == mActiveId1) { // Probably someone sending us a broken event stream. - Log.e(TAG, "Got " + MotionEvent.actionToString(action) + - " with bad state while a gesture was in progress. " + - "Did you forget to pass an event to " + - "ScaleGestureDetector#onTouchEvent?"); - index0 = findNewActiveIndex(event, - mActiveId0 == mActiveId1 ? -1 : mActiveId1, index0); - mActiveId0 = event.getPointerId(index0); + boolean valid = handleBrokenEventStream(event); + if (!valid) { + return false; + } } setContext(event); @@ -483,6 +482,27 @@ public class ScaleGestureDetector { return handled; } + private boolean handleBrokenEventStream(MotionEvent event) { + Log.e(TAG, "Got " + MotionEvent.actionToString(event.getActionMasked()) + + " with bad state while a gesture was in progress. " + + "Did you forget to pass an event to " + + "ScaleGestureDetector#onTouchEvent?"); + int index0 = findNewActiveIndex(event, + mActiveId0 == mActiveId1 ? -1 : mActiveId1, + event.findPointerIndex(mActiveId0)); + if (index0 >= 0) { + mActiveId0 = event.getPointerId(index0); + return true; + } else { + mInvalidGesture = true; + Log.e(TAG, "Invalid MotionEvent stream detected.", new Throwable()); + if (mGestureInProgress) { + mListener.onScaleEnd(this); + } + return false; + } + } + private int findNewActiveIndex(MotionEvent ev, int otherActiveId, int oldIndex) { final int pointerCount = ev.getPointerCount(); diff --git a/core/java/android/widget/Gallery.java b/core/java/android/widget/Gallery.java index 5e37fa8942f1..ea23a3aa1bfe 100644 --- a/core/java/android/widget/Gallery.java +++ b/core/java/android/widget/Gallery.java @@ -1187,15 +1187,15 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList case KeyEvent.KEYCODE_DPAD_LEFT: if (movePrevious()) { playSoundEffect(SoundEffectConstants.NAVIGATION_LEFT); + return true; } - return true; - + break; case KeyEvent.KEYCODE_DPAD_RIGHT: if (moveNext()) { playSoundEffect(SoundEffectConstants.NAVIGATION_RIGHT); + return true; } - return true; - + break; case KeyEvent.KEYCODE_DPAD_CENTER: case KeyEvent.KEYCODE_ENTER: mReceivedInvokeKeyDown = true; diff --git a/core/java/android/widget/SimpleExpandableListAdapter.java b/core/java/android/widget/SimpleExpandableListAdapter.java index 015c169f74b5..f514374c4559 100644 --- a/core/java/android/widget/SimpleExpandableListAdapter.java +++ b/core/java/android/widget/SimpleExpandableListAdapter.java @@ -38,6 +38,8 @@ import java.util.Map; */ public class SimpleExpandableListAdapter extends BaseExpandableListAdapter { private List<? extends Map<String, ?>> mGroupData; + // Keeps track of if a group is currently expanded or not + private boolean[] mIsGroupExpanded; private int mExpandedGroupLayout; private int mCollapsedGroupLayout; private String[] mGroupFrom; @@ -196,6 +198,8 @@ public class SimpleExpandableListAdapter extends BaseExpandableListAdapter { int childLayout, int lastChildLayout, String[] childFrom, int[] childTo) { mGroupData = groupData; + // Initially all groups are not expanded + mIsGroupExpanded = new boolean[groupData.size()]; mExpandedGroupLayout = expandedGroupLayout; mCollapsedGroupLayout = collapsedGroupLayout; mGroupFrom = groupFrom; @@ -298,4 +302,52 @@ public class SimpleExpandableListAdapter extends BaseExpandableListAdapter { return true; } + /** + * {@inheritDoc} + * @return 1 for the last child in a group, 0 for the other children. + */ + @Override + public int getChildType(int groupPosition, int childPosition) { + final int childrenInGroup = getChildrenCount(groupPosition); + return childPosition == childrenInGroup - 1 ? 1 : 0; + } + + /** + * {@inheritDoc} + * @return 2, one type for the last child in a group, one for the other children. + */ + @Override + public int getChildTypeCount() { + return 2; + } + + /** + * {@inheritDoc} + * @return 1 for an expanded group view, 0 for a collapsed one. + */ + @Override + public int getGroupType(int groupPosition) { + return mIsGroupExpanded[groupPosition] ? 1 : 0; + } + + /** + * {@inheritDoc} + * @return 2, one for a collapsed group view, one for an expanded one. + */ + @Override + public int getGroupTypeCount() { + return 2; + } + + /** {@inheritDoc} */ + @Override + public void onGroupCollapsed(int groupPosition) { + mIsGroupExpanded[groupPosition] = false; + } + + /** {@inheritDoc} */ + @Override + public void onGroupExpanded(int groupPosition) { + mIsGroupExpanded[groupPosition] = true; + } } diff --git a/core/java/com/android/internal/os/ProcessStats.java b/core/java/com/android/internal/os/ProcessStats.java index e0e9a29714d1..94904377cb43 100644 --- a/core/java/com/android/internal/os/ProcessStats.java +++ b/core/java/com/android/internal/os/ProcessStats.java @@ -154,7 +154,7 @@ public class ProcessStats { private boolean mFirst = true; - private byte[] mBuffer = new byte[256]; + private byte[] mBuffer = new byte[4096]; /** * The time in microseconds that the CPU has been running at each speed. @@ -556,7 +556,7 @@ public class ProcessStats { private long[] getCpuSpeedTimes(long[] out) { long[] tempTimes = out; long[] tempSpeeds = mCpuSpeeds; - final int MAX_SPEEDS = 20; + final int MAX_SPEEDS = 60; if (out == null) { tempTimes = new long[MAX_SPEEDS]; // Hopefully no more than that tempSpeeds = new long[MAX_SPEEDS]; diff --git a/core/java/com/android/internal/view/menu/ActionMenuPresenter.java b/core/java/com/android/internal/view/menu/ActionMenuPresenter.java index 530809b869c3..97911dd0f66a 100644 --- a/core/java/com/android/internal/view/menu/ActionMenuPresenter.java +++ b/core/java/com/android/internal/view/menu/ActionMenuPresenter.java @@ -277,7 +277,7 @@ public class ActionMenuPresenter extends BaseMenuPresenter */ public boolean showOverflowMenu() { if (mReserveOverflow && !isOverflowMenuShowing() && mMenu != null && mMenuView != null && - mPostedOpenRunnable == null) { + mPostedOpenRunnable == null && !mMenu.getNonActionItems().isEmpty()) { OverflowPopup popup = new OverflowPopup(mContext, mMenu, mOverflowButton, true); mPostedOpenRunnable = new OpenOverflowRunnable(popup); // Post this for later; we might still need a layout for the anchor to be right. diff --git a/core/res/res/layout/transient_notification.xml b/core/res/res/layout/transient_notification.xml index 21d58aa66002..5523807d6548 100644 --- a/core/res/res/layout/transient_notification.xml +++ b/core/res/res/layout/transient_notification.xml @@ -29,6 +29,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" + android:layout_gravity="center_horizontal" android:textAppearance="@style/TextAppearance.Small" android:textColor="@color/bright_foreground_dark" android:shadowColor="#BB000000" diff --git a/core/tests/overlaytests/OverlayTestOverlay/Android.mk b/core/tests/overlaytests/OverlayTestOverlay/Android.mk index cf32c9f93c68..b1327f713ae7 100644 --- a/core/tests/overlaytests/OverlayTestOverlay/Android.mk +++ b/core/tests/overlaytests/OverlayTestOverlay/Android.mk @@ -9,6 +9,4 @@ LOCAL_SDK_VERSION := current LOCAL_PACKAGE_NAME := com.android.overlaytest.overlay -LOCAL_AAPT_FLAGS := -o - include $(BUILD_PACKAGE) diff --git a/core/tests/overlaytests/OverlayTestOverlay/res/drawable/default_wallpaper.jpg b/core/tests/overlaytests/OverlayTestOverlay/res/drawable-nodpi/default_wallpaper.jpg Binary files differindex 0d944d02d633..0d944d02d633 100644 --- a/core/tests/overlaytests/OverlayTestOverlay/res/drawable/default_wallpaper.jpg +++ b/core/tests/overlaytests/OverlayTestOverlay/res/drawable-nodpi/default_wallpaper.jpg diff --git a/core/tests/overlaytests/runtests.sh b/core/tests/overlaytests/runtests.sh index 0ad9efb0938e..0a721ad40d34 100755 --- a/core/tests/overlaytests/runtests.sh +++ b/core/tests/overlaytests/runtests.sh @@ -18,7 +18,6 @@ function atexit() log=$(mktemp) trap "atexit" EXIT -failures=0 function compile_module() { @@ -38,6 +37,37 @@ function wait_for_boot_completed() $adb wait-for-device logcat | grep -m 1 -e 'PowerManagerService.*bootCompleted' >/dev/null } +function mkdir_if_needed() +{ + local path="$1" + + if [[ "${path:0:1}" != "/" ]]; then + echo "mkdir_if_needed: error: path '$path' does not begin with /" | tee -a $log + exit 1 + fi + + local basename=$(basename "$path") + local dirname=$(dirname "$path") + local t=$($adb shell ls -l $dirname | tr -d '\r' | grep -e "${basename}$" | grep -oe '^.') + + case "$t" in + d) # File exists, and is a directory ... + # do nothing + ;; + l) # ... (or symbolic link possibly to a directory). + # do nothing + ;; + "") # File does not exist. + mkdir_if_needed "$dirname" + $adb shell mkdir "$path" + ;; + *) # File exists, but is not a directory. + echo "mkdir_if_needed: file '$path' exists, but is not a directory" | tee -a $log + exit 1 + ;; + esac +} + function disable_overlay() { echo "Disabling overlay" @@ -48,6 +78,8 @@ function disable_overlay() function enable_overlay() { echo "Enabling overlay" + mkdir_if_needed "/system/vendor" + mkdir_if_needed "/vendor/overlay/framework" $adb shell ln -s /data/app/com.android.overlaytest.overlay.apk /vendor/overlay/framework/framework-res.apk } @@ -59,13 +91,21 @@ function instrument() $adb shell am instrument -w -e class $class com.android.overlaytest/android.test.InstrumentationTestRunner | tee -a $log } +function remount() +{ + echo "Remounting file system writable" + $adb remount | tee -a $log +} + function sync() { echo "Syncing to device" - $adb remount | tee -a $log $adb sync data | tee -a $log } +# some commands require write access, remount once and for all +remount + # build and sync compile_module "$PWD/OverlayTest/Android.mk" compile_module "$PWD/OverlayTestOverlay/Android.mk" diff --git a/drm/common/DrmEngineBase.cpp b/drm/common/DrmEngineBase.cpp index 9b16c3685442..0ef58f38eade 100644 --- a/drm/common/DrmEngineBase.cpp +++ b/drm/common/DrmEngineBase.cpp @@ -129,6 +129,11 @@ status_t DrmEngineBase::openDecryptSession( return onOpenDecryptSession(uniqueId, decryptHandle, uri); } +status_t DrmEngineBase::openDecryptSession(int uniqueId, DecryptHandle* decryptHandle, + const DrmBuffer& buf, const String8& mimeType) { + return onOpenDecryptSession(uniqueId, decryptHandle, buf, mimeType); +} + status_t DrmEngineBase::closeDecryptSession(int uniqueId, DecryptHandle* decryptHandle) { return onCloseDecryptSession(uniqueId, decryptHandle); } diff --git a/drm/common/IDrmManagerService.cpp b/drm/common/IDrmManagerService.cpp index 3ed8ade720ba..f5352bb0e1ac 100644 --- a/drm/common/IDrmManagerService.cpp +++ b/drm/common/IDrmManagerService.cpp @@ -640,6 +640,33 @@ DecryptHandle* BpDrmManagerService::openDecryptSession(int uniqueId, const char* return handle; } +DecryptHandle* BpDrmManagerService::openDecryptSession( + int uniqueId, const DrmBuffer& buf, const String8& mimeType) { + ALOGV("Entering BpDrmManagerService::openDecryptSession"); + Parcel data, reply; + + data.writeInterfaceToken(IDrmManagerService::getInterfaceDescriptor()); + data.writeInt32(uniqueId); + if (buf.data != NULL && buf.length > 0) { + data.writeInt32(buf.length); + data.write(buf.data, buf.length); + } else { + data.writeInt32(0); + } + data.writeString8(mimeType); + + remote()->transact(OPEN_DECRYPT_SESSION_FOR_STREAMING, data, &reply); + + DecryptHandle* handle = NULL; + if (0 != reply.dataAvail()) { + handle = new DecryptHandle(); + readDecryptHandleFromParcelData(handle, reply); + } else { + ALOGV("no decryptHandle is generated in service side"); + } + return handle; +} + status_t BpDrmManagerService::closeDecryptSession(int uniqueId, DecryptHandle* decryptHandle) { ALOGV("closeDecryptSession"); Parcel data, reply; @@ -1297,6 +1324,30 @@ status_t BnDrmManagerService::onTransact( return DRM_NO_ERROR; } + case OPEN_DECRYPT_SESSION_FOR_STREAMING: + { + ALOGV("BnDrmManagerService::onTransact :OPEN_DECRYPT_SESSION_FOR_STREAMING"); + CHECK_INTERFACE(IDrmManagerService, data, reply); + + const int uniqueId = data.readInt32(); + const int bufferSize = data.readInt32(); + DrmBuffer buf((bufferSize > 0) ? (char *)data.readInplace(bufferSize) : NULL, + bufferSize); + const String8 mimeType(data.readString8()); + + DecryptHandle* handle = openDecryptSession(uniqueId, buf, mimeType); + + if (handle != NULL) { + writeDecryptHandleToParcelData(handle, reply); + clearDecryptHandle(handle); + delete handle; + handle = NULL; + } else { + ALOGV("NULL decryptHandle is returned"); + } + return DRM_NO_ERROR; + } + case CLOSE_DECRYPT_SESSION: { ALOGV("BnDrmManagerService::onTransact :CLOSE_DECRYPT_SESSION"); diff --git a/drm/drmserver/DrmManager.cpp b/drm/drmserver/DrmManager.cpp index 3abf3d335290..c528ffc43a6b 100644 --- a/drm/drmserver/DrmManager.cpp +++ b/drm/drmserver/DrmManager.cpp @@ -481,6 +481,36 @@ DecryptHandle* DrmManager::openDecryptSession(int uniqueId, const char* uri) { return handle; } +DecryptHandle* DrmManager::openDecryptSession( + int uniqueId, const DrmBuffer& buf, const String8& mimeType) { + Mutex::Autolock _l(mDecryptLock); + status_t result = DRM_ERROR_CANNOT_HANDLE; + Vector<String8> plugInIdList = mPlugInManager.getPlugInIdList(); + + DecryptHandle* handle = new DecryptHandle(); + if (NULL != handle) { + handle->decryptId = mDecryptSessionId + 1; + + for (size_t index = 0; index < plugInIdList.size(); index++) { + String8 plugInId = plugInIdList.itemAt(index); + IDrmEngine& rDrmEngine = mPlugInManager.getPlugIn(plugInId); + result = rDrmEngine.openDecryptSession(uniqueId, handle, buf, mimeType); + + if (DRM_NO_ERROR == result) { + ++mDecryptSessionId; + mDecryptSessionMap.add(mDecryptSessionId, &rDrmEngine); + break; + } + } + } + if (DRM_NO_ERROR != result) { + delete handle; + handle = NULL; + ALOGV("DrmManager::openDecryptSession: no capable plug-in found"); + } + return handle; +} + status_t DrmManager::closeDecryptSession(int uniqueId, DecryptHandle* decryptHandle) { Mutex::Autolock _l(mDecryptLock); status_t result = DRM_ERROR_UNKNOWN; diff --git a/drm/drmserver/DrmManagerService.cpp b/drm/drmserver/DrmManagerService.cpp index df17ac5d134d..9f899c3f1113 100644 --- a/drm/drmserver/DrmManagerService.cpp +++ b/drm/drmserver/DrmManagerService.cpp @@ -227,6 +227,16 @@ DecryptHandle* DrmManagerService::openDecryptSession( return NULL; } +DecryptHandle* DrmManagerService::openDecryptSession( + int uniqueId, const DrmBuffer& buf, const String8& mimeType) { + ALOGV("Entering DrmManagerService::openDecryptSession for streaming"); + if (isProtectedCallAllowed()) { + return mDrmManager->openDecryptSession(uniqueId, buf, mimeType); + } + + return NULL; +} + status_t DrmManagerService::closeDecryptSession(int uniqueId, DecryptHandle* decryptHandle) { ALOGV("Entering closeDecryptSession"); return mDrmManager->closeDecryptSession(uniqueId, decryptHandle); diff --git a/drm/libdrmframework/DrmManagerClient.cpp b/drm/libdrmframework/DrmManagerClient.cpp index c9c0d57961b9..a48671ce82f7 100644 --- a/drm/libdrmframework/DrmManagerClient.cpp +++ b/drm/libdrmframework/DrmManagerClient.cpp @@ -124,6 +124,11 @@ sp<DecryptHandle> DrmManagerClient::openDecryptSession(const char* uri) { return mDrmManagerClientImpl->openDecryptSession(mUniqueId, uri); } +sp<DecryptHandle> DrmManagerClient::openDecryptSession( + const DrmBuffer& buf, const String8& mimeType) { + return mDrmManagerClientImpl->openDecryptSession(mUniqueId, buf, mimeType); +} + status_t DrmManagerClient::closeDecryptSession(sp<DecryptHandle> &decryptHandle) { return mDrmManagerClientImpl->closeDecryptSession(mUniqueId, decryptHandle); } diff --git a/drm/libdrmframework/DrmManagerClientImpl.cpp b/drm/libdrmframework/DrmManagerClientImpl.cpp index b222b8f03a97..a4a5b1031da0 100644 --- a/drm/libdrmframework/DrmManagerClientImpl.cpp +++ b/drm/libdrmframework/DrmManagerClientImpl.cpp @@ -268,6 +268,11 @@ sp<DecryptHandle> DrmManagerClientImpl::openDecryptSession( return handle; } +sp<DecryptHandle> DrmManagerClientImpl::openDecryptSession( + int uniqueId, const DrmBuffer& buf, const String8& mimeType) { + return getDrmManagerService()->openDecryptSession(uniqueId, buf, mimeType); +} + status_t DrmManagerClientImpl::closeDecryptSession( int uniqueId, sp<DecryptHandle> &decryptHandle) { status_t status = DRM_ERROR_UNKNOWN; diff --git a/drm/libdrmframework/include/DrmManager.h b/drm/libdrmframework/include/DrmManager.h index ac2b94606576..5c498d7b0c43 100644 --- a/drm/libdrmframework/include/DrmManager.h +++ b/drm/libdrmframework/include/DrmManager.h @@ -115,6 +115,9 @@ public: DecryptHandle* openDecryptSession(int uniqueId, const char* uri); + DecryptHandle* openDecryptSession(int uniqueId, const DrmBuffer& buf, + const String8& mimeType); + status_t closeDecryptSession(int uniqueId, DecryptHandle* decryptHandle); status_t initializeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, diff --git a/drm/libdrmframework/include/DrmManagerClientImpl.h b/drm/libdrmframework/include/DrmManagerClientImpl.h index e3338d9e8679..3f66860789fd 100644 --- a/drm/libdrmframework/include/DrmManagerClientImpl.h +++ b/drm/libdrmframework/include/DrmManagerClientImpl.h @@ -316,6 +316,18 @@ public: sp<DecryptHandle> openDecryptSession(int uniqueId, const char* uri); /** + * Open the decrypt session to decrypt the given protected content + * + * @param[in] uniqueId Unique identifier for a session + * @param[in] buf Data to initiate decrypt session + * @param[in] mimeType Mime type of the protected content + * @return + * Handle for the decryption session + */ + sp<DecryptHandle> openDecryptSession(int uniqueId, const DrmBuffer& buf, + const String8& mimeType); + + /** * Close the decrypt session for the given handle * * @param[in] uniqueId Unique identifier for a session diff --git a/drm/libdrmframework/include/DrmManagerService.h b/drm/libdrmframework/include/DrmManagerService.h index 9cb5804e6915..9de8c8221730 100644 --- a/drm/libdrmframework/include/DrmManagerService.h +++ b/drm/libdrmframework/include/DrmManagerService.h @@ -102,6 +102,9 @@ public: DecryptHandle* openDecryptSession(int uniqueId, const char* uri); + DecryptHandle* openDecryptSession(int uniqueId, const DrmBuffer& buf, + const String8& mimeType); + status_t closeDecryptSession(int uniqueId, DecryptHandle* decryptHandle); status_t initializeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, diff --git a/drm/libdrmframework/include/IDrmManagerService.h b/drm/libdrmframework/include/IDrmManagerService.h index b9618bbc27aa..bb8d980c20ab 100644 --- a/drm/libdrmframework/include/IDrmManagerService.h +++ b/drm/libdrmframework/include/IDrmManagerService.h @@ -70,6 +70,7 @@ public: GET_ALL_SUPPORT_INFO, OPEN_DECRYPT_SESSION, OPEN_DECRYPT_SESSION_FROM_URI, + OPEN_DECRYPT_SESSION_FOR_STREAMING, CLOSE_DECRYPT_SESSION, INITIALIZE_DECRYPT_UNIT, DECRYPT, @@ -143,6 +144,9 @@ public: virtual DecryptHandle* openDecryptSession(int uniqueId, const char* uri) = 0; + virtual DecryptHandle* openDecryptSession( + int uniqueId, const DrmBuffer& buf, const String8& mimeType) = 0; + virtual status_t closeDecryptSession(int uniqueId, DecryptHandle* decryptHandle) = 0; virtual status_t initializeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, @@ -226,6 +230,9 @@ public: virtual DecryptHandle* openDecryptSession(int uniqueId, const char* uri); + virtual DecryptHandle* openDecryptSession( + int uniqueId, const DrmBuffer& buf, const String8& mimeType); + virtual status_t closeDecryptSession(int uniqueId, DecryptHandle* decryptHandle); virtual status_t initializeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, diff --git a/drm/libdrmframework/plugins/common/include/DrmEngineBase.h b/drm/libdrmframework/plugins/common/include/DrmEngineBase.h index 4a5afcf42c6b..c726f03355f4 100644 --- a/drm/libdrmframework/plugins/common/include/DrmEngineBase.h +++ b/drm/libdrmframework/plugins/common/include/DrmEngineBase.h @@ -85,6 +85,9 @@ public: status_t openDecryptSession( int uniqueId, DecryptHandle* decryptHandle, const char* uri); + status_t openDecryptSession(int uniqueId, DecryptHandle* decryptHandle, + const DrmBuffer& buf, const String8& mimeType); + status_t closeDecryptSession(int uniqueId, DecryptHandle* decryptHandle); status_t initializeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, @@ -390,6 +393,21 @@ protected: int uniqueId, DecryptHandle* decryptHandle, const char* uri) = 0; /** + * Open the decrypt session to decrypt the given protected content + * + * @param[in] uniqueId Unique identifier for a session + * @param[in] decryptHandle Handle for the current decryption session + * @param[in] buf Data to initiate decrypt session + * @param[in] mimeType Mime type of the protected content + * @return + * DRM_ERROR_CANNOT_HANDLE for failure and DRM_NO_ERROR for success + */ + virtual status_t onOpenDecryptSession(int uniqueId, DecryptHandle* decryptHandle, + const DrmBuffer& buf, const String8& mimeType) { + return DRM_ERROR_CANNOT_HANDLE; + } + + /** * Close the decrypt session for the given handle * * @param[in] uniqueId Unique identifier for a session diff --git a/drm/libdrmframework/plugins/common/include/IDrmEngine.h b/drm/libdrmframework/plugins/common/include/IDrmEngine.h index 77460f6f1fba..2ebbb7180df5 100644 --- a/drm/libdrmframework/plugins/common/include/IDrmEngine.h +++ b/drm/libdrmframework/plugins/common/include/IDrmEngine.h @@ -339,6 +339,19 @@ public: int uniqueId, DecryptHandle* decryptHandle, const char* uri) = 0; /** + * Open the decrypt session to decrypt the given protected content + * + * @param[in] uniqueId Unique identifier for a session + * @param[in] decryptHandle Handle for the current decryption session + * @param[in] buf Data to initiate decrypt session + * @param[in] mimeType Mime type of the protected content + * @return + * DRM_ERROR_CANNOT_HANDLE for failure and DRM_NO_ERROR for success + */ + virtual status_t openDecryptSession(int uniqueId, DecryptHandle* decryptHandle, + const DrmBuffer& buf, const String8& mimeType) = 0; + + /** * Close the decrypt session for the given handle * * @param[in] uniqueId Unique identifier for a session diff --git a/include/drm/DrmManagerClient.h b/include/drm/DrmManagerClient.h index b8fe46d08e31..0cb503cc529d 100644 --- a/include/drm/DrmManagerClient.h +++ b/include/drm/DrmManagerClient.h @@ -81,6 +81,16 @@ public: sp<DecryptHandle> openDecryptSession(const char* uri); /** + * Open the decrypt session to decrypt the given protected content + * + * @param[in] buf Data to initiate decrypt session + * @param[in] mimeType Mime type of the protected content + * @return + * Handle for the decryption session + */ + sp<DecryptHandle> openDecryptSession(const DrmBuffer& buf, const String8& mimeType); + + /** * Close the decrypt session for the given handle * * @param[in] decryptHandle Handle for the decryption session diff --git a/libs/rs/driver/rsdCore.cpp b/libs/rs/driver/rsdCore.cpp index b514e2182883..4b6116796a19 100644 --- a/libs/rs/driver/rsdCore.cpp +++ b/libs/rs/driver/rsdCore.cpp @@ -274,10 +274,9 @@ void Shutdown(Context *rsc) { for (uint32_t ct = 0; ct < dc->mWorkers.mCount; ct++) { dc->mWorkers.mLaunchSignals[ct].set(); } - int status; void *res; for (uint32_t ct = 0; ct < dc->mWorkers.mCount; ct++) { - status = pthread_join(dc->mWorkers.mThreadId[ct], &res); + pthread_join(dc->mWorkers.mThreadId[ct], &res); } rsAssert(android_atomic_acquire_load(&dc->mWorkers.mRunningCount) == 0); diff --git a/libs/utils/ResourceTypes.cpp b/libs/utils/ResourceTypes.cpp index 15b83bbd2cfa..5aded246522f 100644 --- a/libs/utils/ResourceTypes.cpp +++ b/libs/utils/ResourceTypes.cpp @@ -4333,7 +4333,8 @@ status_t ResTable::createIdmap(const ResTable& overlay, uint32_t originalCrc, ui const uint32_t pkg_id = pkg->package->id << 24; for (size_t typeIndex = 0; typeIndex < typeCount; ++typeIndex) { - ssize_t offset = -1; + ssize_t first = -1; + ssize_t last = -1; const Type* typeConfigs = pkg->getType(typeIndex); ssize_t mapIndex = map.add(); if (mapIndex < 0) { @@ -4341,12 +4342,14 @@ status_t ResTable::createIdmap(const ResTable& overlay, uint32_t originalCrc, ui } Vector<uint32_t>& vector = map.editItemAt(mapIndex); for (size_t entryIndex = 0; entryIndex < typeConfigs->entryCount; ++entryIndex) { - uint32_t resID = (0xff000000 & ((pkg->package->id)<<24)) + uint32_t resID = pkg_id | (0x00ff0000 & ((typeIndex+1)<<16)) | (0x0000ffff & (entryIndex)); resource_name resName; if (!this->getResourceName(resID, &resName)) { ALOGW("idmap: resource 0x%08x has spec but lacks values, skipping\n", resID); + // add dummy value, or trimming leading/trailing zeroes later will fail + vector.push(0); continue; } @@ -4359,13 +4362,13 @@ status_t ResTable::createIdmap(const ResTable& overlay, uint32_t originalCrc, ui overlayPackage.string(), overlayPackage.size()); if (overlayResID != 0) { - // overlay package has package ID == 0, use original package's ID instead - overlayResID |= pkg_id; + overlayResID = pkg_id | (0x00ffffff & overlayResID); + last = Res_GETENTRY(resID); + if (first == -1) { + first = Res_GETENTRY(resID); + } } vector.push(overlayResID); - if (overlayResID != 0 && offset == -1) { - offset = Res_GETENTRY(resID); - } #if 0 if (overlayResID != 0) { ALOGD("%s/%s 0x%08x -> 0x%08x\n", @@ -4376,13 +4379,16 @@ status_t ResTable::createIdmap(const ResTable& overlay, uint32_t originalCrc, ui #endif } - if (offset != -1) { - // shave off leading and trailing entries which lack overlay values - vector.removeItemsAt(0, offset); - vector.insertAt((uint32_t)offset, 0, 1); - while (vector.top() == 0) { - vector.pop(); + if (first != -1) { + // shave off trailing entries which lack overlay values + const size_t last_past_one = last + 1; + if (last_past_one < vector.size()) { + vector.removeItemsAt(last_past_one, vector.size() - last_past_one); } + // shave off leading entries which lack overlay values + vector.removeItemsAt(0, first); + // store offset to first overlaid resource ID of this type + vector.insertAt((uint32_t)first, 0, 1); // reserve space for number and offset of entries, and the actual entries *outSize += (2 + vector.size()) * sizeof(uint32_t); } else { @@ -4420,6 +4426,10 @@ status_t ResTable::createIdmap(const ResTable& overlay, uint32_t originalCrc, ui if (N == 0) { continue; } + if (N == 1) { // vector expected to hold (offset) + (N > 0 entries) + ALOGW("idmap: type %d supposedly has entries, but no entries found\n", i); + return UNKNOWN_ERROR; + } *data++ = htodl(N - 1); // do not count the offset (which is vector's first element) for (size_t j = 0; j < N; ++j) { const uint32_t& overlayResID = vector.itemAt(j); diff --git a/media/libmedia/MediaProfiles.cpp b/media/libmedia/MediaProfiles.cpp index c905762799e6..d02ac1a80e50 100644 --- a/media/libmedia/MediaProfiles.cpp +++ b/media/libmedia/MediaProfiles.cpp @@ -514,16 +514,16 @@ void MediaProfiles::checkAndAddRequiredProfilesIfNecessary() { // Check high and low from either camcorder profile or timelapse profile // but not both. Default, check camcorder profile size_t j = 0; - size_t n = 2; + size_t o = 2; if (isTimelapseProfile(quality)) { // Check timelapse profile instead. j = 2; - n = kNumRequiredProfiles; + o = kNumRequiredProfiles; } else { // Must be camcorder profile. CHECK(isCamcorderProfile(quality)); } - for (; j < n; ++j) { + for (; j < o; ++j) { info = &(mRequiredProfileRefs[refIndex].mRefs[j]); if ((j % 2 == 0 && product > info->mResolutionProduct) || // low (j % 2 != 0 && product < info->mResolutionProduct)) { // high diff --git a/media/libstagefright/Android.mk b/media/libstagefright/Android.mk index 690deac38e18..df00581bff50 100644 --- a/media/libstagefright/Android.mk +++ b/media/libstagefright/Android.mk @@ -95,10 +95,12 @@ LOCAL_STATIC_LIBRARIES := \ # currently must follow the same logic to determine how webkit was built and # if it's safe to link against libchromium.net -# V8 also requires an ARMv7 CPU, and since we must use jsc, we cannot +# V8 also requires an ARMv7 & x86 CPU, and since we must use jsc, we cannot # use the Chrome http stack either. ifneq ($(strip $(ARCH_ARM_HAVE_ARMV7A)),true) - USE_ALT_HTTP := true + ifneq ($(TARGET_ARCH),x86) + USE_ALT_HTTP := true + endif endif # See if the user has specified a stack they want to use diff --git a/media/libstagefright/codecs/avc/common/src/deblock.cpp b/media/libstagefright/codecs/avc/common/src/deblock.cpp index 5ed4c8259899..de2d2b6333cc 100644 --- a/media/libstagefright/codecs/avc/common/src/deblock.cpp +++ b/media/libstagefright/codecs/avc/common/src/deblock.cpp @@ -294,7 +294,8 @@ void DeblockMb(AVCCommonObj *video, int mb_x, int mb_y, uint8 *SrcY, uint8 *SrcU int filterLeftMbEdgeFlag = (mb_x != 0); int filterTopMbEdgeFlag = (mb_y != 0); int pitch = video->currPic->pitch; - int indexA, indexB, tmp; + int indexA, indexB; + int *tmp; int Alpha, Beta, Alpha_c, Beta_c; int mbNum = mb_y * video->PicWidthInMbs + mb_x; int *clipTable, *clipTable_c, *qp_clip_tab; @@ -386,7 +387,7 @@ void DeblockMb(AVCCommonObj *video, int mb_x, int mb_y, uint8 *SrcY, uint8 *SrcU /* Save Alpha, Beta and clipTable for future use, with the obselete variables filterLeftMbEdgeFlag, mbNum amd tmp */ filterLeftMbEdgeFlag = Alpha; mbNum = Beta; - tmp = (int)clipTable; + tmp = clipTable; indexA = MbQ->QPc + video->FilterOffsetA; indexB = MbQ->QPc + video->FilterOffsetB; @@ -486,7 +487,7 @@ void DeblockMb(AVCCommonObj *video, int mb_x, int mb_y, uint8 *SrcY, uint8 *SrcU /* Note that Alpha_c, Beta_c and clipTable_c for chroma is already calculated */ Alpha = filterLeftMbEdgeFlag; Beta = mbNum; - clipTable = (int *)tmp; + clipTable = tmp; GetStrength_HorizontalEdges(Strength + 4, MbQ); // Strength for 4 blks in 1 stripe, 0 => vertical edge diff --git a/media/libstagefright/codecs/avc/enc/src/avcenc_api.cpp b/media/libstagefright/codecs/avc/enc/src/avcenc_api.cpp index d39885db3989..6d43142961ec 100644 --- a/media/libstagefright/codecs/avc/enc/src/avcenc_api.cpp +++ b/media/libstagefright/codecs/avc/enc/src/avcenc_api.cpp @@ -573,7 +573,7 @@ OSCL_EXPORT_REF AVCEnc_Status PVAVCEncGetRecon(AVCHandle *avcHandle, AVCFrameIO recon->pitch = currFS->frame.pitch; recon->disp_order = currFS->PicOrderCnt; recon->coding_order = currFS->FrameNum; - recon->id = (uint32) currFS->base_dpb; /* use the pointer as the id */ + recon->id = (intptr_t) currFS->base_dpb; /* use the pointer as the id */ currFS->IsOutputted |= 1; diff --git a/media/libstagefright/codecs/avc/enc/src/motion_comp.cpp b/media/libstagefright/codecs/avc/enc/src/motion_comp.cpp index ac62d782c83d..a390f884d79d 100644 --- a/media/libstagefright/codecs/avc/enc/src/motion_comp.cpp +++ b/media/libstagefright/codecs/avc/enc/src/motion_comp.cpp @@ -198,7 +198,7 @@ void eCreateAlign(uint8 *ref, int picpitch, int y_pos, out_offset = 24 - blkwidth; //switch(x_pos&0x3){ - switch (((uint32)ref)&0x3) + switch (((intptr_t)ref)&0x3) { case 1: offset = picpitch - blkwidth - 3; @@ -268,9 +268,9 @@ void eCreateAlign(uint8 *ref, int picpitch, int y_pos, void eHorzInterp1MC(uint8 *in, int inpitch, uint8 *out, int outpitch, int blkwidth, int blkheight, int dx) { - uint8 *p_ref; + uint8 *p_ref, *tmp; uint32 *p_cur; - uint32 tmp, pkres; + uint32 pkres; int result, curr_offset, ref_offset; int j; int32 r0, r1, r2, r3, r4, r5; @@ -288,14 +288,14 @@ void eHorzInterp1MC(uint8 *in, int inpitch, uint8 *out, int outpitch, r13 = 0; for (j = blkheight; j > 0; j--) { - tmp = (uint32)(p_ref + blkwidth); + tmp = p_ref + blkwidth; r0 = p_ref[0]; r1 = p_ref[2]; r0 |= (r1 << 16); /* 0,c,0,a */ r1 = p_ref[1]; r2 = p_ref[3]; r1 |= (r2 << 16); /* 0,d,0,b */ - while ((uint32)p_ref < tmp) + while (p_ref < tmp) { r2 = *(p_ref += 4); /* move pointer to e */ r3 = p_ref[2]; @@ -360,8 +360,8 @@ void eHorzInterp1MC(uint8 *in, int inpitch, uint8 *out, int outpitch, p_ref -= (ref_offset + blkwidth); /* input */ p_cur -= (outpitch >> 2); - tmp = (uint32)(p_ref + blkwidth); - for (; (uint32)p_ref < tmp;) + tmp = p_ref + blkwidth; + for (; p_ref < tmp;) { r0 = *p_ref++; @@ -434,14 +434,14 @@ void eHorzInterp1MC(uint8 *in, int inpitch, uint8 *out, int outpitch, r13 = 0; for (j = blkheight; j > 0; j--) { - tmp = (uint32)(p_ref + blkwidth); + tmp = p_ref + blkwidth; r0 = p_ref[0]; r1 = p_ref[2]; r0 |= (r1 << 16); /* 0,c,0,a */ r1 = p_ref[1]; r2 = p_ref[3]; r1 |= (r2 << 16); /* 0,d,0,b */ - while ((uint32)p_ref < tmp) + while (p_ref < tmp) { r2 = *(p_ref += 4); /* move pointer to e */ r3 = p_ref[2]; @@ -494,8 +494,8 @@ void eHorzInterp1MC(uint8 *in, int inpitch, uint8 *out, int outpitch, p_ref -= (ref_offset + blkwidth); /* input */ p_cur -= (outpitch >> 2); - tmp = (uint32)(p_ref + blkwidth); - for (; (uint32)p_ref < tmp;) + tmp = p_ref + blkwidth; + for (; p_ref < tmp;) { r0 = *p_ref++; @@ -558,9 +558,9 @@ void eHorzInterp1MC(uint8 *in, int inpitch, uint8 *out, int outpitch, void eHorzInterp2MC(int *in, int inpitch, uint8 *out, int outpitch, int blkwidth, int blkheight, int dx) { - int *p_ref; + int *p_ref, *tmp; uint32 *p_cur; - uint32 tmp, pkres; + uint32 pkres; int result, result2, curr_offset, ref_offset; int j, r0, r1, r2, r3, r4, r5; @@ -575,8 +575,8 @@ void eHorzInterp2MC(int *in, int inpitch, uint8 *out, int outpitch, for (j = blkheight; j > 0 ; j--) { - tmp = (uint32)(p_ref + blkwidth); - for (; (uint32)p_ref < tmp;) + tmp = p_ref + blkwidth; + for (; p_ref < tmp;) { r0 = p_ref[-2]; @@ -654,8 +654,8 @@ void eHorzInterp2MC(int *in, int inpitch, uint8 *out, int outpitch, { for (j = blkheight; j > 0 ; j--) { - tmp = (uint32)(p_ref + blkwidth); - for (; (uint32)p_ref < tmp;) + tmp = p_ref + blkwidth; + for (; p_ref < tmp;) { r0 = p_ref[-2]; @@ -717,9 +717,8 @@ void eHorzInterp2MC(int *in, int inpitch, uint8 *out, int outpitch, void eHorzInterp3MC(uint8 *in, int inpitch, int *out, int outpitch, int blkwidth, int blkheight) { - uint8 *p_ref; + uint8 *p_ref, *tmp; int *p_cur; - uint32 tmp; int result, curr_offset, ref_offset; int j, r0, r1, r2, r3, r4, r5; @@ -730,8 +729,8 @@ void eHorzInterp3MC(uint8 *in, int inpitch, int *out, int outpitch, for (j = blkheight; j > 0 ; j--) { - tmp = (uint32)(p_ref + blkwidth); - for (; (uint32)p_ref < tmp;) + tmp = p_ref + blkwidth; + for (; p_ref < tmp;) { r0 = p_ref[-2]; @@ -782,15 +781,14 @@ void eHorzInterp3MC(uint8 *in, int inpitch, int *out, int outpitch, void eVertInterp1MC(uint8 *in, int inpitch, uint8 *out, int outpitch, int blkwidth, int blkheight, int dy) { - uint8 *p_cur, *p_ref; - uint32 tmp; + uint8 *p_cur, *p_ref, *tmp; int result, curr_offset, ref_offset; int j, i; int32 r0, r1, r2, r3, r4, r5, r6, r7, r8, r13; uint8 tmp_in[24][24]; /* not word-aligned */ - if (((uint32)in)&0x3) + if (((intptr_t)in)&0x3) { eCreateAlign(in, inpitch, -2, &tmp_in[0][0], blkwidth, blkheight + 5); in = &tmp_in[2][0]; @@ -811,8 +809,8 @@ void eVertInterp1MC(uint8 *in, int inpitch, uint8 *out, int outpitch, r13 = 0; p_ref = in; p_cur -= outpitch; /* compensate for the first offset */ - tmp = (uint32)(p_ref + ref_offset); /* limit */ - while ((uint32)p_ref < tmp) /* the loop un-rolled */ + tmp = p_ref + ref_offset; /* limit */ + while (p_ref < tmp) /* the loop un-rolled */ { r0 = *((uint32*)(p_ref - (inpitch << 1))); /* load 4 bytes */ p_ref += inpitch; @@ -885,8 +883,8 @@ void eVertInterp1MC(uint8 *in, int inpitch, uint8 *out, int outpitch, p_ref = in + i; p_cur -= outpitch; /* compensate for the first offset */ - tmp = (uint32)(p_ref + ref_offset); /* limit */ - while ((uint32)p_ref < tmp) + tmp = p_ref + ref_offset; /* limit */ + while (p_ref < tmp) { /* loop un-rolled */ r0 = *(p_ref - (inpitch << 1)); r1 = *(p_ref - inpitch); @@ -959,8 +957,8 @@ void eVertInterp1MC(uint8 *in, int inpitch, uint8 *out, int outpitch, r13 = 0; p_ref = in; p_cur -= outpitch; /* compensate for the first offset */ - tmp = (uint32)(p_ref + ref_offset); /* limit */ - while ((uint32)p_ref < tmp) /* the loop un-rolled */ + tmp = p_ref + ref_offset; /* limit */ + while (p_ref < tmp) /* the loop un-rolled */ { r0 = *((uint32*)(p_ref - (inpitch << 1))); /* load 4 bytes */ p_ref += inpitch; @@ -1023,8 +1021,8 @@ void eVertInterp1MC(uint8 *in, int inpitch, uint8 *out, int outpitch, { p_ref = in + i; p_cur -= outpitch; /* compensate for the first offset */ - tmp = (uint32)(p_ref + ref_offset); /* limit */ - while ((uint32)p_ref < tmp) + tmp = p_ref + ref_offset; /* limit */ + while (p_ref < tmp) { /* loop un-rolled */ r0 = *(p_ref - (inpitch << 1)); r1 = *(p_ref - inpitch); @@ -1086,8 +1084,7 @@ void eVertInterp2MC(uint8 *in, int inpitch, int *out, int outpitch, int blkwidth, int blkheight) { int *p_cur; - uint8 *p_ref; - uint32 tmp; + uint8 *p_ref, *tmp; int result, curr_offset, ref_offset; int j, r0, r1, r2, r3, r4, r5; @@ -1100,8 +1097,8 @@ void eVertInterp2MC(uint8 *in, int inpitch, int *out, int outpitch, p_cur -= outpitch; /* compensate for the first offset */ p_ref = in++; - tmp = (uint32)(p_ref + ref_offset); /* limit */ - while ((uint32)p_ref < tmp) + tmp = p_ref + ref_offset; /* limit */ + while (p_ref < tmp) { /* loop un-rolled */ r0 = *(p_ref - (inpitch << 1)); r1 = *(p_ref - inpitch); @@ -1152,8 +1149,7 @@ void eVertInterp3MC(int *in, int inpitch, uint8 *out, int outpitch, int blkwidth, int blkheight, int dy) { uint8 *p_cur; - int *p_ref; - uint32 tmp; + int *p_ref, *tmp; int result, result2, curr_offset, ref_offset; int j, r0, r1, r2, r3, r4, r5; @@ -1170,8 +1166,8 @@ void eVertInterp3MC(int *in, int inpitch, uint8 *out, int outpitch, p_cur -= outpitch; /* compensate for the first offset */ p_ref = in++; - tmp = (uint32)(p_ref + ref_offset); /* limit */ - while ((uint32)p_ref < tmp) + tmp = p_ref + ref_offset; /* limit */ + while (p_ref < tmp) { /* loop un-rolled */ r0 = *(p_ref - (inpitch << 1)); r1 = *(p_ref - inpitch); @@ -1250,8 +1246,8 @@ void eVertInterp3MC(int *in, int inpitch, uint8 *out, int outpitch, p_cur -= outpitch; /* compensate for the first offset */ p_ref = in++; - tmp = (uint32)(p_ref + ref_offset); /* limit */ - while ((uint32)p_ref < tmp) + tmp = p_ref + ref_offset; /* limit */ + while (p_ref < tmp) { /* loop un-rolled */ r0 = *(p_ref - (inpitch << 1)); r1 = *(p_ref - inpitch); @@ -1313,11 +1309,11 @@ void eDiagonalInterpMC(uint8 *in1, uint8 *in2, int inpitch, { int j, i; int result; - uint8 *p_cur, *p_ref, *p_tmp8; + uint8 *p_cur, *p_ref, *p_tmp8, *tmp; int curr_offset, ref_offset; uint8 tmp_res[24][24], tmp_in[24][24]; uint32 *p_tmp; - uint32 tmp, pkres, tmp_result; + uint32 pkres, tmp_result; int32 r0, r1, r2, r3, r4, r5; int32 r6, r7, r8, r9, r10, r13; @@ -1337,7 +1333,7 @@ void eDiagonalInterpMC(uint8 *in1, uint8 *in2, int inpitch, for (j = blkheight; j > 0; j--) { r13 = 0; - tmp = (uint32)(p_ref + blkwidth); + tmp = p_ref + blkwidth; //r0 = *((uint32*)p_ref); /* d,c,b,a */ //r1 = (r0>>8)&0xFF00FF; /* 0,d,0,b */ @@ -1350,7 +1346,7 @@ void eDiagonalInterpMC(uint8 *in1, uint8 *in2, int inpitch, r2 = p_ref[3]; r1 |= (r2 << 16); /* 0,d,0,b */ - while ((uint32)p_ref < tmp) + while (p_ref < tmp) { //r2 = *((uint32*)(p_ref+=4));/* h,g,f,e */ //r3 = (r2>>8)&0xFF00FF; /* 0,h,0,f */ @@ -1406,8 +1402,8 @@ void eDiagonalInterpMC(uint8 *in1, uint8 *in2, int inpitch, /* move back to the beginning of the line */ p_ref -= (ref_offset + blkwidth); /* input */ p_tmp -= 6; /* intermediate output */ - tmp = (uint32)(p_ref + blkwidth); - while ((uint32)p_ref < tmp) + tmp = p_ref + blkwidth; + while (p_ref < tmp) { r0 = *p_ref++; r1 = *p_ref++; @@ -1465,7 +1461,7 @@ void eDiagonalInterpMC(uint8 *in1, uint8 *in2, int inpitch, /* perform vertical interpolation */ /* not word-aligned */ - if (((uint32)in2)&0x3) + if (((intptr_t)in2)&0x3) { eCreateAlign(in2, inpitch, -2, &tmp_in[0][0], blkwidth, blkheight + 5); in2 = &tmp_in[2][0]; @@ -1485,8 +1481,8 @@ void eDiagonalInterpMC(uint8 *in1, uint8 *in2, int inpitch, p_tmp8 = &(tmp_res[0][j]); /* intermediate result */ p_tmp8 -= 24; /* compensate for the first offset */ p_cur -= outpitch; /* compensate for the first offset */ - tmp = (uint32)(p_ref + pkres); /* limit */ - while ((uint32)p_ref < tmp) /* the loop un-rolled */ + tmp = p_ref + pkres; /* limit */ + while (p_ref < tmp) /* the loop un-rolled */ { /* Read 1 byte at a time is too slow, too many read and pack ops, need to call CreateAlign */ /*p_ref8 = p_ref-(inpitch<<1); r0 = p_ref8[0]; r1 = p_ref8[2]; @@ -1579,8 +1575,8 @@ void eDiagonalInterpMC(uint8 *in1, uint8 *in2, int inpitch, p_tmp8 = &(tmp_res[0][j+i]); /* intermediate result */ p_tmp8 -= 24; /* compensate for the first offset */ p_cur -= outpitch; /* compensate for the first offset */ - tmp = (uint32)(p_ref + pkres); /* limit */ - while ((uint32)p_ref < tmp) /* the loop un-rolled */ + tmp = p_ref + pkres; /* limit */ + while (p_ref < tmp) /* the loop un-rolled */ { r0 = *(p_ref - (inpitch << 1)); r1 = *(p_ref - inpitch); @@ -1659,7 +1655,7 @@ void eFullPelMC(uint8 *in, int inpitch, uint8 *out, int outpitch, uint32 temp; uint8 byte; - if (((uint32)in)&3) + if (((intptr_t)in)&3) { for (j = blkheight; j > 0; j--) { @@ -1720,7 +1716,7 @@ void ePadChroma(uint8 *ref, int picwidth, int picheight, int picpitch, int x_pos else start = ref + x_pos; /* word-align start */ - offset = (uint32)start & 0x3; + offset = (intptr_t)start & 0x3; if (offset) start -= offset; word1 = *((uint32*)start); @@ -1746,7 +1742,7 @@ void ePadChroma(uint8 *ref, int picwidth, int picheight, int picpitch, int x_pos else start = ref + picpitch * (picheight - 1) + x_pos; /* word-align start */ - offset = (uint32)start & 0x3; + offset = (intptr_t)start & 0x3; if (offset) start -= offset; word1 = *((uint32*)start); @@ -2121,7 +2117,7 @@ void eChromaFullMC_SIMD(uint8 *pRef, int srcPitch, int dx, int dy, uint16 temp; uint8 byte; - if (((uint32)pRef)&1) + if (((intptr_t)pRef)&1) { for (j = blkheight; j > 0; j--) { diff --git a/media/libstagefright/codecs/avc/enc/src/sad_inline.h b/media/libstagefright/codecs/avc/enc/src/sad_inline.h index f39794f155e6..3f1848334dca 100644 --- a/media/libstagefright/codecs/avc/enc/src/sad_inline.h +++ b/media/libstagefright/codecs/avc/enc/src/sad_inline.h @@ -80,7 +80,7 @@ extern "C" x9 = 0x80808080; /* const. */ - x8 = (uint32)ref & 0x3; + x8 = (intptr_t)ref & 0x3; if (x8 == 3) goto SadMBOffset3; if (x8 == 2) diff --git a/media/libstagefright/codecs/common/Android.mk b/media/libstagefright/codecs/common/Android.mk index af8795ab570b..77fe93481cc7 100644 --- a/media/libstagefright/codecs/common/Android.mk +++ b/media/libstagefright/codecs/common/Android.mk @@ -16,17 +16,6 @@ LOCAL_C_INCLUDES := \ LOCAL_CFLAGS := $(VO_CFLAGS) -ifeq ($(VOTT), v5) -LOCAL_CFLAGS += -DARM -DASM_OPT -LOCAL_C_INCLUDES += $(LOCAL_PATH)/src/asm/ARMV5E -endif - -ifeq ($(VOTT), v7) -LOCAL_CFLAGS += -DARM -DARMV7 -DASM_OPT -LOCAL_C_INCLUDES += $(LOCAL_PATH)/src/asm/ARMV5E -LOCAL_C_INCLUDES += $(LOCAL_PATH)/src/asm/ARMV7 -endif - include $(BUILD_SHARED_LIBRARY) diff --git a/media/libstagefright/matroska/MatroskaExtractor.cpp b/media/libstagefright/matroska/MatroskaExtractor.cpp index 4fbf47ee979c..9ba0e829adec 100644 --- a/media/libstagefright/matroska/MatroskaExtractor.cpp +++ b/media/libstagefright/matroska/MatroskaExtractor.cpp @@ -768,12 +768,12 @@ void MatroskaExtractor::findThumbnails() { } BlockIterator iter(this, info->mTrackNum); - int32_t i = 0; + int32_t j = 0; int64_t thumbnailTimeUs = 0; size_t maxBlockSize = 0; - while (!iter.eos() && i < 20) { + while (!iter.eos() && j < 20) { if (iter.block()->IsKey()) { - ++i; + ++j; size_t blockSize = 0; for (int i = 0; i < iter.block()->GetFrameCount(); ++i) { diff --git a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java index 724679f38c11..f9debce48f0e 100644 --- a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java +++ b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java @@ -282,6 +282,13 @@ public class ImageWallpaper extends WallpaperService { updateWallpaperLocked(); } + if (mBackground == null) { + // If we somehow got to this point after we have last flushed + // the wallpaper, well we really need it to draw again. So + // seems like we need to reload it. Ouch. + updateWallpaperLocked(); + } + SurfaceHolder sh = getSurfaceHolder(); final Rect frame = sh.getSurfaceFrame(); final int dw = frame.width(); @@ -303,13 +310,6 @@ public class ImageWallpaper extends WallpaperService { mLastXTranslation = xPixels; mLastYTranslation = yPixels; - if (mBackground == null) { - // If we somehow got to this point after we have last flushed - // the wallpaper, well we really need it to draw again. So - // seems like we need to reload it. Ouch. - updateWallpaperLocked(); - } - if (mIsHwAccelerated) { if (!drawWallpaperWithOpenGL(sh, availw, availh, xPixels, yPixels)) { drawWallpaperWithCanvas(sh, availw, availh, xPixels, yPixels); diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index f1fe43b70e16..2864d22ee38d 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -1653,7 +1653,9 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { */ private void restorePanelState(SparseArray<Parcelable> icicles) { PanelFeatureState st; - for (int curFeatureId = icicles.size() - 1; curFeatureId >= 0; curFeatureId--) { + int curFeatureId; + for (int i = icicles.size() - 1; i >= 0; i--) { + curFeatureId = icicles.keyAt(i); st = getPanelState(curFeatureId, false /* required */); if (st == null) { // The panel must not have been required, and is currently not around, skip it diff --git a/services/input/InputReader.cpp b/services/input/InputReader.cpp index 9a6372ef4f30..91e375d9ab56 100644 --- a/services/input/InputReader.cpp +++ b/services/input/InputReader.cpp @@ -644,9 +644,13 @@ int32_t InputReader::getStateLocked(int32_t deviceId, uint32_t sourceMask, int32 for (size_t i = 0; i < numDevices; i++) { InputDevice* device = mDevices.valueAt(i); if (! device->isIgnored() && sourcesMatchMask(device->getSources(), sourceMask)) { - result = (device->*getStateFunc)(sourceMask, code); - if (result >= AKEY_STATE_DOWN) { - return result; + // If any device reports AKEY_STATE_DOWN or AKEY_STATE_VIRTUAL, return that + // value. Otherwise, return AKEY_STATE_UP as long as one device reports it. + int32_t currentResult = (device->*getStateFunc)(sourceMask, code); + if (currentResult >= AKEY_STATE_DOWN) { + return currentResult; + } else if (currentResult == AKEY_STATE_UP) { + result = currentResult; } } } @@ -1000,9 +1004,13 @@ int32_t InputDevice::getState(uint32_t sourceMask, int32_t code, GetStateFunc ge for (size_t i = 0; i < numMappers; i++) { InputMapper* mapper = mMappers[i]; if (sourcesMatchMask(mapper->getSources(), sourceMask)) { - result = (mapper->*getStateFunc)(sourceMask, code); - if (result >= AKEY_STATE_DOWN) { - return result; + // If any mapper reports AKEY_STATE_DOWN or AKEY_STATE_VIRTUAL, return that + // value. Otherwise, return AKEY_STATE_UP as long as one mapper reports it. + int32_t currentResult = (mapper->*getStateFunc)(sourceMask, code); + if (currentResult >= AKEY_STATE_DOWN) { + return currentResult; + } else if (currentResult == AKEY_STATE_UP) { + result = currentResult; } } } diff --git a/services/java/com/android/server/WallpaperManagerService.java b/services/java/com/android/server/WallpaperManagerService.java index 4925a4e46e51..cca6536ca93c 100644 --- a/services/java/com/android/server/WallpaperManagerService.java +++ b/services/java/com/android/server/WallpaperManagerService.java @@ -169,6 +169,7 @@ class WallpaperManagerService extends IWallpaperManager.Stub { WallpaperConnection mWallpaperConnection; long mLastDiedTime; boolean mWallpaperUpdating; + boolean mDesiredDimensionChanging; class WallpaperConnection extends IWallpaperConnection.Stub implements ServiceConnection { @@ -213,6 +214,13 @@ class WallpaperManagerService extends IWallpaperManager.Stub { public void attachEngine(IWallpaperEngine engine) { mEngine = engine; + if (engine != null && mDesiredDimensionChanging) { + try { + engine.setDesiredSize(mWidth, mHeight); + mDesiredDimensionChanging = false; + } catch (RemoteException e) { + } + } } public ParcelFileDescriptor setWallpaper(String name) { @@ -395,6 +403,7 @@ class WallpaperManagerService extends IWallpaperManager.Stub { synchronized (mLock) { if (width != mWidth || height != mHeight) { + boolean desiredDimensionPropagated = false; mWidth = width; mHeight = height; saveSettingsLocked(); @@ -403,11 +412,15 @@ class WallpaperManagerService extends IWallpaperManager.Stub { try { mWallpaperConnection.mEngine.setDesiredSize( width, height); + desiredDimensionPropagated = true; } catch (RemoteException e) { } notifyCallbacksLocked(); } } + if (!desiredDimensionPropagated) { + mDesiredDimensionChanging = true; + } } } } diff --git a/services/java/com/android/server/pm/Settings.java b/services/java/com/android/server/pm/Settings.java index 36442a0c4fac..f0f54146a1af 100644 --- a/services/java/com/android/server/pm/Settings.java +++ b/services/java/com/android/server/pm/Settings.java @@ -971,7 +971,7 @@ final class Settings { // Avoid any application that has a space in its path // or that is handled by the system. - if (dataPath.indexOf(" ") >= 0 || ai.uid <= Process.FIRST_APPLICATION_UID) + if (dataPath.indexOf(" ") >= 0 || ai.uid < Process.FIRST_APPLICATION_UID) continue; // we store on each line the following information for now: @@ -2261,4 +2261,4 @@ final class Settings { pw.println("Settings parse messages:"); pw.print(mReadMessages.toString()); } -}
\ No newline at end of file +} diff --git a/tools/aapt/AaptAssets.cpp b/tools/aapt/AaptAssets.cpp index 3d6537a9013e..eba77c258acb 100644 --- a/tools/aapt/AaptAssets.cpp +++ b/tools/aapt/AaptAssets.cpp @@ -56,55 +56,92 @@ static bool validateFileName(const char* fileName) return true; } +// The default to use if no other ignore pattern is defined. +const char * const gDefaultIgnoreAssets = + "!.svn:!.git:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~"; +// The ignore pattern that can be passed via --ignore-assets in Main.cpp +const char * gUserIgnoreAssets = NULL; + static bool isHidden(const char *root, const char *path) { - const char *ext = NULL; - const char *type = NULL; - - // Skip all hidden files. - if (path[0] == '.') { - // Skip ., .. and .svn but don't chatter about it. - if (strcmp(path, ".") == 0 - || strcmp(path, "..") == 0 - || strcmp(path, ".svn") == 0) { - return true; - } - type = "hidden"; - } else if (path[0] == '_') { - // skip directories starting with _ (don't chatter about it) - String8 subdirName(root); - subdirName.appendPath(path); - if (getFileType(subdirName.string()) == kFileTypeDirectory) { - return true; - } - } else if (strcmp(path, "CVS") == 0) { - // Skip CVS but don't chatter about it. - return true; - } else if (strcasecmp(path, "thumbs.db") == 0 - || strcasecmp(path, "picasa.ini") == 0) { - // Skip suspected image indexes files. - type = "index"; - } else if (path[strlen(path)-1] == '~') { - // Skip suspected emacs backup files. - type = "backup"; - } else if ((ext = strrchr(path, '.')) != NULL && strcmp(ext, ".scc") == 0) { - // Skip VisualSourceSafe files and don't chatter about it + // Patterns syntax: + // - Delimiter is : + // - Entry can start with the flag ! to avoid printing a warning + // about the file being ignored. + // - Entry can have the flag "<dir>" to match only directories + // or <file> to match only files. Default is to match both. + // - Entry can be a simplified glob "<prefix>*" or "*<suffix>" + // where prefix/suffix must have at least 1 character (so that + // we don't match a '*' catch-all pattern.) + // - The special filenames "." and ".." are always ignored. + // - Otherwise the full string is matched. + // - match is not case-sensitive. + + if (strcmp(path, ".") == 0 || strcmp(path, "..") == 0) { return true; - } else { - // Let everything else through. - return false; } - /* If we get this far, "type" should be set and the file - * should be skipped. - */ - String8 subdirName(root); - subdirName.appendPath(path); - fprintf(stderr, " (skipping %s %s '%s')\n", type, - getFileType(subdirName.string())==kFileTypeDirectory ? "dir":"file", - subdirName.string()); + const char *delim = ":"; + const char *p = gUserIgnoreAssets; + if (!p || !p[0]) { + p = getenv("ANDROID_AAPT_IGNORE"); + } + if (!p || !p[0]) { + p = gDefaultIgnoreAssets; + } + char *patterns = strdup(p); - return true; + bool ignore = false; + bool chatty = true; + char *matchedPattern = NULL; + + String8 fullPath(root); + fullPath.appendPath(path); + FileType type = getFileType(fullPath); + + int plen = strlen(path); + + // Note: we don't have strtok_r under mingw. + for(char *token = strtok(patterns, delim); + !ignore && token != NULL; + token = strtok(NULL, delim)) { + chatty = token[0] != '!'; + if (!chatty) token++; // skip ! + if (strncasecmp(token, "<dir>" , 5) == 0) { + if (type != kFileTypeDirectory) continue; + token += 5; + } + if (strncasecmp(token, "<file>", 6) == 0) { + if (type != kFileTypeRegular) continue; + token += 6; + } + + matchedPattern = token; + int n = strlen(token); + + if (token[0] == '*') { + // Match *suffix + token++; + if (n <= plen) { + ignore = strncasecmp(token, path + plen - n, n) == 0; + } + } else if (n > 1 && token[n - 1] == '*') { + // Match prefix* + ignore = strncasecmp(token, path, n - 1) == 0; + } else { + ignore = strcasecmp(token, path) == 0; + } + } + + if (ignore && chatty) { + fprintf(stderr, " (skipping %s '%s' due to ANDROID_AAPT_IGNORE pattern '%s')\n", + type == kFileTypeDirectory ? "dir" : "file", + path, + matchedPattern ? matchedPattern : ""); + } + + free(patterns); + return ignore; } // ========================================================================= diff --git a/tools/aapt/AaptAssets.h b/tools/aapt/AaptAssets.h index d5345b277caf..52751c755652 100644 --- a/tools/aapt/AaptAssets.h +++ b/tools/aapt/AaptAssets.h @@ -22,6 +22,10 @@ using namespace android; + +extern const char * const gDefaultIgnoreAssets; +extern const char * gUserIgnoreAssets; + bool valid_symbol_name(const String8& str); class AaptAssets; diff --git a/tools/aapt/Bundle.h b/tools/aapt/Bundle.h index 2d1060ba23a0..e402d70b299f 100644 --- a/tools/aapt/Bundle.h +++ b/tools/aapt/Bundle.h @@ -41,7 +41,6 @@ public: mWantUTF16(false), mValues(false), mCompressionMethod(0), mOutputAPKFile(NULL), mManifestPackageNameOverride(NULL), mInstrumentationPackageNameOverride(NULL), - mIsOverlayPackage(false), mAutoAddOverlay(false), mGenDependencies(false), mAssetSourceDir(NULL), mCrunchedOutputDir(NULL), mProguardFile(NULL), @@ -96,8 +95,6 @@ public: void setManifestPackageNameOverride(const char * val) { mManifestPackageNameOverride = val; } const char* getInstrumentationPackageNameOverride() const { return mInstrumentationPackageNameOverride; } void setInstrumentationPackageNameOverride(const char * val) { mInstrumentationPackageNameOverride = val; } - bool getIsOverlayPackage() const { return mIsOverlayPackage; } - void setIsOverlayPackage(bool val) { mIsOverlayPackage = val; } bool getAutoAddOverlay() { return mAutoAddOverlay; } void setAutoAddOverlay(bool val) { mAutoAddOverlay = val; } bool getGenDependencies() { return mGenDependencies; } @@ -235,7 +232,6 @@ private: const char* mOutputAPKFile; const char* mManifestPackageNameOverride; const char* mInstrumentationPackageNameOverride; - bool mIsOverlayPackage; bool mAutoAddOverlay; bool mGenDependencies; const char* mAssetSourceDir; diff --git a/tools/aapt/Main.cpp b/tools/aapt/Main.cpp index 50c828def46d..9570c663cbea 100644 --- a/tools/aapt/Main.cpp +++ b/tools/aapt/Main.cpp @@ -69,7 +69,6 @@ void usage(void) " [-F apk-file] [-J R-file-dir] \\\n" " [--product product1,product2,...] \\\n" " [-c CONFIGS] [--preferred-configurations CONFIGS] \\\n" - " [-o] \\\n" " [raw-files-dir [raw-files-dir] ...]\n" "\n" " Package the android resources. It will read assets and resources that are\n" @@ -110,7 +109,6 @@ void usage(void) " -j specify a jar or zip file containing classes to include\n" " -k junk path of file(s) added\n" " -m make package directories under location specified by -J\n" - " -o create overlay package (ie only resources; expects <overlay-package> in manifest)\n" #if 0 " -p pseudolocalize the default configuration\n" #endif @@ -178,7 +176,11 @@ void usage(void) " --non-constant-id\n" " Make the resources ID non constant. This is required to make an R java class\n" " that does not contain the final value but is used to make reusable compiled\n" - " libraries that need to access resources.\n"); + " libraries that need to access resources.\n" + " --ignore-assets\n" + " Assets to be ignored. Default pattern is:\n" + " %s\n", + gDefaultIgnoreAssets); } /* @@ -292,9 +294,6 @@ int main(int argc, char* const argv[]) case 'm': bundle.setMakePackageDirs(true); break; - case 'o': - bundle.setIsOverlayPackage(true); - break; #if 0 case 'p': bundle.setPseudolocalize(true); @@ -556,7 +555,16 @@ int main(int argc, char* const argv[]) bundle.setNonConstantId(true); } else if (strcmp(cp, "-no-crunch") == 0) { bundle.setUseCrunchCache(true); - }else { + } else if (strcmp(cp, "-ignore-assets") == 0) { + argc--; + argv++; + if (!argc) { + fprintf(stderr, "ERROR: No argument supplied for '--ignore-assets' option\n"); + wantUsage = true; + goto bail; + } + gUserIgnoreAssets = argv[0]; + } else { fprintf(stderr, "ERROR: Unknown option '-%s'\n", cp); wantUsage = true; goto bail; diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp index fdb39ca08e9f..770b02797cec 100644 --- a/tools/aapt/ResourceTable.cpp +++ b/tools/aapt/ResourceTable.cpp @@ -2661,6 +2661,12 @@ status_t ResourceTable::flatten(Bundle* bundle, const sp<AaptFile>& dest) const bool filterable = (typeName != mipmap16); const size_t N = t != NULL ? t->getOrderedConfigs().size() : 0; + + // Until a non-NO_ENTRY value has been written for a resource, + // that resource is invalid; validResources[i] represents + // the item at t->getOrderedConfigs().itemAt(i). + Vector<bool> validResources; + validResources.insertAt(false, 0, N); // First write the typeSpec chunk, containing information about // each resource entry in this type. @@ -2797,6 +2803,7 @@ status_t ResourceTable::flatten(Bundle* bundle, const sp<AaptFile>& dest) if (amt < 0) { return amt; } + validResources.editItemAt(ei) = true; } else { index[ei] = htodl(ResTable_type::NO_ENTRY); } @@ -2807,6 +2814,14 @@ status_t ResourceTable::flatten(Bundle* bundle, const sp<AaptFile>& dest) (((uint8_t*)data->editData()) + typeStart); tHeader->header.size = htodl(data->getSize()-typeStart); } + + for (size_t i = 0; i < N; ++i) { + if (!validResources[i]) { + sp<ConfigList> c = t->getOrderedConfigs().itemAt(i); + fprintf(stderr, "warning: no entries written for %s/%s\n", + String8(typeName).string(), String8(c->getName()).string()); + } + } } // Fill in the rest of the package information. @@ -3609,9 +3624,7 @@ sp<ResourceTable::Package> ResourceTable::getPackage(const String16& package) { sp<Package> p = mPackages.valueFor(package); if (p == NULL) { - if (mBundle->getIsOverlayPackage()) { - p = new Package(package, 0x00); - } else if (mIsAppPackage) { + if (mIsAppPackage) { if (mHaveAppPackage) { fprintf(stderr, "Adding multiple application package resources; only one is allowed.\n" "Use -x to create extended resources.\n"); diff --git a/tools/layoutlib/bridge/.classpath b/tools/layoutlib/bridge/.classpath index 9fb000e65653..a5db7b1fc1ef 100644 --- a/tools/layoutlib/bridge/.classpath +++ b/tools/layoutlib/bridge/.classpath @@ -3,7 +3,7 @@ <classpathentry excluding="org/kxml2/io/" kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="var" path="ANDROID_PLAT_SRC/prebuilt/common/layoutlib_api/layoutlib_api-prebuilt.jar"/> - <classpathentry kind="var" path="ANDROID_PLAT_SRC/prebuilt/common/kxml2/kxml2-2.3.0.jar" sourcepath="/ANDROID_PLAT_SRC/dalvik/libcore/xml/src/main/java"/> + <classpathentry kind="var" path="ANDROID_PLAT_SRC/prebuilts/misc/common/kxml2/kxml2-2.3.0.jar" sourcepath="/ANDROID_PLAT_SRC/dalvik/libcore/xml/src/main/java"/> <classpathentry kind="var" path="ANDROID_PLAT_SRC/out/host/common/obj/JAVA_LIBRARIES/temp_layoutlib_intermediates/javalib.jar" sourcepath="/ANDROID_PLAT_SRC/frameworks/base"/> <classpathentry kind="var" path="ANDROID_PLAT_SRC/prebuilt/common/ninepatch/ninepatch-prebuilt.jar"/> <classpathentry kind="var" path="ANDROID_PLAT_SRC/prebuilt/common/tools-common/tools-common-prebuilt.jar"/> diff --git a/tools/layoutlib/bridge/tests/.classpath b/tools/layoutlib/bridge/tests/.classpath index 027bc6783306..2b32e097de90 100644 --- a/tools/layoutlib/bridge/tests/.classpath +++ b/tools/layoutlib/bridge/tests/.classpath @@ -4,7 +4,7 @@ <classpathentry kind="src" path="res"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry combineaccessrules="false" kind="src" path="/layoutlib_bridge"/> - <classpathentry kind="var" path="ANDROID_PLAT_SRC/prebuilt/common/kxml2/kxml2-2.3.0.jar" sourcepath="/ANDROID_PLAT_SRC/dalvik/libcore/xml/src/main/java"/> + <classpathentry kind="var" path="ANDROID_PLAT_SRC/prebuilts/misc/common/kxml2/kxml2-2.3.0.jar" sourcepath="/ANDROID_PLAT_SRC/dalvik/libcore/xml/src/main/java"/> <classpathentry kind="var" path="ANDROID_PLAT_SRC/out/host/common/obj/JAVA_LIBRARIES/temp_layoutlib_intermediates/javalib.jar" sourcepath="/ANDROID_PLAT_SRC/frameworks/base"/> <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/> <classpathentry kind="output" path="bin"/> |