build: add 6789U platform

This commit is contained in:
2026-07-10 09:38:44 +08:00
parent 9e8dbd3566
commit e127939dda
9 changed files with 98 additions and 83 deletions

View File

@@ -41,4 +41,6 @@ target_link_libraries( # Specifies the target library.
# Links the target library to the log library
# included in the NDK.
${log-lib} )
${log-lib} )
set_target_properties(jgy PROPERTIES LINK_FLAGS "-Wl,-z,max-page-size=16384")

View File

@@ -1,4 +1,6 @@
apply plugin: 'com.android.application'
plugins {
id 'com.android.application'
}
static def appName() {
return "AoleyunDeviceInfo"
@@ -16,8 +18,8 @@ android {
defaultConfig {
applicationId "com.aoleyun.sn"
versionCode 226
versionName "1.6.05263"
versionCode 228
versionName "1.6.0629-2"
//There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature.
minSdkVersion 24
@@ -39,8 +41,6 @@ android {
}
buildConfigField "String", "ROOT_URL", '"https://led.aoleyun.cn/api/"'
buildConfigField "String", "SCREEN_BASE_URL", '"https://led.aoleyun.cn:2018/"'
buildConfigField "String", "SCREEN_URL", '"https://led.aoleyun.cn:2018/wm/is_online"'
buildConfigField "String", "WEBSOCKET_URL", '"wss://led.aoleyun.cn/wss/"'
}
@@ -277,9 +277,32 @@ android {
v1SigningEnabled true
v2SigningEnabled true
}
G122 {
storeFile file("keystore/6789U.p12")
storePassword "123456"
keyAlias "6789u"
keyPassword "123456"
v1SigningEnabled true
v2SigningEnabled true
}
}
buildTypes {
G122Debug.initWith(debug)
G122Debug {
buildConfigField "String", "platform", '"MT6765"'
versionNameSuffix "-debug"
debuggable true
signingConfig signingConfigs.G122
}
G122Release.initWith(release)
G122Release {
buildConfigField "String", "platform", '"MT6765"'
signingConfig signingConfigs.G122
}
QualcommDebug.initWith(debug)
QualcommDebug {
buildConfigField "String", "platform", '"QualcommA"'
@@ -685,19 +708,14 @@ android {
}
}
// Add application variant configuration here instead
applicationVariants.all { variant ->
variant.outputs.each { output ->
android.applicationVariants.all { variant ->
variant.outputs.all { output -> // 改为 all
def buildType = variant.buildType.name
def fileName = ""
if (buildType.contains("debug")) {
fileName = "${appName()}_V${defaultConfig.versionName}_${releaseTime()}.apk"
outputFileName = "${appName()}_V${defaultConfig.versionName}_${releaseTime()}.apk"
} else {
fileName = "${appName()}_${variant.versionCode}_V${variant.versionName}_${releaseTime()}_${buildType}.apk"
outputFileName = "${appName()}_${variant.versionCode}_V${variant.versionName}_${releaseTime()}_${buildType}.apk"
}
output.outputFileName = fileName
}
}
@@ -771,7 +789,7 @@ dependencies {
//百度地图
implementation 'com.baidu.lbsyun:BaiduMapSDK_Location:9.1.8'
//MMKV
implementation 'com.tencent:mmkv-static:1.2.13'
implementation 'com.tencent:mmkv-static:2.4.0'
//bugly
implementation 'com.tencent.bugly:crashreport:4.1.9.2'
//xCrash
@@ -795,7 +813,7 @@ dependencies {
// implementation 'com.gyf.immersionbar:immersionbar-components:3.0.0'
// // kotlin扩展可选
// implementation 'com.gyf.immersionbar:immersionbar-ktx:3.0.0'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.24'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.32'
implementation 'com.facebook.rebound:rebound:0.3.8'
implementation 'com.king.view:circleprogressview:1.1.2'
// 吐司框架https://github.com/getActivity/Toaster

BIN
app/keystore/6789U.p12 Normal file

Binary file not shown.

View File

@@ -1,5 +1,7 @@
package com.aoleyun.sn.network;
import static com.google.gson.JsonParser.parseString;
import android.annotation.SuppressLint;
import android.app.AlarmManager;
import android.app.PendingIntent;
@@ -157,8 +159,6 @@ import retrofit2.Retrofit;
import retrofit2.adapter.rxjava3.RxJava3CallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;
import static com.google.gson.JsonParser.parseString;
public class NetInterfaceManager {
private static final String TAG = "NetInterfaceManager";
private static final RxCacheManager CACHE_MANAGER = RxCacheManager.getInstance();
@@ -554,12 +554,20 @@ public class NetInterfaceManager {
// }
public Observable<BaseResponse<AppUpdateInfo>> getUpdateObservable(String packageName) {
return getUpdateObservable(packageName, true);
}
public Observable<BaseResponse<AppUpdateInfo>> getUpdateObservable(String packageName, boolean useCache) {
TreeMap<String, String> map = new TreeMap<>();
map.put("package", packageName);
map.put("type", String.valueOf(JgyUtils.getInstance().checkAppPlatform()));
return withCache(schedule(getAppDownloadApi().getUpdate(map)),
UrlAddress.CHECK_UPDATE + map.toString(),
360 * CACHE_EXPIRE_ONE_MINUTE);
Observable<BaseResponse<AppUpdateInfo>> observable = schedule(getAppDownloadApi().getUpdate(map));
if (useCache) {
return withCache(observable,
UrlAddress.CHECK_UPDATE + map.toString(),
360 * CACHE_EXPIRE_ONE_MINUTE);
}
return observable;
}
public Observable<BaseResponse<List<ForceDownloadData>>> getTestUpdateObservable() {
@@ -1000,23 +1008,27 @@ public class NetInterfaceManager {
}
public void checkAoleyunUpdate(BehaviorSubject<ActivityEvent> lifecycle, UpdateCallback callback) {
Observable<BaseResponse<AppUpdateInfo>> infoUpdateObservable = getUpdateObservable(BuildConfig.APPLICATION_ID);
Observable<BaseResponse<AppUpdateInfo>> storeUpdateObservable = getUpdateObservable(PackageNames.APPSTORE);
checkAoleyunUpdate(lifecycle, false, callback);
}
public void checkAoleyunUpdate(BehaviorSubject<ActivityEvent> lifecycle, boolean useCache, UpdateCallback callback) {
Observable<BaseResponse<AppUpdateInfo>> infoUpdateObservable = getUpdateObservable(BuildConfig.APPLICATION_ID, useCache);
Observable<BaseResponse<AppUpdateInfo>> storeUpdateObservable = getUpdateObservable(PackageNames.APPSTORE, useCache);
Observable<BaseResponse<AppUpdateInfo>> desktopUpdateObservable;
if (JgyUtils.getInstance().isAiuduPlatform()) {
desktopUpdateObservable = getUpdateObservable(PackageNames.AIUDUDESKTOP);
desktopUpdateObservable = getUpdateObservable(PackageNames.AIUDUDESKTOP, useCache);
} else if (JgyUtils.isAllWinnerDevice()) {
desktopUpdateObservable = getUpdateObservable(PackageNames.ALLWINNER_15_DESKTOP);
desktopUpdateObservable = getUpdateObservable(PackageNames.ALLWINNER_15_DESKTOP, useCache);
} else if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MT6765Platform) {
desktopUpdateObservable = getUpdateObservable(PackageNames.NEUTRAL_DESKTOP);
desktopUpdateObservable = getUpdateObservable(PackageNames.NEUTRAL_DESKTOP, useCache);
} else {
desktopUpdateObservable = getUpdateObservable(PackageNames.DESKTOP);
desktopUpdateObservable = getUpdateObservable(PackageNames.DESKTOP, useCache);
}
Observable<BaseResponse<AppUpdateInfo>> notifyUpdateObservable = getUpdateObservable(PackageNames.NOTIFICATIONS);
Observable<BaseResponse<AppUpdateInfo>> browserUpdateObservable = getUpdateObservable(PackageNames.BROWSER);
Observable<BaseResponse<AppUpdateInfo>> ailogUpdateObservable = getUpdateObservable(PackageNames.AILOG);
Observable<BaseResponse<AppUpdateInfo>> notifyUpdateObservable = getUpdateObservable(PackageNames.NOTIFICATIONS, useCache);
Observable<BaseResponse<AppUpdateInfo>> browserUpdateObservable = getUpdateObservable(PackageNames.BROWSER, useCache);
Observable<BaseResponse<AppUpdateInfo>> ailogUpdateObservable = getUpdateObservable(PackageNames.AILOG, useCache);
String desktop = mMMKV.decodeString(CommonConfig.DEFAULT_DESKTOP_PACKAGE, "com.ttstd.os");
Observable<BaseResponse<AppUpdateInfo>> learningDesktopObservable = getUpdateObservable(desktop);
Observable<BaseResponse<AppUpdateInfo>> learningDesktopObservable = getUpdateObservable(desktop, useCache);
Observable.zip(infoUpdateObservable, storeUpdateObservable, desktopUpdateObservable,
notifyUpdateObservable, browserUpdateObservable, learningDesktopObservable, ailogUpdateObservable,

View File

@@ -1,6 +1,5 @@
package com.aoleyun.sn.network.api.aoleyun;
import com.aoleyun.sn.BuildConfig;
import com.aoleyun.sn.bean.BaseResponse;
import com.aoleyun.sn.network.UrlAddress;
@@ -23,15 +22,6 @@ import retrofit2.http.Query;
import retrofit2.http.QueryMap;
public interface UploadInfoApi {
@FormUrlEncoded
@POST(BuildConfig.SCREEN_URL)
@Deprecated
Observable<BaseResponse> sendScreenStatus(
@Field("key") String key,
@Field("sn") String sn,
@Field("is_online") int is_online
);
@FormUrlEncoded
@POST(UrlAddress.UPLOAD_APPINFO)
@Deprecated

View File

@@ -45,7 +45,6 @@ import android.util.Log;
import androidx.annotation.Nullable;
import com.aoleyun.sn.BuildConfig;
import com.aoleyun.sn.KeepAliveConnection;
import com.aoleyun.sn.R;
import com.aoleyun.sn.bean.BaseResponse;
@@ -54,7 +53,6 @@ import com.aoleyun.sn.comm.CommonConfig;
import com.aoleyun.sn.gson.GsonUtils;
import com.aoleyun.sn.manager.MapManager;
import com.aoleyun.sn.network.NetInterfaceManager;
import com.aoleyun.sn.network.api.aoleyun.UploadInfoApi;
import com.aoleyun.sn.receiver.NewAppReceiver;
import com.aoleyun.sn.rlog.LogDBManager;
import com.aoleyun.sn.service.main.MainService;
@@ -93,9 +91,6 @@ import io.reactivex.rxjava3.core.Observer;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.schedulers.Schedulers;
import okhttp3.ResponseBody;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava3.RxJava3CallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;
/**
* 守护进程 双进程通讯
@@ -380,40 +375,6 @@ public class GuardService extends Service {
});
}
private void sendScreenStatus(int status) {
Retrofit retrofit = new Retrofit.Builder()
.client(NetInterfaceManager.getInstance().getOkHttpClient())
.baseUrl(BuildConfig.SCREEN_BASE_URL)
.addConverterFactory(GsonConverterFactory.create())
.addCallAdapterFactory(RxJava3CallAdapterFactory.create())
.build();
UploadInfoApi uploadInfoApi = retrofit.create(UploadInfoApi.class);
uploadInfoApi.sendScreenStatus(NetInterfaceManager.HTTP_KEY, Utils.getSerial(this), status)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<BaseResponse>() {
@Override
public void onSubscribe(Disposable d) {
Log.e("sendScreenStatus", "onSubscribe: ");
}
@Override
public void onNext(BaseResponse baseResponse) {
Log.e("sendScreenStatus", "onNext: " + baseResponse.msg);
}
@Override
public void onError(Throwable e) {
Log.e("sendScreenStatus", "onError: " + e.getMessage());
}
@Override
public void onComplete() {
Log.e("sendScreenStatus", "onComplete: ");
}
});
}
/**
* @param status
* @param time 和锁屏状态无关,记录设备使用时长的

View File

@@ -1553,4 +1553,28 @@ public class ApkUtils {
return applicationInfos;
}
/**
* 清除指定应用的缓存(需要系统签名及 CLEAR_APP_CACHE 权限)
*
* @param context 上下文
* @param packageName 包名
*/
public static void clearAppCache(Context context, String packageName) {
try {
PackageManager pm = context.getPackageManager();
// 通过反射调用隐藏方法 deleteApplicationCacheFiles
Method[] methods = pm.getClass().getDeclaredMethods();
for (Method method : methods) {
if ("deleteApplicationCacheFiles".equals(method.getName())) {
method.setAccessible(true);
method.invoke(pm, packageName, null);
Log.d(TAG, "clearAppCache: " + packageName);
break;
}
}
} catch (Exception e) {
Log.e(TAG, "clearAppCache error: " + e.getMessage());
}
}
}

View File

@@ -112,7 +112,7 @@ public class SysSettingUtils {
setSystemAppDisable(context, 0);
setNotification(context, 0);
setSettingsMenuShow(context);
setEyeProtectionModeEntrance(context, 0);
setEyeProtectionModeEntrance(context, 1);
}
/**
@@ -1386,6 +1386,10 @@ public class SysSettingUtils {
}
}
/**
* @param context
* @param status
*/
private static void setEyeProtectionModeEntrance(Context context, int status) {
Log.e(TAG, "setEyeProtectionModeEntrance: status = " + status);
if (status == 0) {
@@ -1400,8 +1404,12 @@ public class SysSettingUtils {
PackageManager pm = context.getPackageManager();
ComponentName componentName = new ComponentName(context, EyeProtectionActivity.class);
if (pm.getComponentEnabledSetting(componentName) == componentState) {
return true;
}
try {
pm.setComponentEnabledSetting(componentName, componentState, PackageManager.DONT_KILL_APP);
new CacheUtils().cleanApplicationUserData(context, "com.aoleyun.os");
return true;
} catch (Exception e) {
Log.e(TAG, "setComponentEnabledSetting: " + e.getMessage());

View File

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip