version:6.4.8
fix: update:修改主页效果
This commit is contained in:
@@ -34,6 +34,8 @@ public class CommonConfig {
|
||||
*/
|
||||
public final static String DEVICES_FRIST_START = "DEVICES_FRIST_START";
|
||||
|
||||
public static final String INSTALL_SD_APKS = "install_sd_apks";
|
||||
|
||||
/*是否激活*/
|
||||
public static final String UIUI_ACTIVATION_KEY = "uiui_activation";
|
||||
/*保存激活码*/
|
||||
|
||||
@@ -1248,7 +1248,7 @@ public class NetInterfaceManager {
|
||||
cacheHelper.put(UrlAddress.GET_DESKTOP, "");
|
||||
// String whiteList = Settings.System.getString(mContext.getContentResolver(), JGYActions.ACTION_JGY_SHORTCUTLIST);
|
||||
for (String s : ApkUtils.desktopAPP) {
|
||||
if ("com.aoleyunos.dop3".equals(s)){
|
||||
if ("com.aoleyunos.dop3".equals(s)) {
|
||||
continue;
|
||||
}
|
||||
if (!BuildConfig.DEBUG) {
|
||||
@@ -1940,6 +1940,7 @@ public class NetInterfaceManager {
|
||||
String ebagCode = eBagCode.getEbagCode();
|
||||
SPUtils.put(mContext, "ebagCode", ebagCode);
|
||||
Settings.Global.putInt(mContext.getContentResolver(), CommonConfig.UIUI_ACTIVATION_KEY, 1);
|
||||
JGYUtils.getInstance().checkLocalExternalFiles();
|
||||
} else {
|
||||
cacheHelper.put(UrlAddress.GET_EBAG_CODE, "");
|
||||
Log.e("getEBagCode", "onNext: " + baseResponse.data);
|
||||
@@ -3992,6 +3993,7 @@ public class NetInterfaceManager {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Settings.Global.putInt(mContext.getContentResolver(), CommonConfig.AOLEYUN_APPSTORE_INSTALL, 1);
|
||||
TimeUtils.setEmpty(mContext);
|
||||
TimeUtils.ContralTime c = TimeUtils.getDefaltContralTime(mContext);
|
||||
if (null != c) {
|
||||
|
||||
@@ -762,6 +762,7 @@ public class ApkUtils {
|
||||
this.add("com.aoleyun.os");
|
||||
this.add("com.aoleyun.browser");
|
||||
this.add("com.aoleyun.browser");
|
||||
this.add("com.uiui.filecloud");
|
||||
}};
|
||||
|
||||
//出厂自带的app
|
||||
|
||||
@@ -32,7 +32,6 @@ import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.core.content.ContextCompat;
|
||||
@@ -96,10 +95,18 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import io.reactivex.rxjava3.annotations.NonNull;
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import io.reactivex.rxjava3.core.ObservableEmitter;
|
||||
import io.reactivex.rxjava3.core.ObservableOnSubscribe;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
|
||||
import static android.app.ActivityManager.RECENT_IGNORE_UNAVAILABLE;
|
||||
|
||||
|
||||
@@ -2500,7 +2507,7 @@ public class JGYUtils {
|
||||
String app_package = adminAppInfo.getApp_package();
|
||||
String app_url = adminAppInfo.getApp_url();
|
||||
String app_md5 = adminAppInfo.getApp_md5();
|
||||
int app_id = adminAppInfo.getId();
|
||||
int app_id = adminAppInfo.getId();
|
||||
long app_version_code = adminAppInfo.getApp_version_code();
|
||||
JsonObject jsonObject = new JsonObject();
|
||||
jsonObject.addProperty("app_name", app_name);
|
||||
@@ -2532,4 +2539,134 @@ public class JGYUtils {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static final String AOLE_DIR = "aoleapp";
|
||||
|
||||
public void checkLocalExternalFiles() {
|
||||
int install = mMMKV.decodeInt(CommonConfig.INSTALL_SD_APKS, 0);
|
||||
Log.e(TAG, "checkLocalExternalFiles: installed = " + install);
|
||||
if (install == 1) {
|
||||
Log.e(TAG, "checkLocalExternalFiles: install");
|
||||
// return;
|
||||
}
|
||||
File[] externalFiles = mContext.getExternalFilesDirs(null);
|
||||
Log.e(TAG, "checkLocalAppInstall: externalFiles = " + Arrays.toString(externalFiles));
|
||||
|
||||
String SdPath = Environment.getExternalStorageDirectory().getAbsolutePath();
|
||||
Log.e(TAG, "checkLocalAppInstall: SdPath = " + SdPath);
|
||||
String aolePath = SdPath + File.separator + AOLE_DIR;
|
||||
File file = new File(aolePath);
|
||||
if (!file.exists()) {
|
||||
Log.e(TAG, "checkLocalExternalFiles: dir not exists");
|
||||
return;
|
||||
}
|
||||
String[] apkName = file.list();
|
||||
if (apkName == null || apkName.length == 0) {
|
||||
Log.e(TAG, "checkLocalAppInstall: apkName is empty");
|
||||
} else {
|
||||
Observable.create(new ObservableOnSubscribe<HashMap<String, String>>() {
|
||||
@Override
|
||||
public void subscribe(@NonNull ObservableEmitter<HashMap<String, String>> emitter) throws Throwable {
|
||||
HashMap<String, String> packageListMap = new HashMap<>();
|
||||
for (String fileName : apkName) {
|
||||
String apkPath = aolePath + File.separator + fileName;
|
||||
Log.e(TAG, "subscribe: " + apkPath);
|
||||
String pkg = ApkUtils.getPackageName(mContext, apkPath);
|
||||
if (mJxwApps.contains(pkg)) {
|
||||
packageListMap.put(pkg, apkPath);
|
||||
} else {
|
||||
Log.e(TAG, "checkLocalAppInstall: skip: " + pkg + " fileName: " + fileName);
|
||||
}
|
||||
}
|
||||
emitter.onNext(packageListMap);
|
||||
emitter.onComplete();
|
||||
}
|
||||
}).subscribe(new Observer<HashMap<String, String>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.e("checkLocalAppInstall", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull HashMap<String, String> stringStringHashMap) {
|
||||
Log.e("checkLocalAppInstall", "onNext: " + stringStringHashMap);
|
||||
stringStringHashMap.forEach(new BiConsumer<String, String>() {
|
||||
@Override
|
||||
public void accept(String key, String value) {
|
||||
if (ApkUtils.isAvailable(mContext, key)) {
|
||||
Log.e("checkLocalAppInstall", "accept: installed: " + key);
|
||||
} else {
|
||||
ApkUtils.installApp(mContext, value);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.e("checkLocalAppInstall", "onError: " + e.getMessage());
|
||||
onComplete();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("checkLocalAppInstall", "onComplete: ");
|
||||
mMMKV.encode(CommonConfig.INSTALL_SD_APKS, 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private Set<String> mJxwApps = new HashSet<String>() {{
|
||||
this.add("air.com.zhihuiyoujiao.flashplayer");
|
||||
this.add("com.example.arithmeticformula");
|
||||
this.add("com.example.elementcycleapp");
|
||||
this.add("com.example.pianpangbushou");
|
||||
this.add("com.iflytek.cyber.iot.show.core");
|
||||
this.add("com.iflytek.speechcloud");
|
||||
this.add("com.jxw.bihuamingcheng");
|
||||
this.add("com.jxw.bishunguize");
|
||||
this.add("com.jxw.characterlearning");
|
||||
this.add("com.jxw.dmxcy");
|
||||
this.add("com.jxw.englishsoundmark");
|
||||
this.add("com.jxw.examsystem");
|
||||
this.add("com.jxw.game");
|
||||
this.add("com.jxw.gb.zwpg");
|
||||
this.add("com.jxw.handwrite");
|
||||
this.add("com.jxw.jinfangyici");
|
||||
this.add("com.jxw.jxwbook");
|
||||
this.add("com.jxw.jxwcalculator");
|
||||
this.add("com.jxw.laboratory");
|
||||
this.add("com.jxw.learnchinesepinyin");
|
||||
this.add("com.jxw.letterstudynew");
|
||||
this.add("com.jxw.liancichengju");
|
||||
this.add("com.jxw.mskt.video");
|
||||
this.add("com.jxw.newyouer.video");
|
||||
this.add("com.jxw.online_study");
|
||||
this.add("com.jxw.question");
|
||||
this.add("com.jxw.schultegrid");
|
||||
this.add("com.jxw.singsound");
|
||||
this.add("com.jxw.studydigital");
|
||||
this.add("com.jxw.teacher.video");
|
||||
this.add("com.jxw.wuweijidanci");
|
||||
this.add("com.jxw.youer.video");
|
||||
this.add("com.jxw.yuwenxiezuo");
|
||||
this.add("com.jxw.yyhb");
|
||||
this.add("com.jxw.zncd");
|
||||
this.add("com.jxw.souti");
|
||||
this.add("com.jxw.xdfzq");
|
||||
this.add("com.oirsdfg89.flg");
|
||||
this.add("com.study.flashplayer");
|
||||
this.add("com.tech.translate");
|
||||
this.add("com.uiui.zybrowser");
|
||||
this.add("com.uiui.zysn ");
|
||||
this.add("com.jxw.launcher");
|
||||
this.add("com.uiui.zyappstore");
|
||||
this.add("com.uiui.zy");
|
||||
this.add("com.uiui.zyos");
|
||||
this.add("com.teclast.zyos");
|
||||
this.add("com.teclast.zybrowser");
|
||||
this.add("com.teclast.zyappstore");
|
||||
this.add("com.teclast.zy");
|
||||
}};
|
||||
}
|
||||
|
||||
BIN
app/src/main/res/drawable-hdpi/aoleyun_qrcode.png
Normal file
BIN
app/src/main/res/drawable-hdpi/aoleyun_qrcode.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 39 KiB |
@@ -42,7 +42,6 @@
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_back"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_version"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -130,25 +129,27 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="--"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_name" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:maxWidth="@dimen/dp_210"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:gravity="center"
|
||||
android:maxWidth="@dimen/dp_210"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -158,8 +159,8 @@
|
||||
android:id="@+id/tv_batch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="批次"
|
||||
android:singleLine="true"
|
||||
android:text="批次"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -182,15 +183,14 @@
|
||||
android:id="@+id/view"
|
||||
android:layout_width="1px"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:background="@color/text_gray"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/constraintLayout5" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_student"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -201,8 +201,8 @@
|
||||
android:id="@+id/tv_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="学号"
|
||||
android:singleLine="true"
|
||||
android:text="学号"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -210,7 +210,6 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="我的学号"
|
||||
@@ -221,19 +220,41 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_number" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_serial"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/view"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:text="编号"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/view2"
|
||||
android:layout_width="1px"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:background="@color/text_gray"
|
||||
app:layout_constraintStart_toEndOf="@+id/cl_student" />
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_class"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -244,8 +265,8 @@
|
||||
android:id="@+id/tv_class"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="班级"
|
||||
android:singleLine="true"
|
||||
android:text="班级"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -264,7 +285,31 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_class" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_number_name"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/view2"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_number_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:text="班级"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -722,9 +767,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:text="@string/binding_time"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_qrcode"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_qrcode"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_qrcode" />
|
||||
|
||||
@@ -749,16 +749,28 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_bind_statu">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_88"
|
||||
android:layout_height="@dimen/dp_88"
|
||||
android:src="@drawable/aoleyun_qrcode"
|
||||
android:layout_gravity="center"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_marginStart="@dimen/dp_48"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_qrcode"
|
||||
android:layout_width="@dimen/dp_88"
|
||||
android:layout_marginEnd="@dimen/dp_48"
|
||||
android:layout_height="@dimen/dp_88"
|
||||
android:layout_gravity="center"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
|
||||
Reference in New Issue
Block a user