File tree Expand file tree Collapse file tree
src/main/java/com/androidx/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ android {
99 defaultConfig {
1010 minSdkVersion 19
1111 targetSdkVersion 30
12- versionCode 31
13- versionName " 1.3.1 "
12+ versionCode 32
13+ versionName " 1.3.2 "
1414 archivesBaseName = " androidx-$versionName "
1515
1616 testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
Original file line number Diff line number Diff line change 2121 */
2222
2323final class Uri2Path {
24+ static final String ASSET_PREFIX = "file:///android_asset/" ; //assets路径 file:///android_asset/PixelHot/01_Cryptoboyz/cryptoboyz_01.png
25+
2426 private Uri2Path () {
2527 }
2628
@@ -127,6 +129,9 @@ else if ("content".equalsIgnoreCase(uri.getScheme())) {
127129 }
128130 // File
129131 else if ("file" .equalsIgnoreCase (uri .getScheme ())) {
132+ if (uri .toString ().startsWith (ASSET_PREFIX )) {
133+ return uri .toString ();
134+ }
130135 return uri .getPath ();
131136 }
132137
You can’t perform that action at this time.
0 commit comments