1.5.0610
bugfixes:优化蓝牙开关,增加u1302平台,准备迁移到高版本AndroidStudio
This commit is contained in:
@@ -156,6 +156,7 @@ public class JgyUtils {
|
||||
public static final int G11JPlatform = 21;
|
||||
public static final int P50Platform = 23;
|
||||
public static final int seewoPlatform = 25;
|
||||
public static final int U1302Platform = 26;
|
||||
|
||||
|
||||
public static final String Other = "其他";
|
||||
@@ -178,6 +179,7 @@ public class JgyUtils {
|
||||
public static final String G11JTag = "aud8786";
|
||||
public static final String P50Tag = "P50TD";
|
||||
public static final String seewoTag = "seewo";
|
||||
public static final String allwinner_U1302 = "QZA15";
|
||||
|
||||
|
||||
private CacheHelper cacheHelper;
|
||||
@@ -320,6 +322,9 @@ public class JgyUtils {
|
||||
} else if (seewoTag.equalsIgnoreCase(platform)) {
|
||||
Log.i(TAG, "checkAppPlatform: " + "seewo");
|
||||
return seewoPlatform;
|
||||
} else if (allwinner_U1302.equalsIgnoreCase(platform)) {
|
||||
Log.i(TAG, "checkAppPlatform: " + "U1302");
|
||||
return U1302Platform;
|
||||
} else {
|
||||
Log.i(TAG, "checkAppPlatform: " + "没有数据");
|
||||
return UnknowPlatform;
|
||||
@@ -380,6 +385,8 @@ public class JgyUtils {
|
||||
getAppPlatformCallback.AppPlatform(P50Platform);
|
||||
} else if (seewoTag.equalsIgnoreCase(platform)) {
|
||||
getAppPlatformCallback.AppPlatform(seewoPlatform);
|
||||
} else if (allwinner_U1302.equalsIgnoreCase(platform)) {
|
||||
getAppPlatformCallback.AppPlatform(U1302Platform);
|
||||
} else {
|
||||
getAppPlatformCallback.AppPlatform(UnknowPlatform);
|
||||
}
|
||||
@@ -2042,21 +2049,24 @@ public class JgyUtils {
|
||||
* @param state 1打开 0关闭
|
||||
*/
|
||||
public void setDeveloperOptions(int state) {
|
||||
Log.e(TAG, "getDeveloper: state = " + state);
|
||||
|
||||
int oldStatu = Settings.System.getInt(crv, CommonConfig.AOLE_ACTION_DEVELOPER_OPTIONS, 0);
|
||||
if (oldStatu == state) {
|
||||
Log.e(TAG, "setDeveloperOptions: oldStatu = " + oldStatu + " no changed");
|
||||
}
|
||||
Log.e(TAG, "getDeveloper: state = " + state);
|
||||
//这个需要反着来
|
||||
Settings.System.putInt(crv, CommonConfig.AOLE_ACTION_DEVELOPER_OPTIONS, state);
|
||||
|
||||
Log.e(TAG, "setDeveloperOptions: DEVELOPMENT_SETTINGS_ENABLED = " + Settings.Global.getInt(crv, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0));
|
||||
Log.e(TAG, "setDeveloperOptions: ADB_ENABLED = " + Settings.Global.getInt(crv, Settings.Global.ADB_ENABLED, 0));
|
||||
|
||||
if (Settings.Global.getInt(crv, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0) != state) {
|
||||
Settings.Global.putInt(crv, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, state);
|
||||
}
|
||||
if (Settings.Global.getInt(crv, Settings.Global.ADB_ENABLED, 0) != state) {
|
||||
Settings.Global.putInt(crv, Settings.Global.ADB_ENABLED, state);
|
||||
if (!BuildConfig.DEBUG) {
|
||||
if (Settings.Global.getInt(crv, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0) != state) {
|
||||
Settings.Global.putInt(crv, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, state);
|
||||
}
|
||||
if (Settings.Global.getInt(crv, Settings.Global.ADB_ENABLED, 0) != state) {
|
||||
Settings.Global.putInt(crv, Settings.Global.ADB_ENABLED, state);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user