version:
fix: update:更新图标
@@ -43,12 +43,6 @@ android {
|
|||||||
|
|
||||||
//多版本
|
//多版本
|
||||||
productFlavors {
|
productFlavors {
|
||||||
beta {
|
|
||||||
flavorDimensions "default"
|
|
||||||
versionCode 23
|
|
||||||
versionName "3.2"
|
|
||||||
}
|
|
||||||
|
|
||||||
official {
|
official {
|
||||||
flavorDimensions "default"
|
flavorDimensions "default"
|
||||||
versionCode 1
|
versionCode 1
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
getAllAppPackageName();
|
// getAllAppPackageName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -297,10 +297,10 @@ public class MainActivity extends BaseActivity {
|
|||||||
if (s.endsWith(",")) {
|
if (s.endsWith(",")) {
|
||||||
s = s.substring(0, s.length() - 1);
|
s = s.substring(0, s.length() - 1);
|
||||||
}
|
}
|
||||||
String qch_app_forbid_before = Settings.System.getString(getContentResolver(), "qch_app_forbid");
|
String qch_app_forbid_before = Settings.System.getString(getContentResolver(), "aole_app_forbid");
|
||||||
Log.e("getAllAppPackageName:", "qch_app_forbid_before" + qch_app_forbid_before);
|
Log.e("getAllAppPackageName:", "qch_app_forbid_before" + qch_app_forbid_before);
|
||||||
boolean qch_app_forbid = Settings.System.putString(getContentResolver(), "qch_app_forbid", s);
|
// boolean aole_app_forbid = Settings.System.putString(getContentResolver(), "aole_app_forbid", s);
|
||||||
Log.e("getAllAppPackageName", "qch_app_forbid:" + qch_app_forbid + ":" + s);
|
// Log.e("getAllAppPackageName", "aole_app_forbid:" + aole_app_forbid + ":" + s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import com.arialyy.aria.core.download.DownloadEntity;
|
|||||||
import com.arialyy.aria.core.inf.IEntity;
|
import com.arialyy.aria.core.inf.IEntity;
|
||||||
import com.arialyy.aria.core.task.DownloadTask;
|
import com.arialyy.aria.core.task.DownloadTask;
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.uiui.appstore.utils.Utils;
|
||||||
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -107,6 +108,7 @@ public class AppAdapter extends RecyclerView.Adapter<AppAdapter.Holder> {
|
|||||||
if (installed && !update) {
|
if (installed && !update) {
|
||||||
ApkUtils.openApp(mContext, appInfo.getApp_package());
|
ApkUtils.openApp(mContext, appInfo.getApp_package());
|
||||||
} else {
|
} else {
|
||||||
|
Utils.addPackageToWhiteList(mContext, appInfo.getApp_package());
|
||||||
DownloadEntity entity = Aria.download(this).getFirstDownloadEntity(appInfo.getApp_url());
|
DownloadEntity entity = Aria.download(this).getFirstDownloadEntity(appInfo.getApp_url());
|
||||||
if (null != entity) {
|
if (null != entity) {
|
||||||
switch (entity.getState()) {
|
switch (entity.getState()) {
|
||||||
@@ -136,6 +138,7 @@ public class AppAdapter extends RecyclerView.Adapter<AppAdapter.Holder> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// downloadApk(appInfo);
|
// downloadApk(appInfo);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.uiui.appstore.network;
|
package com.uiui.appstore.network;
|
||||||
|
|
||||||
public class UrlAddress {
|
public class UrlAddress {
|
||||||
public final static String ROOT_URL = "https://led.aolelearn.cn/android/";
|
public final static String ROOT_URL = "https://led.zuoyepad.com/android/";
|
||||||
|
|
||||||
/*获取批次*/
|
/*获取批次*/
|
||||||
public static final String GET_BATCH = "sn/getBatch";
|
public static final String GET_BATCH = "sn/getBatch";
|
||||||
|
|||||||
@@ -656,6 +656,9 @@ public class ApkUtils {
|
|||||||
intent.addCategory(Intent.CATEGORY_LAUNCHER);
|
intent.addCategory(Intent.CATEGORY_LAUNCHER);
|
||||||
List<ResolveInfo> resolveInfoList = context.getPackageManager().queryIntentActivities(intent, 0);
|
List<ResolveInfo> resolveInfoList = context.getPackageManager().queryIntentActivities(intent, 0);
|
||||||
String aole_force_app = Settings.System.getString(context.getContentResolver(), "aole_force_app");
|
String aole_force_app = Settings.System.getString(context.getContentResolver(), "aole_force_app");
|
||||||
|
if (TextUtils.isEmpty(aole_force_app)) {
|
||||||
|
return appList;
|
||||||
|
}
|
||||||
Set<String> forceAppSet = new HashSet<>(Arrays.asList(aole_force_app.split(",")));
|
Set<String> forceAppSet = new HashSet<>(Arrays.asList(aole_force_app.split(",")));
|
||||||
forceAppSet.addAll(fuxiaoyingApp);
|
forceAppSet.addAll(fuxiaoyingApp);
|
||||||
|
|
||||||
|
|||||||
@@ -144,16 +144,16 @@ public class JGYUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String olddeselectViewArray = Settings.System.getString(mContext.getContentResolver(), "qch_app_forbid_id");
|
String olddeselectViewArray = Settings.System.getString(mContext.getContentResolver(), "aole_app_forbid_id");
|
||||||
Log.e("writeDeselectIDtoSystem", "olddeselectViewArray: " + olddeselectViewArray);
|
Log.e("writeDeselectIDtoSystem", "olddeselectViewArray: " + olddeselectViewArray);
|
||||||
|
|
||||||
Settings.System.putString(mContext.getContentResolver(), "qch_app_forbid_id", packageStringBuilder.toString());
|
Settings.System.putString(mContext.getContentResolver(), "aole_app_forbid_id", packageStringBuilder.toString());
|
||||||
Settings.System.putString(mContext.getContentResolver(), "DeselectViewArray", idStringBuilder.toString());
|
Settings.System.putString(mContext.getContentResolver(), "DeselectViewArray", idStringBuilder.toString());
|
||||||
Log.e("writeDeselectIDtoSystem", "qch_app_forbid_id: " + packageStringBuilder.toString());
|
Log.e("writeDeselectIDtoSystem", "aole_app_forbid_id: " + packageStringBuilder.toString());
|
||||||
Log.e("writeDeselectIDtoSystem", "deselectViewArray: " + idStringBuilder.toString());
|
Log.e("writeDeselectIDtoSystem", "deselectViewArray: " + idStringBuilder.toString());
|
||||||
} else {
|
} else {
|
||||||
Log.e("writeDeselectIDtoSystem", "writeDeselectIDtoSystem is null:");
|
Log.e("writeDeselectIDtoSystem", "writeDeselectIDtoSystem is null:");
|
||||||
Settings.System.putString(mContext.getContentResolver(), "qch_app_forbid_id", "");
|
Settings.System.putString(mContext.getContentResolver(), "aole_app_forbid_id", "");
|
||||||
Settings.System.putString(mContext.getContentResolver(), "DeselectViewArray", "");
|
Settings.System.putString(mContext.getContentResolver(), "DeselectViewArray", "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,9 +42,12 @@ import java.io.Reader;
|
|||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.net.NetworkInterface;
|
import java.net.NetworkInterface;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class Utils {
|
public class Utils {
|
||||||
@@ -586,23 +589,23 @@ public class Utils {
|
|||||||
*/
|
*/
|
||||||
@SuppressLint({"MissingPermission", "NewApi"})
|
@SuppressLint({"MissingPermission", "NewApi"})
|
||||||
public static String getSerial() {
|
public static String getSerial() {
|
||||||
return JGYUtils.getInstance().getIMEI();
|
// return JGYUtils.getInstance().getIMEI();
|
||||||
// String serial = "unknow";
|
String serial = "unknow";
|
||||||
// try {
|
try {
|
||||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {//9.0+
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {//9.0+
|
||||||
// serial = Build.getSerial();
|
serial = Build.getSerial();
|
||||||
// } else if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N) {//8.0+
|
} else if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N) {//8.0+
|
||||||
// serial = Build.SERIAL;
|
serial = Build.SERIAL;
|
||||||
// } else {//8.0-
|
} else {//8.0-
|
||||||
// Class<?> c = Class.forName("android.os.SystemProperties");
|
Class<?> c = Class.forName("android.os.SystemProperties");
|
||||||
// Method get = c.getMethod("get", String.class);
|
Method get = c.getMethod("get", String.class);
|
||||||
// serial = (String) get.invoke(c, "ro.serialno");
|
serial = (String) get.invoke(c, "ro.serialno");
|
||||||
// }
|
}
|
||||||
// } catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// e.printStackTrace();
|
e.printStackTrace();
|
||||||
// Log.e("e", "读取设备序列号异常:" + e.toString());
|
Log.e("e", "读取设备序列号异常:" + e.toString());
|
||||||
// }
|
}
|
||||||
// return serial;
|
return serial;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final long A_GB = 1073741824;
|
public static final long A_GB = 1073741824;
|
||||||
@@ -708,5 +711,18 @@ public class Utils {
|
|||||||
return bitmap;
|
return bitmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean addPackageToWhiteList(Context context, String pkg) {
|
||||||
|
String old = Settings.System.getString(context.getContentResolver(), "aole_app_forbid");
|
||||||
|
Log.e("addPackageToWhiteList", "pkgList: " + old);
|
||||||
|
if (TextUtils.isEmpty(old)) {
|
||||||
|
return Settings.System.putString(context.getContentResolver(), "aole_app_forbid", pkg);
|
||||||
|
} else {
|
||||||
|
if (old.contains(pkg)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
HashSet<String> hashSet = new HashSet<>(new ArrayList<>(Arrays.asList(old.split(","))));
|
||||||
|
hashSet.add(pkg);
|
||||||
|
return Settings.System.putString(context.getContentResolver(), "aole_app_forbid", String.join(",", hashSet));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 5.3 KiB |
@@ -1,2 +1,2 @@
|
|||||||
include ':app'
|
include ':app'
|
||||||
rootProject.name='合作平台应用市场'
|
rootProject.name='UIUI应用市场'
|
||||||
|
|||||||