diff options
author | 2020-03-17 23:11:06 +0000 | |
---|---|---|
committer | 2020-03-17 23:11:06 +0000 | |
commit | bfadf609caa642212df8b59b72a1a1b48b810eba (patch) | |
tree | ca258fcee93531b165d1ac2aa9a4f47264bf21be | |
parent | ae0b3612eb3b80408f860a11358b28d69c5598f4 (diff) | |
parent | a12867bd195fee7a9331e65c5dacca4037869288 (diff) |
Merge "Tests incompatible with Q because MimeMap was recently added." into rvc-dev
-rw-r--r-- | tests/common/com/android/documentsui/testing/TestModel.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/common/com/android/documentsui/testing/TestModel.java b/tests/common/com/android/documentsui/testing/TestModel.java index b1fada438..5a0ff89d3 100644 --- a/tests/common/com/android/documentsui/testing/TestModel.java +++ b/tests/common/com/android/documentsui/testing/TestModel.java @@ -20,6 +20,7 @@ import android.database.MatrixCursor; import android.os.Bundle; import android.provider.DocumentsContract; import android.provider.DocumentsContract.Document; +import android.webkit.MimeTypeMap; import com.android.documentsui.DirectoryResult; import com.android.documentsui.Model; @@ -28,8 +29,6 @@ import com.android.documentsui.base.Features; import com.android.documentsui.base.UserId; import com.android.documentsui.roots.RootCursorWrapper; -import libcore.content.type.MimeMap; - import java.util.Random; public class TestModel extends Model { @@ -141,7 +140,7 @@ public class TestModel extends Model { while(i != -1) { name = name.substring(i + 1); - String type = MimeMap.getDefault().guessMimeTypeFromExtension(name); + String type = MimeTypeMap.getSingleton().getMimeTypeFromExtension(name); if (type != null) { return type; } |