version:4.7
fix: update:增加远程获取隐藏app列表,禁用app列表
This commit is contained in:
@@ -83,8 +83,8 @@ android {
|
|||||||
//酷比魔方
|
//酷比魔方
|
||||||
cube {
|
cube {
|
||||||
flavorDimensions "default"
|
flavorDimensions "default"
|
||||||
versionCode 38
|
versionCode 39
|
||||||
versionName "4.7"
|
versionName "4.8"
|
||||||
buildConfigField "String", "platform", '"ZhanRuiCube"'
|
buildConfigField "String", "platform", '"ZhanRuiCube"'
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
AMAP_KEY: "6e339305206eeb43f2b4cc1f31751f89"
|
AMAP_KEY: "6e339305206eeb43f2b4cc1f31751f89"
|
||||||
@@ -94,8 +94,8 @@ android {
|
|||||||
//MTK
|
//MTK
|
||||||
MTKnewly {
|
MTKnewly {
|
||||||
flavorDimensions "default"
|
flavorDimensions "default"
|
||||||
versionCode 15
|
versionCode 16
|
||||||
versionName "2.4"
|
versionName "2.5"
|
||||||
buildConfigField "String", "platform", '"MTK"'
|
buildConfigField "String", "platform", '"MTK"'
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
AMAP_KEY: "1af68e0a7edcaac82678b1cbb7643408"
|
AMAP_KEY: "1af68e0a7edcaac82678b1cbb7643408"
|
||||||
|
|||||||
@@ -12,4 +12,6 @@ interface SystemInfoInterface {
|
|||||||
double aDouble, String aString);
|
double aDouble, String aString);
|
||||||
|
|
||||||
String getSerial();
|
String getSerial();
|
||||||
|
List<String> getHideIcon();
|
||||||
|
List<String> getDisableIcon();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,10 +70,10 @@ public class BaseApplication extends MultiDexApplication {
|
|||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
context = this;
|
context = this;
|
||||||
if (SystemUtils.isMainProcessName(this, Process.myPid())) {
|
// if (SystemUtils.isMainProcessName(this, Process.myPid())) {
|
||||||
//非主进程不初始化
|
//非主进程不初始化
|
||||||
init();
|
init();
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
private void init() {
|
private void init() {
|
||||||
|
|||||||
@@ -120,11 +120,13 @@ public class CacheHelper {
|
|||||||
edit.commit();//write CLEAN
|
edit.commit();//write CLEAN
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
Log.e(TAG, "put: " + e.getMessage());
|
||||||
try {
|
try {
|
||||||
//s
|
//s
|
||||||
edit.abort();//write REMOVE
|
edit.abort();//write REMOVE
|
||||||
} catch (IOException e1) {
|
} catch (IOException e1) {
|
||||||
e1.printStackTrace();
|
e1.printStackTrace();
|
||||||
|
Log.e(TAG, "put: " + e1.getMessage());
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
@@ -133,6 +135,7 @@ public class CacheHelper {
|
|||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
Log.e(TAG, "put: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,11 @@ import android.os.RemoteException;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.aoleyun.sn.SystemInfoInterface;
|
import com.aoleyun.sn.SystemInfoInterface;
|
||||||
|
import com.aoleyun.sn.utils.JGYUtils;
|
||||||
import com.aoleyun.sn.utils.Utils;
|
import com.aoleyun.sn.utils.Utils;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class RemoteService extends Service {
|
public class RemoteService extends Service {
|
||||||
private String TAG = RemoteService.class.getSimpleName();
|
private String TAG = RemoteService.class.getSimpleName();
|
||||||
|
|
||||||
@@ -36,5 +39,17 @@ public class RemoteService extends Service {
|
|||||||
public String getSerial() throws RemoteException {
|
public String getSerial() throws RemoteException {
|
||||||
return Utils.getSerial();
|
return Utils.getSerial();
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
@Override
|
||||||
|
public List<String> getHideIcon() throws RemoteException {
|
||||||
|
return JGYUtils.getInstance().getHidePackage();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> getDisableIcon() throws RemoteException {
|
||||||
|
return JGYUtils.getInstance().getDisablePackage();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -944,7 +944,6 @@ public class ApkUtils {
|
|||||||
this.add("com.android.calculator2");
|
this.add("com.android.calculator2");
|
||||||
this.add("com.qi.TFSystem");
|
this.add("com.qi.TFSystem");
|
||||||
this.add("com.qi.appstore");
|
this.add("com.qi.appstore");
|
||||||
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
public static void showAllAPP(Context context) {
|
public static void showAllAPP(Context context) {
|
||||||
@@ -1187,7 +1186,7 @@ public class ApkUtils {
|
|||||||
}
|
}
|
||||||
//排除所有系统应用,不显示
|
//排除所有系统应用,不显示
|
||||||
if (isSystemApp(context, packageName)) {
|
if (isSystemApp(context, packageName)) {
|
||||||
if (!AoleyunOSApp.contains(packageName)) {
|
if (!AoleyunOSApp.contains(packageName) && !aihuaApp.contains(packageName)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1388,6 +1388,7 @@ public class JGYUtils {
|
|||||||
this.add("com.alibaba.android.rimet");
|
this.add("com.alibaba.android.rimet");
|
||||||
this.add("com.tencent.wemeet.app");
|
this.add("com.tencent.wemeet.app");
|
||||||
this.add("com.qi.studycomputer.launcher");
|
this.add("com.qi.studycomputer.launcher");
|
||||||
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2073,6 +2074,57 @@ public class JGYUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<String> getHidePackage() {
|
||||||
|
String jsonString = cacheHelper.getAsString(UrlAddress.GET_HIDE_DESKTOPICON);
|
||||||
|
//为 "" 是已经请求成功的
|
||||||
|
if (jsonString == null) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
} else {
|
||||||
|
Gson gson = new Gson();
|
||||||
|
Type type = new TypeToken<List<String>>() {
|
||||||
|
}.getType();
|
||||||
|
List<String> list = gson.fromJson(jsonString, type);
|
||||||
|
if (list == null) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
} else {
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getDisablePackage() {
|
||||||
|
List<String> list = new ArrayList<>();
|
||||||
|
if (Settings.System.getInt(crv, "qch_app_camera", 0) == 1) {
|
||||||
|
list.add("com.mediatek.camera");
|
||||||
|
list.add("com.android.camera");
|
||||||
|
list.add("com.android.camera2");
|
||||||
|
}
|
||||||
|
if (Settings.System.getInt(crv, "qch_call_forbid", 0) == 1) {
|
||||||
|
list.add("com.android.dialer");
|
||||||
|
}
|
||||||
|
if (Settings.System.getInt(crv, "qch_app_deskclock", 0) == 1) {
|
||||||
|
list.add("com.android.deskclock");
|
||||||
|
}
|
||||||
|
if (Settings.System.getInt(crv, "qch_app_soundrecorder", 0) == 1) {
|
||||||
|
list.add("com.android.soundrecorder");
|
||||||
|
}
|
||||||
|
if (Settings.System.getInt(crv, "qch_app_music", 0) == 1) {
|
||||||
|
list.add("com.android.music");
|
||||||
|
}
|
||||||
|
if (Settings.System.getInt(crv, "qch_app_gallery", 0) == 1) {
|
||||||
|
list.add("com.android.gallery3d");
|
||||||
|
}
|
||||||
|
if (Settings.System.getInt(crv, "qch_app_filemanager", 0) == 1) {
|
||||||
|
list.add("com.mediatek.filemanager");
|
||||||
|
list.add("com.android.documentsui");
|
||||||
|
}
|
||||||
|
if (Settings.System.getInt(crv, "qch_app_browser", 0) == 1) {
|
||||||
|
list.add("com.android.browser");
|
||||||
|
list.add("com.aoleyun.browser");
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static final String PACKAGE_DEVICEINFO = "com.aoleyun.sn";
|
public static final String PACKAGE_DEVICEINFO = "com.aoleyun.sn";
|
||||||
public static final String CLASS_DEVICEINFO = "com.aoleyun.sn.receiver.BootReceiver";
|
public static final String CLASS_DEVICEINFO = "com.aoleyun.sn.receiver.BootReceiver";
|
||||||
@@ -2152,6 +2204,4 @@ public class JGYUtils {
|
|||||||
public static boolean isCubeDevice() {
|
public static boolean isCubeDevice() {
|
||||||
return getHardware().startsWith(UNISOC_HARDWARE) && Build.BRAND.equalsIgnoreCase(CUBE_BRAND);
|
return getHardware().startsWith(UNISOC_HARDWARE) && Build.BRAND.equalsIgnoreCase(CUBE_BRAND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user