1.4.0202 增加易学派平台
This commit is contained in:
@@ -29,8 +29,8 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.aoleyun.sn"
|
applicationId "com.aoleyun.sn"
|
||||||
versionCode 105
|
versionCode 107
|
||||||
versionName "1.4.0117"
|
versionName "1.4.0202"
|
||||||
|
|
||||||
//There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature.
|
//There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature.
|
||||||
minSdkVersion 24
|
minSdkVersion 24
|
||||||
@@ -183,6 +183,20 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
YXPD1Debug.initWith(debug)
|
||||||
|
YXPD1Debug {
|
||||||
|
versionNameSuffix "-debug"
|
||||||
|
debuggable true
|
||||||
|
signingConfig signingConfigs.G10P
|
||||||
|
buildConfigField "String", "platform", '"YXPD1"'
|
||||||
|
}
|
||||||
|
|
||||||
|
YXPD1Release.initWith(release)
|
||||||
|
YXPD1Release {
|
||||||
|
signingConfig signingConfigs.G10P
|
||||||
|
buildConfigField "String", "platform", '"YXPD1"'
|
||||||
|
}
|
||||||
|
|
||||||
c2Debug.initWith(debug)
|
c2Debug.initWith(debug)
|
||||||
c2Debug {
|
c2Debug {
|
||||||
versionNameSuffix "-debug"
|
versionNameSuffix "-debug"
|
||||||
|
|||||||
@@ -67,10 +67,18 @@ public class SplashActivity extends AppCompatActivity {
|
|||||||
new Handler().postDelayed(() -> {
|
new Handler().postDelayed(() -> {
|
||||||
startActivity(new Intent(SplashActivity.this, MainActivity.class));
|
startActivity(new Intent(SplashActivity.this, MainActivity.class));
|
||||||
finish();
|
finish();
|
||||||
|
// sendBroadcastStatus("0");
|
||||||
// startActivity(new Intent(SplashActivity.this, CheckNetActivity.class));
|
// startActivity(new Intent(SplashActivity.this, CheckNetActivity.class));
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void sendBroadcastStatus(String status) {
|
||||||
|
Intent intent = new Intent("receiver");
|
||||||
|
intent.setPackage("com.aoleyunos.dop7");
|
||||||
|
intent.putExtra("login_status", status);
|
||||||
|
sendBroadcast(intent);
|
||||||
|
}
|
||||||
|
|
||||||
private void setBar() {
|
private void setBar() {
|
||||||
UltimateBarX.statusBar(this)
|
UltimateBarX.statusBar(this)
|
||||||
.transparent()
|
.transparent()
|
||||||
@@ -145,11 +153,11 @@ public class SplashActivity extends AppCompatActivity {
|
|||||||
Log.i(TAG, "DebugTest: aole_hide_NavigationBar: " + Settings.System.getString(getContentResolver(), CommonConfig.AOLE_ACTION_HIDE_NAVIGATION_BAR));
|
Log.i(TAG, "DebugTest: aole_hide_NavigationBar: " + Settings.System.getString(getContentResolver(), CommonConfig.AOLE_ACTION_HIDE_NAVIGATION_BAR));
|
||||||
String only_jgy_shortcut_list = Settings.System.getString(getContentResolver(), JGYActions.ACTION_JGY_SHORTCUTLIST);
|
String only_jgy_shortcut_list = Settings.System.getString(getContentResolver(), JGYActions.ACTION_JGY_SHORTCUTLIST);
|
||||||
Log.i(TAG, "debugTest: only_jgy_shortcut_list:" + only_jgy_shortcut_list);
|
Log.i(TAG, "debugTest: only_jgy_shortcut_list:" + only_jgy_shortcut_list);
|
||||||
String aole_app_forbid = Settings.System.getString(getContentResolver(), CommonConfig.AOLE_ACTION_APP_FORBID);
|
// String aole_app_forbid = Settings.System.getString(getContentResolver(), CommonConfig.AOLE_ACTION_APP_FORBID);
|
||||||
if (!TextUtils.isEmpty(aole_app_forbid)) {
|
// if (!TextUtils.isEmpty(aole_app_forbid)) {
|
||||||
Settings.System.putString(getContentResolver(), CommonConfig.AOLE_ACTION_APP_FORBID, aole_app_forbid + ",com.aoleyun.browser");
|
// Settings.System.putString(getContentResolver(), CommonConfig.AOLE_ACTION_APP_FORBID, aole_app_forbid + ",com.aoleyun.browser");
|
||||||
}
|
// }
|
||||||
Log.e(TAG, "debugTest: aole_app_forbid:" + aole_app_forbid);
|
// Log.e(TAG, "debugTest: aole_app_forbid:" + aole_app_forbid);
|
||||||
Log.i(TAG, "debugTest: ip = " + JGYUtils.getInstance().getIPAddress());
|
Log.i(TAG, "debugTest: ip = " + JGYUtils.getInstance().getIPAddress());
|
||||||
Log.i(TAG, "debugTest: getPackage = " + Utils.getPackage());
|
Log.i(TAG, "debugTest: getPackage = " + Utils.getPackage());
|
||||||
Log.i(TAG, "debugTest: getMacAddress = " + Utils.getAndroid10MAC(this));
|
Log.i(TAG, "debugTest: getMacAddress = " + Utils.getAndroid10MAC(this));
|
||||||
|
|||||||
@@ -1277,7 +1277,7 @@ public class NetInterfaceManager {
|
|||||||
JGYUtils.getInstance().installDesktop(data);
|
JGYUtils.getInstance().installDesktop(data);
|
||||||
setDefaultDesktop(desktopInfo.getApp_package());
|
setDefaultDesktop(desktopInfo.getApp_package());
|
||||||
} else {
|
} else {
|
||||||
Log.e("getDefaultDesktop", "onNext: " + "删除定制桌面");
|
Log.e("getDefaultDesktop", "onNext: " + "删除定制桌面");
|
||||||
cacheHelper.put(UrlAddress.GET_DESKTOP, "");
|
cacheHelper.put(UrlAddress.GET_DESKTOP, "");
|
||||||
// String whiteList = Settings.System.getString(mContext.getContentResolver(), JGYActions.ACTION_JGY_SHORTCUTLIST);
|
// String whiteList = Settings.System.getString(mContext.getContentResolver(), JGYActions.ACTION_JGY_SHORTCUTLIST);
|
||||||
for (String s : ApkUtils.desktopAPP) {
|
for (String s : ApkUtils.desktopAPP) {
|
||||||
@@ -2219,7 +2219,10 @@ public class NetInterfaceManager {
|
|||||||
// Log.e( "getLockedState", "onNext: " + "state changed , reset devices");
|
// Log.e( "getLockedState", "onNext: " + "state changed , reset devices");
|
||||||
// Utils.doMasterClear(mContext);
|
// Utils.doMasterClear(mContext);
|
||||||
// }
|
// }
|
||||||
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.TeclastP20sPlatform) {
|
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.TeclastP20sPlatform
|
||||||
|
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.C2Platform
|
||||||
|
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.YXPD1Platform
|
||||||
|
) {
|
||||||
JGYUtils.getInstance().showApp(PackageNames.YIXUEPAI_DESKTOP);
|
JGYUtils.getInstance().showApp(PackageNames.YIXUEPAI_DESKTOP);
|
||||||
JGYUtils.getInstance().setYxpDefaultDesktop();
|
JGYUtils.getInstance().setYxpDefaultDesktop();
|
||||||
}
|
}
|
||||||
@@ -2228,7 +2231,10 @@ public class NetInterfaceManager {
|
|||||||
} else if (locked == JGYActions.NET_CODE_UNLOCKED) {
|
} else if (locked == JGYActions.NET_CODE_UNLOCKED) {
|
||||||
// SysSettingUtils.setEnableSetting(mContext);
|
// SysSettingUtils.setEnableSetting(mContext);
|
||||||
JGYUtils.getInstance().writeAppPackageList();
|
JGYUtils.getInstance().writeAppPackageList();
|
||||||
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.TeclastP20sPlatform) {
|
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.TeclastP20sPlatform
|
||||||
|
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.C2Platform
|
||||||
|
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.YXPD1Platform
|
||||||
|
) {
|
||||||
JGYUtils.getInstance().hideApp(PackageNames.YIXUEPAI_DESKTOP);
|
JGYUtils.getInstance().hideApp(PackageNames.YIXUEPAI_DESKTOP);
|
||||||
JGYUtils.getInstance().setDefaultDesktop();
|
JGYUtils.getInstance().setDefaultDesktop();
|
||||||
StatusBarManager mStatusBarManager = (StatusBarManager) mContext.getSystemService(Context.STATUS_BAR_SERVICE);
|
StatusBarManager mStatusBarManager = (StatusBarManager) mContext.getSystemService(Context.STATUS_BAR_SERVICE);
|
||||||
@@ -2236,7 +2242,9 @@ public class NetInterfaceManager {
|
|||||||
}
|
}
|
||||||
Settings.System.putInt(mContext.getContentResolver(), JGYActions.ACTION_QCH_UNLOCK_IPAD, JGYActions.FRAME_CODE_UNLOCKED);
|
Settings.System.putInt(mContext.getContentResolver(), JGYActions.ACTION_QCH_UNLOCK_IPAD, JGYActions.FRAME_CODE_UNLOCKED);
|
||||||
Settings.System.putInt(mContext.getContentResolver(), CommonConfig.AOLE_APP_ALLOW_INSTALL, 1);
|
Settings.System.putInt(mContext.getContentResolver(), CommonConfig.AOLE_APP_ALLOW_INSTALL, 1);
|
||||||
|
Settings.System.putString(mContext.getContentResolver(), CommonConfig.AOLE_ACTION_APP_FORBID, "");
|
||||||
|
JGYUtils.getInstance().addAppInstallWhiteList(new ArrayList<>());
|
||||||
|
JGYUtils.getInstance().setAppRestriction(0);
|
||||||
}
|
}
|
||||||
} else if (response.code == NOTFOUND) {
|
} else if (response.code == NOTFOUND) {
|
||||||
Settings.System.putInt(mContext.getContentResolver(), JGYActions.ACTION_QCH_UNLOCK_IPAD, JGYActions.FRAME_CODE_LOCKED);
|
Settings.System.putInt(mContext.getContentResolver(), JGYActions.ACTION_QCH_UNLOCK_IPAD, JGYActions.FRAME_CODE_LOCKED);
|
||||||
@@ -2448,6 +2456,8 @@ public class NetInterfaceManager {
|
|||||||
tagSets.add(JGYUtils.G10PTag);
|
tagSets.add(JGYUtils.G10PTag);
|
||||||
} else if (platform == JGYUtils.C2Platform) {
|
} else if (platform == JGYUtils.C2Platform) {
|
||||||
tagSets.add(JGYUtils.C2Tag);
|
tagSets.add(JGYUtils.C2Tag);
|
||||||
|
} else if (platform == JGYUtils.YXPD1Platform) {
|
||||||
|
tagSets.add(JGYUtils.YXPD1TAG);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Log.e(TAG, "clearAndAppendTags: " + tagSets);
|
Log.e(TAG, "clearAndAppendTags: " + tagSets);
|
||||||
@@ -3162,7 +3172,7 @@ public class NetInterfaceManager {
|
|||||||
cacheHelper.put(UrlAddress.SET_WHITE_PACKAGE_LIST, GsonUtils.toJSONString(strings));
|
cacheHelper.put(UrlAddress.SET_WHITE_PACKAGE_LIST, GsonUtils.toJSONString(strings));
|
||||||
//开机图标 只记录后台传的包名
|
//开机图标 只记录后台传的包名
|
||||||
Log.e(TAG, "onNext: only_jgy_shortcut_list: " + Settings.System.putString(mContext.getContentResolver(), JGYActions.ACTION_JGY_SHORTCUTLIST, pkgString));
|
Log.e(TAG, "onNext: only_jgy_shortcut_list: " + Settings.System.putString(mContext.getContentResolver(), JGYActions.ACTION_JGY_SHORTCUTLIST, pkgString));
|
||||||
JGYUtils.getInstance().writeAppPackageList(mContext, pkgString);
|
JGYUtils.getInstance().writeAppPackageList(pkgString);
|
||||||
JGYUtils.getInstance().deleteOtherApp();
|
JGYUtils.getInstance().deleteOtherApp();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3198,7 +3208,7 @@ public class NetInterfaceManager {
|
|||||||
String result = appLimit.getResult();
|
String result = appLimit.getResult();
|
||||||
//开机图标 只记录后台传的包名
|
//开机图标 只记录后台传的包名
|
||||||
Log.e(TAG, "onNext: only_jgy_shortcut_list: " + Settings.System.putString(mContext.getContentResolver(), JGYActions.ACTION_JGY_SHORTCUTLIST, result));
|
Log.e(TAG, "onNext: only_jgy_shortcut_list: " + Settings.System.putString(mContext.getContentResolver(), JGYActions.ACTION_JGY_SHORTCUTLIST, result));
|
||||||
JGYUtils.getInstance().writeAppPackageList(mContext, result);
|
JGYUtils.getInstance().writeAppPackageList(result);
|
||||||
JGYUtils.getInstance().deleteOtherApp();
|
JGYUtils.getInstance().deleteOtherApp();
|
||||||
} else {
|
} else {
|
||||||
Settings.System.putString(mContext.getContentResolver(), JGYActions.ACTION_JGY_SHORTCUTLIST, "");
|
Settings.System.putString(mContext.getContentResolver(), JGYActions.ACTION_JGY_SHORTCUTLIST, "");
|
||||||
@@ -3507,7 +3517,7 @@ public class NetInterfaceManager {
|
|||||||
} else {
|
} else {
|
||||||
if ("YX-T01".equalsIgnoreCase(Build.MODEL)) {
|
if ("YX-T01".equalsIgnoreCase(Build.MODEL)) {
|
||||||
JGYUtils.getInstance().setTongyiAppTop();
|
JGYUtils.getInstance().setTongyiAppTop();
|
||||||
}else {
|
} else {
|
||||||
cacheHelper.put(UrlAddress.GET_TOP_APP_CONTROL, "");
|
cacheHelper.put(UrlAddress.GET_TOP_APP_CONTROL, "");
|
||||||
ForegroundAppUtil.setTopAppClass(mContext, "");
|
ForegroundAppUtil.setTopAppClass(mContext, "");
|
||||||
Settings.Global.putString(mContext.getContentResolver(), ForegroundAppUtil.TOPAPP_KEY, "");
|
Settings.Global.putString(mContext.getContentResolver(), ForegroundAppUtil.TOPAPP_KEY, "");
|
||||||
|
|||||||
@@ -413,7 +413,7 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
|||||||
// }
|
// }
|
||||||
// }, UserHandle.ALL);
|
// }, UserHandle.ALL);
|
||||||
//根据要求卸载这两个应用
|
//根据要求卸载这两个应用
|
||||||
if (!JGYUtils.getInstance().getDeviceIsLocked()) {
|
if (JGYUtils.getInstance().getDeviceIsLocked()) {
|
||||||
ApkUtils.UninstallAPP(this, "com.joytv.live");
|
ApkUtils.UninstallAPP(this, "com.joytv.live");
|
||||||
ApkUtils.UninstallAPP(this, "com.tencent.android.qqdownloader");
|
ApkUtils.UninstallAPP(this, "com.tencent.android.qqdownloader");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -791,6 +791,7 @@ public class ApkUtils {
|
|||||||
this.add("com.gl.dwlauncher");
|
this.add("com.gl.dwlauncher");
|
||||||
this.add("com.qunyu.dividedroad");
|
this.add("com.qunyu.dividedroad");
|
||||||
this.add("com.ygyb.yischool");
|
this.add("com.ygyb.yischool");
|
||||||
|
this.add("com.yxxmk.uiui");
|
||||||
this.add("com.uiui.floatwindow");
|
this.add("com.uiui.floatwindow");
|
||||||
this.add("com.uiuipad.find");
|
this.add("com.uiuipad.find");
|
||||||
this.add("com.uiuipad.appstore");
|
this.add("com.uiuipad.appstore");
|
||||||
|
|||||||
@@ -133,6 +133,7 @@ public class JGYUtils {
|
|||||||
public static final int HRAD13Platform = 11;
|
public static final int HRAD13Platform = 11;
|
||||||
public static final int G10PPlatform = 12;
|
public static final int G10PPlatform = 12;
|
||||||
public static final int C2Platform = 13;
|
public static final int C2Platform = 13;
|
||||||
|
public static final int YXPD1Platform = 15;
|
||||||
|
|
||||||
|
|
||||||
public static final String Other = "其他";
|
public static final String Other = "其他";
|
||||||
@@ -146,6 +147,7 @@ public class JGYUtils {
|
|||||||
public static final String HRAD13Tag = "HRAD13";
|
public static final String HRAD13Tag = "HRAD13";
|
||||||
public static final String G10PTag = "G10P";
|
public static final String G10PTag = "G10P";
|
||||||
public static final String C2Tag = "MTK8183";
|
public static final String C2Tag = "MTK8183";
|
||||||
|
public static final String YXPD1TAG = "YXPD1";
|
||||||
|
|
||||||
|
|
||||||
private CacheHelper cacheHelper;
|
private CacheHelper cacheHelper;
|
||||||
@@ -261,6 +263,9 @@ public class JGYUtils {
|
|||||||
} else if (C2Tag.equalsIgnoreCase(platform)) {
|
} else if (C2Tag.equalsIgnoreCase(platform)) {
|
||||||
Log.i(TAG, "checkAppPlatform: " + "C2");
|
Log.i(TAG, "checkAppPlatform: " + "C2");
|
||||||
return C2Platform;
|
return C2Platform;
|
||||||
|
} else if (YXPD1TAG.equalsIgnoreCase(platform)) {
|
||||||
|
Log.i(TAG, "checkAppPlatform: " + "YXPD1");
|
||||||
|
return YXPD1Platform;
|
||||||
} else {
|
} else {
|
||||||
Log.i(TAG, "checkAppPlatform: " + "没有数据");
|
Log.i(TAG, "checkAppPlatform: " + "没有数据");
|
||||||
return UnknowPlatform;
|
return UnknowPlatform;
|
||||||
@@ -303,6 +308,8 @@ public class JGYUtils {
|
|||||||
getAppPlatformCallback.AppPlatform(G10PPlatform);
|
getAppPlatformCallback.AppPlatform(G10PPlatform);
|
||||||
} else if (C2Tag.equalsIgnoreCase(platform)) {
|
} else if (C2Tag.equalsIgnoreCase(platform)) {
|
||||||
getAppPlatformCallback.AppPlatform(C2Platform);
|
getAppPlatformCallback.AppPlatform(C2Platform);
|
||||||
|
} else if (YXPD1TAG.equalsIgnoreCase(platform)) {
|
||||||
|
getAppPlatformCallback.AppPlatform(YXPD1Platform);
|
||||||
} else {
|
} else {
|
||||||
getAppPlatformCallback.AppPlatform(UnknowPlatform);
|
getAppPlatformCallback.AppPlatform(UnknowPlatform);
|
||||||
}
|
}
|
||||||
@@ -1209,8 +1216,13 @@ public class JGYUtils {
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
public void writeAppPackageList(Context context, String packageList) {
|
public void writeAppPackageList(String packageList) {
|
||||||
ApkUtils.addShortcut(context);
|
if (isUnlocked(mContext)) {
|
||||||
|
addAppInstallWhiteList(new ArrayList<>());
|
||||||
|
setAppRestriction(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ApkUtils.addShortcut(mContext);
|
||||||
HashSet<String> pkgSet = new HashSet<>(Arrays.asList(packageList.split(",")));
|
HashSet<String> pkgSet = new HashSet<>(Arrays.asList(packageList.split(",")));
|
||||||
pkgSet.addAll(defaultPackages);
|
pkgSet.addAll(defaultPackages);
|
||||||
pkgSet.addAll(ApkUtils.desktopAPP);
|
pkgSet.addAll(ApkUtils.desktopAPP);
|
||||||
@@ -1230,6 +1242,11 @@ public class JGYUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void writeAppPackageList() {
|
public void writeAppPackageList() {
|
||||||
|
if (isUnlocked(mContext)) {
|
||||||
|
addAppInstallWhiteList(new ArrayList<>());
|
||||||
|
setAppRestriction(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
HashSet<String> pkgSet = new HashSet<>(defaultPackages);
|
HashSet<String> pkgSet = new HashSet<>(defaultPackages);
|
||||||
pkgSet.addAll(ApkUtils.desktopAPP);
|
pkgSet.addAll(ApkUtils.desktopAPP);
|
||||||
pkgSet.addAll(ApkUtils.aoleyunAPP);
|
pkgSet.addAll(ApkUtils.aoleyunAPP);
|
||||||
@@ -1453,8 +1470,8 @@ public class JGYUtils {
|
|||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int locked = Settings.System.getInt(crv, JGYActions.ACTION_QCH_UNLOCK_IPAD, 0);
|
|
||||||
if (locked == 1) {
|
if (isUnlocked(mContext)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int aihuaUnlock = Settings.System.getInt(mContext.getContentResolver(), CommonConfig.AIHUA_UNLOCK, 0);
|
int aihuaUnlock = Settings.System.getInt(mContext.getContentResolver(), CommonConfig.AIHUA_UNLOCK, 0);
|
||||||
@@ -1569,6 +1586,7 @@ public class JGYUtils {
|
|||||||
*/
|
*/
|
||||||
public void hideSystemAPP() {
|
public void hideSystemAPP() {
|
||||||
PackageManager pm = mContext.getPackageManager();
|
PackageManager pm = mContext.getPackageManager();
|
||||||
|
pm.setApplicationEnabledSetting("com.yxxmk.uiui", PackageManager.COMPONENT_ENABLED_STATE_DEFAULT, 0);
|
||||||
Intent filterIntent = new Intent(Intent.ACTION_MAIN, null);
|
Intent filterIntent = new Intent(Intent.ACTION_MAIN, null);
|
||||||
//Intent.CATEGORY_LAUNCHER主要的过滤条件
|
//Intent.CATEGORY_LAUNCHER主要的过滤条件
|
||||||
filterIntent.addCategory(Intent.CATEGORY_LAUNCHER);
|
filterIntent.addCategory(Intent.CATEGORY_LAUNCHER);
|
||||||
@@ -1583,6 +1601,7 @@ public class JGYUtils {
|
|||||||
}
|
}
|
||||||
if (!showAppList.contains(pkg)
|
if (!showAppList.contains(pkg)
|
||||||
&& !ApkUtils.aoleyunAPP.contains(pkg)
|
&& !ApkUtils.aoleyunAPP.contains(pkg)
|
||||||
|
&& !ApkUtils.desktopAPP.contains(pkg)
|
||||||
&& !ApkUtils.aihuaApp.contains(pkg)
|
&& !ApkUtils.aihuaApp.contains(pkg)
|
||||||
) {
|
) {
|
||||||
pm.setApplicationEnabledSetting(pkg, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, 0);
|
pm.setApplicationEnabledSetting(pkg, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, 0);
|
||||||
@@ -1752,6 +1771,7 @@ public class JGYUtils {
|
|||||||
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.HRAD13Platform
|
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.HRAD13Platform
|
||||||
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.G10PPlatform
|
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.G10PPlatform
|
||||||
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.C2Platform
|
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.C2Platform
|
||||||
|
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.YXPD1Platform
|
||||||
) {
|
) {
|
||||||
Settings.Global.putInt(crv, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, state == 1 ? 0 : 1);
|
Settings.Global.putInt(crv, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, state == 1 ? 0 : 1);
|
||||||
Settings.Global.putInt(crv, Settings.Global.ADB_ENABLED, state == 1 ? 0 : 1);
|
Settings.Global.putInt(crv, Settings.Global.ADB_ENABLED, state == 1 ? 0 : 1);
|
||||||
@@ -2823,6 +2843,11 @@ public class JGYUtils {
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
|
|
||||||
|
public static boolean isUnlocked(Context context) {
|
||||||
|
int locked = Settings.System.getInt(context.getContentResolver(), JGYActions.ACTION_QCH_UNLOCK_IPAD, JGYActions.FRAME_CODE_LOCKED);
|
||||||
|
return locked == JGYActions.FRAME_CODE_UNLOCKED;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启用/禁用MTP数据传输功能
|
* 启用/禁用MTP数据传输功能
|
||||||
*
|
*
|
||||||
@@ -2895,7 +2920,7 @@ public class JGYUtils {
|
|||||||
*
|
*
|
||||||
* @param pattern 0:普通模式(黑白名单都不生效),1:黑名单模式,2:白名单模式
|
* @param pattern 0:普通模式(黑白名单都不生效),1:黑名单模式,2:白名单模式
|
||||||
**/
|
**/
|
||||||
void setAppRestriction(int pattern) {
|
public void setAppRestriction(int pattern) {
|
||||||
if (C2Tag.equals(BuildConfig.platform)) {
|
if (C2Tag.equals(BuildConfig.platform)) {
|
||||||
Log.e("ITools", "setAppRestriction: " + pattern);
|
Log.e("ITools", "setAppRestriction: " + pattern);
|
||||||
try {
|
try {
|
||||||
@@ -2924,7 +2949,7 @@ public class JGYUtils {
|
|||||||
*
|
*
|
||||||
* @param packageNameList 包名列表
|
* @param packageNameList 包名列表
|
||||||
**/
|
**/
|
||||||
void addAppInstallWhiteList(List<String> packageNameList) {
|
public void addAppInstallWhiteList(List<String> packageNameList) {
|
||||||
if (C2Tag.equals(BuildConfig.platform)) {
|
if (C2Tag.equals(BuildConfig.platform)) {
|
||||||
Log.e("ITools", "addAppInstallWhiteList: " + packageNameList);
|
Log.e("ITools", "addAppInstallWhiteList: " + packageNameList);
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -1772,6 +1772,7 @@ public class Utils {
|
|||||||
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.HRAD13Platform
|
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.HRAD13Platform
|
||||||
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.G10PPlatform
|
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.G10PPlatform
|
||||||
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.C2Platform
|
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.C2Platform
|
||||||
|
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.YXPD1Platform
|
||||||
) {
|
) {
|
||||||
return Utils.getProperty("ro.build.display.id", "获取失败");
|
return Utils.getProperty("ro.build.display.id", "获取失败");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
12
build.gradle
12
build.gradle
@@ -5,9 +5,9 @@ buildscript {
|
|||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven { url "https://jitpack.io" }
|
maven { url "https://jitpack.io" }
|
||||||
maven {url 'http://developer.huawei.com/repo/'}
|
maven { url 'https://developer.huawei.com/repo/' }
|
||||||
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
|
maven { url 'https://maven.aliyun.com/repository/central/' }
|
||||||
maven { url 'http://maven.aliyun.com/nexus/content/repositories/releases/' }
|
maven { url 'https://maven.aliyun.com/repository/public/' }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.6.4'
|
classpath 'com.android.tools.build:gradle:3.6.4'
|
||||||
@@ -22,9 +22,9 @@ allprojects {
|
|||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven { url "https://jitpack.io" }
|
maven { url "https://jitpack.io" }
|
||||||
maven {url 'http://developer.huawei.com/repo/'}
|
maven { url 'https://developer.huawei.com/repo/' }
|
||||||
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
|
maven { url 'https://maven.aliyun.com/repository/central/' }
|
||||||
maven { url 'http://maven.aliyun.com/nexus/content/repositories/releases/' }
|
maven { url 'https://maven.aliyun.com/repository/public/' }
|
||||||
}
|
}
|
||||||
gradle.projectsEvaluated {
|
gradle.projectsEvaluated {
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
|
|||||||
Reference in New Issue
Block a user