Loading core/java/android/app/DownloadManager.java +3 −3 Original line number Diff line number Diff line Loading @@ -1038,7 +1038,7 @@ public class DownloadManager { if (cursor.moveToFirst()) { int status = cursor.getInt(cursor.getColumnIndexOrThrow(COLUMN_STATUS)); if (DownloadManager.STATUS_SUCCESSFUL == status) { return ContentUris.withAppendedId(Downloads.Impl.CONTENT_URI, id); return ContentUris.withAppendedId(Downloads.Impl.ALL_DOWNLOADS_CONTENT_URI, id); } } } finally { Loading Loading @@ -1263,7 +1263,7 @@ public class DownloadManager { * @hide */ public Uri getDownloadUri(long id) { return ContentUris.withAppendedId(mBaseUri, id); return ContentUris.withAppendedId(Downloads.Impl.ALL_DOWNLOADS_CONTENT_URI, id); } /** Loading Loading @@ -1344,7 +1344,7 @@ public class DownloadManager { // return content URI for cache download long downloadId = getLong(getColumnIndex(Downloads.Impl._ID)); return ContentUris.withAppendedId(mBaseUri, downloadId).toString(); return ContentUris.withAppendedId(Downloads.Impl.ALL_DOWNLOADS_CONTENT_URI, downloadId).toString(); } private long getReason(int status) { Loading core/java/android/bluetooth/BluetoothDevice.java +2 −2 Original line number Diff line number Diff line Loading @@ -1166,12 +1166,12 @@ public final class BluetoothDevice implements Parcelable { /** * Confirm passkey for {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing. * <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN}. * <p>Requires {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED}. * * @return true confirmation has been sent out * false for error */ @RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN) @RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setPairingConfirmation(boolean confirm) { if (sService == null) { Log.e(TAG, "BT not enabled. Cannot set pairing confirmation"); Loading core/jni/android/graphics/Bitmap.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -150,12 +150,12 @@ Bitmap::Bitmap(void* address, void* context, FreeFunc freeFunc, mPixelRef->unref(); } Bitmap::Bitmap(void* address, int fd, Bitmap::Bitmap(void* address, int fd, size_t mappedSize, const SkImageInfo& info, size_t rowBytes, SkColorTable* ctable) : mPixelStorageType(PixelStorageType::Ashmem) { mPixelStorage.ashmem.address = address; mPixelStorage.ashmem.fd = fd; mPixelStorage.ashmem.size = ashmem_get_size_region(fd); mPixelStorage.ashmem.size = mappedSize; mPixelRef.reset(new WrappedPixelRef(this, address, info, rowBytes, ctable)); // Note: this will trigger a call to onStrongRefDestroyed(), but // we want the pixel ref to have a ref count of 0 at this point Loading Loading @@ -1015,7 +1015,7 @@ static jobject Bitmap_createFromParcel(JNIEnv* env, jobject, jobject parcel) { // Map the pixels in place and take ownership of the ashmem region. nativeBitmap = GraphicsJNI::mapAshmemPixelRef(env, bitmap.get(), ctable, dupFd, const_cast<void*>(blob.data()), !isMutable); ctable, dupFd, const_cast<void*>(blob.data()), size, !isMutable); SkSafeUnref(ctable); if (!nativeBitmap) { close(dupFd); Loading core/jni/android/graphics/Bitmap.h +2 −2 Original line number Diff line number Diff line Loading @@ -51,8 +51,8 @@ public: const SkImageInfo& info, size_t rowBytes, SkColorTable* ctable); Bitmap(void* address, void* context, FreeFunc freeFunc, const SkImageInfo& info, size_t rowBytes, SkColorTable* ctable); Bitmap(void* address, int fd, const SkImageInfo& info, size_t rowBytes, SkColorTable* ctable); Bitmap(void* address, int fd, size_t mappedSize, const SkImageInfo& info, size_t rowBytes, SkColorTable* ctable); const SkImageInfo& info() const; Loading core/jni/android/graphics/Graphics.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -613,7 +613,7 @@ android::Bitmap* GraphicsJNI::allocateAshmemPixelRef(JNIEnv* env, SkBitmap* bitm return nullptr; } android::Bitmap* wrapper = new android::Bitmap(addr, fd, info, rowBytes, ctable); android::Bitmap* wrapper = new android::Bitmap(addr, fd, size, info, rowBytes, ctable); wrapper->getSkBitmap(bitmap); // since we're already allocated, we lockPixels right away // HeapAllocator behaves this way too Loading @@ -623,7 +623,7 @@ android::Bitmap* GraphicsJNI::allocateAshmemPixelRef(JNIEnv* env, SkBitmap* bitm } android::Bitmap* GraphicsJNI::mapAshmemPixelRef(JNIEnv* env, SkBitmap* bitmap, SkColorTable* ctable, int fd, void* addr, bool readOnly) { SkColorTable* ctable, int fd, void* addr, size_t size, bool readOnly) { const SkImageInfo& info = bitmap->info(); if (info.fColorType == kUnknown_SkColorType) { doThrowIAE(env, "unknown bitmap configuration"); Loading @@ -633,7 +633,8 @@ android::Bitmap* GraphicsJNI::mapAshmemPixelRef(JNIEnv* env, SkBitmap* bitmap, if (!addr) { // Map existing ashmem region if not already mapped. int flags = readOnly ? (PROT_READ) : (PROT_READ | PROT_WRITE); addr = mmap(NULL, ashmem_get_size_region(fd), flags, MAP_SHARED, fd, 0); size = ashmem_get_size_region(fd); addr = mmap(NULL, size, flags, MAP_SHARED, fd, 0); if (addr == MAP_FAILED) { return nullptr; } Loading @@ -643,7 +644,7 @@ android::Bitmap* GraphicsJNI::mapAshmemPixelRef(JNIEnv* env, SkBitmap* bitmap, // attempting to compute our own. const size_t rowBytes = bitmap->rowBytes(); android::Bitmap* wrapper = new android::Bitmap(addr, fd, info, rowBytes, ctable); android::Bitmap* wrapper = new android::Bitmap(addr, fd, size, info, rowBytes, ctable); wrapper->getSkBitmap(bitmap); if (readOnly) { bitmap->pixelRef()->setImmutable(); Loading Loading
core/java/android/app/DownloadManager.java +3 −3 Original line number Diff line number Diff line Loading @@ -1038,7 +1038,7 @@ public class DownloadManager { if (cursor.moveToFirst()) { int status = cursor.getInt(cursor.getColumnIndexOrThrow(COLUMN_STATUS)); if (DownloadManager.STATUS_SUCCESSFUL == status) { return ContentUris.withAppendedId(Downloads.Impl.CONTENT_URI, id); return ContentUris.withAppendedId(Downloads.Impl.ALL_DOWNLOADS_CONTENT_URI, id); } } } finally { Loading Loading @@ -1263,7 +1263,7 @@ public class DownloadManager { * @hide */ public Uri getDownloadUri(long id) { return ContentUris.withAppendedId(mBaseUri, id); return ContentUris.withAppendedId(Downloads.Impl.ALL_DOWNLOADS_CONTENT_URI, id); } /** Loading Loading @@ -1344,7 +1344,7 @@ public class DownloadManager { // return content URI for cache download long downloadId = getLong(getColumnIndex(Downloads.Impl._ID)); return ContentUris.withAppendedId(mBaseUri, downloadId).toString(); return ContentUris.withAppendedId(Downloads.Impl.ALL_DOWNLOADS_CONTENT_URI, downloadId).toString(); } private long getReason(int status) { Loading
core/java/android/bluetooth/BluetoothDevice.java +2 −2 Original line number Diff line number Diff line Loading @@ -1166,12 +1166,12 @@ public final class BluetoothDevice implements Parcelable { /** * Confirm passkey for {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing. * <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN}. * <p>Requires {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED}. * * @return true confirmation has been sent out * false for error */ @RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN) @RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setPairingConfirmation(boolean confirm) { if (sService == null) { Log.e(TAG, "BT not enabled. Cannot set pairing confirmation"); Loading
core/jni/android/graphics/Bitmap.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -150,12 +150,12 @@ Bitmap::Bitmap(void* address, void* context, FreeFunc freeFunc, mPixelRef->unref(); } Bitmap::Bitmap(void* address, int fd, Bitmap::Bitmap(void* address, int fd, size_t mappedSize, const SkImageInfo& info, size_t rowBytes, SkColorTable* ctable) : mPixelStorageType(PixelStorageType::Ashmem) { mPixelStorage.ashmem.address = address; mPixelStorage.ashmem.fd = fd; mPixelStorage.ashmem.size = ashmem_get_size_region(fd); mPixelStorage.ashmem.size = mappedSize; mPixelRef.reset(new WrappedPixelRef(this, address, info, rowBytes, ctable)); // Note: this will trigger a call to onStrongRefDestroyed(), but // we want the pixel ref to have a ref count of 0 at this point Loading Loading @@ -1015,7 +1015,7 @@ static jobject Bitmap_createFromParcel(JNIEnv* env, jobject, jobject parcel) { // Map the pixels in place and take ownership of the ashmem region. nativeBitmap = GraphicsJNI::mapAshmemPixelRef(env, bitmap.get(), ctable, dupFd, const_cast<void*>(blob.data()), !isMutable); ctable, dupFd, const_cast<void*>(blob.data()), size, !isMutable); SkSafeUnref(ctable); if (!nativeBitmap) { close(dupFd); Loading
core/jni/android/graphics/Bitmap.h +2 −2 Original line number Diff line number Diff line Loading @@ -51,8 +51,8 @@ public: const SkImageInfo& info, size_t rowBytes, SkColorTable* ctable); Bitmap(void* address, void* context, FreeFunc freeFunc, const SkImageInfo& info, size_t rowBytes, SkColorTable* ctable); Bitmap(void* address, int fd, const SkImageInfo& info, size_t rowBytes, SkColorTable* ctable); Bitmap(void* address, int fd, size_t mappedSize, const SkImageInfo& info, size_t rowBytes, SkColorTable* ctable); const SkImageInfo& info() const; Loading
core/jni/android/graphics/Graphics.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -613,7 +613,7 @@ android::Bitmap* GraphicsJNI::allocateAshmemPixelRef(JNIEnv* env, SkBitmap* bitm return nullptr; } android::Bitmap* wrapper = new android::Bitmap(addr, fd, info, rowBytes, ctable); android::Bitmap* wrapper = new android::Bitmap(addr, fd, size, info, rowBytes, ctable); wrapper->getSkBitmap(bitmap); // since we're already allocated, we lockPixels right away // HeapAllocator behaves this way too Loading @@ -623,7 +623,7 @@ android::Bitmap* GraphicsJNI::allocateAshmemPixelRef(JNIEnv* env, SkBitmap* bitm } android::Bitmap* GraphicsJNI::mapAshmemPixelRef(JNIEnv* env, SkBitmap* bitmap, SkColorTable* ctable, int fd, void* addr, bool readOnly) { SkColorTable* ctable, int fd, void* addr, size_t size, bool readOnly) { const SkImageInfo& info = bitmap->info(); if (info.fColorType == kUnknown_SkColorType) { doThrowIAE(env, "unknown bitmap configuration"); Loading @@ -633,7 +633,8 @@ android::Bitmap* GraphicsJNI::mapAshmemPixelRef(JNIEnv* env, SkBitmap* bitmap, if (!addr) { // Map existing ashmem region if not already mapped. int flags = readOnly ? (PROT_READ) : (PROT_READ | PROT_WRITE); addr = mmap(NULL, ashmem_get_size_region(fd), flags, MAP_SHARED, fd, 0); size = ashmem_get_size_region(fd); addr = mmap(NULL, size, flags, MAP_SHARED, fd, 0); if (addr == MAP_FAILED) { return nullptr; } Loading @@ -643,7 +644,7 @@ android::Bitmap* GraphicsJNI::mapAshmemPixelRef(JNIEnv* env, SkBitmap* bitmap, // attempting to compute our own. const size_t rowBytes = bitmap->rowBytes(); android::Bitmap* wrapper = new android::Bitmap(addr, fd, info, rowBytes, ctable); android::Bitmap* wrapper = new android::Bitmap(addr, fd, size, info, rowBytes, ctable); wrapper->getSkBitmap(bitmap); if (readOnly) { bitmap->pixelRef()->setImmutable(); Loading