-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Slider变更为RxAnneSeekbar 目前RxSeekbar圆角矩形指示器显示正常 但圆形指示器显示错乱正在修复中 此次提交避免代码丢失所以不会有版本库指向改测试版本
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
killetomRxMateria/src/main/java/cn/ypz/com/killetomrxmateria/rxwidget/seekbar/AnneUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package cn.ypz.com.killetomrxmateria.rxwidget.seekbar; | ||
|
||
import android.os.Environment; | ||
|
||
import java.io.File; | ||
import java.io.FileInputStream; | ||
import java.io.IOException; | ||
import java.util.Properties; | ||
|
||
class AnneUtils { | ||
|
||
private static final File BUILD_PROP_FILE = new File(Environment.getRootDirectory(), "build.prop"); | ||
private static Properties sBuildProperties; | ||
private static final Object sBuildPropertiesLock = new Object(); | ||
|
||
private static Properties getBuildProperties() { | ||
synchronized (sBuildPropertiesLock) { | ||
if (sBuildProperties == null) { | ||
sBuildProperties = new Properties(); | ||
FileInputStream fis = null; | ||
try { | ||
fis = new FileInputStream(BUILD_PROP_FILE); | ||
sBuildProperties.load(fis); | ||
} catch (IOException e) { | ||
e.printStackTrace(); | ||
} finally { | ||
if (fis != null) { | ||
try { | ||
fis.close(); | ||
} catch (IOException e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
return sBuildProperties; | ||
} | ||
|
||
static boolean isMIUI() { | ||
return getBuildProperties().containsKey("ro.miui.ui.version.name"); | ||
} | ||
|
||
} |