git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
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
<manifest ...> | |
... | |
<!-- Make sure your app (or individual activity) uses the | |
theme with the custom attribute defined. --> | |
<application android:theme="@style/AppTheme" ...> | |
... | |
</application> | |
</manifest> |
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
package org.mym.prettylog.wrapper; | |
import android.content.Context; | |
import org.mym.plog.PLog; | |
import org.mym.plog.config.EasyLogController; | |
import org.mym.plog.config.PLogConfig; | |
/** | |
* <p> |
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
public static boolean isMiUi() { | |
return !TextUtils.isEmpty(getSystemProperty("ro.miui.ui.version.name")); | |
} | |
public static String getSystemProperty(String propName) { | |
String line; | |
BufferedReader input = null; | |
try { | |
java.lang.Process p = Runtime.getRuntime().exec("getprop " + propName); | |
input = new BufferedReader(new InputStreamReader(p.getInputStream()), 1024); |
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
private static boolean isFastMobileNetwork(Context context) { | |
TelephonyManager telephonyManager = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE); | |
switch (telephonyManager.getNetworkType()) { | |
case TelephonyManager.NETWORK_TYPE_1xRTT: | |
return false; // ~ 50-100 kbps | |
case TelephonyManager.NETWORK_TYPE_CDMA: | |
return false; // ~ 14-64 kbps | |
case TelephonyManager.NETWORK_TYPE_EDGE: | |
return false; // ~ 50-100 kbps | |
case TelephonyManager.NETWORK_TYPE_EVDO_0: |