Loading packages/MtpDocumentsProvider/Android.mk +5 −0 Original line number Diff line number Diff line Loading @@ -9,5 +9,10 @@ LOCAL_PRIVILEGED_MODULE := true LOCAL_JNI_SHARED_LIBRARIES := libappfuse_jni LOCAL_PROGUARD_FLAG_FILES := proguard.flags # Only enable asserts on userdebug/eng builds ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) LOCAL_JACK_FLAGS += -D jack.assert.policy=enable endif include $(BUILD_PACKAGE) include $(call all-makefiles-under, $(LOCAL_PATH)) packages/MtpDocumentsProvider/src/com/android/mtp/DocumentLoader.java +4 −2 Original line number Diff line number Diff line Loading @@ -69,7 +69,8 @@ class DocumentLoader implements AutoCloseable { */ synchronized Cursor queryChildDocuments(String[] columnNames, Identifier parent) throws IOException { Preconditions.checkArgument(parent.mDeviceId == mDevice.deviceId); assert parent.mDeviceId == mDevice.deviceId; LoaderTask task = mTaskList.findTask(parent); if (task == null) { if (parent.mDocumentId == null) { Loading Loading @@ -256,7 +257,8 @@ class DocumentLoader implements AutoCloseable { LoaderTask(MtpManager manager, MtpDatabase database, int[] operationsSupported, Identifier identifier) { Preconditions.checkNotNull(operationsSupported); assert operationsSupported != null; assert identifier.mDocumentType != MtpDatabaseConstants.DOCUMENT_TYPE_DEVICE; mManager = manager; mDatabase = database; mOperationsSupported = operationsSupported; Loading packages/MtpDocumentsProvider/src/com/android/mtp/MtpDatabase.java +2 −1 Original line number Diff line number Diff line Loading @@ -617,6 +617,7 @@ class MtpDatabase { final String whereClosure = "parent." + COLUMN_DEVICE_ID + " = ? AND " + "parent." + COLUMN_ROW_STATE + " IN (?, ?) AND " + "parent." + COLUMN_DOCUMENT_TYPE + " != ? AND " + "child." + COLUMN_ROW_STATE + " = ?"; try (final Cursor cursor = mDatabase.query( fromClosure, Loading @@ -626,7 +627,7 @@ class MtpDatabase { "parent." + Document.COLUMN_DOCUMENT_ID, "parent." + COLUMN_DOCUMENT_TYPE), whereClosure, strings(deviceId, ROW_STATE_VALID, ROW_STATE_INVALIDATED, strings(deviceId, ROW_STATE_VALID, ROW_STATE_INVALIDATED, DOCUMENT_TYPE_DEVICE, ROW_STATE_DISCONNECTED), null, null, Loading Loading
packages/MtpDocumentsProvider/Android.mk +5 −0 Original line number Diff line number Diff line Loading @@ -9,5 +9,10 @@ LOCAL_PRIVILEGED_MODULE := true LOCAL_JNI_SHARED_LIBRARIES := libappfuse_jni LOCAL_PROGUARD_FLAG_FILES := proguard.flags # Only enable asserts on userdebug/eng builds ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) LOCAL_JACK_FLAGS += -D jack.assert.policy=enable endif include $(BUILD_PACKAGE) include $(call all-makefiles-under, $(LOCAL_PATH))
packages/MtpDocumentsProvider/src/com/android/mtp/DocumentLoader.java +4 −2 Original line number Diff line number Diff line Loading @@ -69,7 +69,8 @@ class DocumentLoader implements AutoCloseable { */ synchronized Cursor queryChildDocuments(String[] columnNames, Identifier parent) throws IOException { Preconditions.checkArgument(parent.mDeviceId == mDevice.deviceId); assert parent.mDeviceId == mDevice.deviceId; LoaderTask task = mTaskList.findTask(parent); if (task == null) { if (parent.mDocumentId == null) { Loading Loading @@ -256,7 +257,8 @@ class DocumentLoader implements AutoCloseable { LoaderTask(MtpManager manager, MtpDatabase database, int[] operationsSupported, Identifier identifier) { Preconditions.checkNotNull(operationsSupported); assert operationsSupported != null; assert identifier.mDocumentType != MtpDatabaseConstants.DOCUMENT_TYPE_DEVICE; mManager = manager; mDatabase = database; mOperationsSupported = operationsSupported; Loading
packages/MtpDocumentsProvider/src/com/android/mtp/MtpDatabase.java +2 −1 Original line number Diff line number Diff line Loading @@ -617,6 +617,7 @@ class MtpDatabase { final String whereClosure = "parent." + COLUMN_DEVICE_ID + " = ? AND " + "parent." + COLUMN_ROW_STATE + " IN (?, ?) AND " + "parent." + COLUMN_DOCUMENT_TYPE + " != ? AND " + "child." + COLUMN_ROW_STATE + " = ?"; try (final Cursor cursor = mDatabase.query( fromClosure, Loading @@ -626,7 +627,7 @@ class MtpDatabase { "parent." + Document.COLUMN_DOCUMENT_ID, "parent." + COLUMN_DOCUMENT_TYPE), whereClosure, strings(deviceId, ROW_STATE_VALID, ROW_STATE_INVALIDATED, strings(deviceId, ROW_STATE_VALID, ROW_STATE_INVALIDATED, DOCUMENT_TYPE_DEVICE, ROW_STATE_DISCONNECTED), null, null, Loading