Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4b4daa42cf |
@@ -29,8 +29,8 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.aoleyun.sn"
|
applicationId "com.aoleyun.sn"
|
||||||
versionCode 210
|
versionCode 211
|
||||||
versionName "1.6.0403"
|
versionName "1.6.04015"
|
||||||
|
|
||||||
//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
|
||||||
|
|||||||
@@ -1772,6 +1772,7 @@ public class NetInterfaceManager {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public void getDesktopIcon(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, onCompleteCallback callback) {
|
public void getDesktopIcon(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, onCompleteCallback callback) {
|
||||||
ConnectMode connectMode = ConnectMode.SIX_HOUR;
|
ConnectMode connectMode = ConnectMode.SIX_HOUR;
|
||||||
if (refresh) {
|
if (refresh) {
|
||||||
@@ -2717,15 +2718,15 @@ public class NetInterfaceManager {
|
|||||||
public void setPushTags(BehaviorSubject<ActivityEvent> lifecycle, PushTagCallback callback) {
|
public void setPushTags(BehaviorSubject<ActivityEvent> lifecycle, PushTagCallback callback) {
|
||||||
getPushTagsObservable()
|
getPushTagsObservable()
|
||||||
.compose(RxLifecycle.bindUntilEvent(lifecycle, ActivityEvent.DESTROY))
|
.compose(RxLifecycle.bindUntilEvent(lifecycle, ActivityEvent.DESTROY))
|
||||||
.subscribe(getgetPushTagsObserver(callback));
|
.subscribe(getPushTagsObserver(callback));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPushTags() {
|
public void setPushTags() {
|
||||||
getPushTagsObservable()
|
getPushTagsObservable()
|
||||||
.subscribe(getgetPushTagsObserver(null));
|
.subscribe(getPushTagsObserver(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
private Observer<BaseResponse<Batch>> getgetPushTagsObserver(PushTagCallback callback) {
|
private Observer<BaseResponse<Batch>> getPushTagsObserver(PushTagCallback callback) {
|
||||||
return new Observer<BaseResponse<Batch>>() {
|
return new Observer<BaseResponse<Batch>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@NonNull Disposable d) {
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
|||||||
@@ -8,11 +8,9 @@ import android.os.Build;
|
|||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.aoleyun.sn.comm.CommonConfig;
|
|
||||||
import com.aoleyun.sn.comm.PackageNames;
|
import com.aoleyun.sn.comm.PackageNames;
|
||||||
import com.aoleyun.sn.network.NetInterfaceManager;
|
import com.aoleyun.sn.network.NetInterfaceManager;
|
||||||
import com.aoleyun.sn.utils.ApkUtils;
|
import com.aoleyun.sn.utils.ApkUtils;
|
||||||
import com.aoleyun.sn.utils.CmdUtil;
|
|
||||||
import com.aoleyun.sn.utils.JgyUtils;
|
import com.aoleyun.sn.utils.JgyUtils;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@@ -122,6 +120,7 @@ public class NewAppReceiver extends BroadcastReceiver {
|
|||||||
NetInterfaceManager.getInstance().getAppLimit();
|
NetInterfaceManager.getInstance().getAppLimit();
|
||||||
// NetInterfaceManager.getInstance().getDefaultDesktop();
|
// NetInterfaceManager.getInstance().getDefaultDesktop();
|
||||||
NetInterfaceManager.getInstance().getNetAndLaunchSetting();
|
NetInterfaceManager.getInstance().getNetAndLaunchSetting();
|
||||||
|
NetInterfaceManager.getInstance().getDesktopIcon();
|
||||||
NetInterfaceManager.getInstance().sendInstalledAppInfo(new NetInterfaceManager.onCompleteCallback() {
|
NetInterfaceManager.getInstance().sendInstalledAppInfo(new NetInterfaceManager.onCompleteCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
|||||||
@@ -599,13 +599,14 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
|||||||
|
|
||||||
registerReceivers();
|
registerReceivers();
|
||||||
NetworkUtils.registerNetworkStatusChangedListener(this);
|
NetworkUtils.registerNetworkStatusChangedListener(this);
|
||||||
addShortcut();
|
|
||||||
timeChangedStart.onstar(System.currentTimeMillis());
|
timeChangedStart.onstar(System.currentTimeMillis());
|
||||||
setStatusbar();
|
setStatusbar();
|
||||||
setFloatingWindow();
|
setFloatingWindow();
|
||||||
JgyUtils.getInstance().writeAppPackageList();
|
JgyUtils.getInstance().writeAppPackageList();
|
||||||
// notificationManager = NotificationManagerCompat.from(this);
|
notificationManager = NotificationManagerCompat.from(this);
|
||||||
// createNotificationChannel();
|
createNotificationChannel();
|
||||||
|
sendSimpleNotification();
|
||||||
|
|
||||||
// aliyunPushInit();
|
// aliyunPushInit();
|
||||||
|
|
||||||
IActivityManager activityManager = ActivityManagerNative.getDefault();
|
IActivityManager activityManager = ActivityManagerNative.getDefault();
|
||||||
@@ -673,7 +674,6 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
|||||||
channel.setDescription(CHANNEL_DESCRIPTION);
|
channel.setDescription(CHANNEL_DESCRIPTION);
|
||||||
// Register the channel with the system; you can't change the importance
|
// Register the channel with the system; you can't change the importance
|
||||||
// or other notification behaviors after this
|
// or other notification behaviors after this
|
||||||
NotificationManager notificationManager = getSystemService(NotificationManager.class);
|
|
||||||
notificationManager.createNotificationChannel(channel);
|
notificationManager.createNotificationChannel(channel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -691,11 +691,8 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
|||||||
.setOngoing(true)
|
.setOngoing(true)
|
||||||
.setPriority(NotificationCompat.PRIORITY_MAX);
|
.setPriority(NotificationCompat.PRIORITY_MAX);
|
||||||
// notificationId is a unique int for each notification that you must define
|
// notificationId is a unique int for each notification that you must define
|
||||||
notificationManager.notify(NotificationID, builder.build());
|
// notificationManager.notify(NotificationID, builder.build());
|
||||||
}
|
startForeground(NotificationID, builder.build());
|
||||||
|
|
||||||
private void addShortcut() {
|
|
||||||
ApkUtils.addShortcut(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setStatusbar() {
|
private void setStatusbar() {
|
||||||
@@ -923,7 +920,11 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
|||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
Log.e("TimeChangedReceiver", "onReceive: " + intent.getAction());
|
Log.e("TimeChangedReceiver", "onReceive: " + intent.getAction());
|
||||||
switch (intent.getAction()) {
|
String action = intent.getAction();
|
||||||
|
if (TextUtils.isEmpty(action)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
switch (action) {
|
||||||
case Intent.ACTION_DATE_CHANGED:
|
case Intent.ACTION_DATE_CHANGED:
|
||||||
case Intent.ACTION_TIME_CHANGED:
|
case Intent.ACTION_TIME_CHANGED:
|
||||||
case Intent.ACTION_TIMEZONE_CHANGED:
|
case Intent.ACTION_TIMEZONE_CHANGED:
|
||||||
@@ -1168,7 +1169,6 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
|||||||
Log.e(TAG, "setLockedState: " + loocked);
|
Log.e(TAG, "setLockedState: " + loocked);
|
||||||
if (loocked) {
|
if (loocked) {
|
||||||
Toaster.debugShow("设备已上锁");
|
Toaster.debugShow("设备已上锁");
|
||||||
// sendSimpleNotification();
|
|
||||||
mPresenter.setPushTags();
|
mPresenter.setPushTags();
|
||||||
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");
|
||||||
|
|||||||
@@ -1365,10 +1365,6 @@ public class ApkUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addShortcut(Context context) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final Set<String> AoleyunOSApp = new HashSet<String>() {{
|
private static final Set<String> AoleyunOSApp = new HashSet<String>() {{
|
||||||
this.add("com.aoleyun.info");
|
this.add("com.aoleyun.info");
|
||||||
this.add("com.aoleyun.os");
|
this.add("com.aoleyun.os");
|
||||||
|
|||||||
@@ -245,7 +245,11 @@ public class JgyUtils {
|
|||||||
public static void init(Context context) {
|
public static void init(Context context) {
|
||||||
if (sInstance == null) {
|
if (sInstance == null) {
|
||||||
Log.e(TAG, "init: ");
|
Log.e(TAG, "init: ");
|
||||||
sInstance = new JgyUtils(context);
|
synchronized (JgyUtils.class) {
|
||||||
|
if (sInstance == null) {
|
||||||
|
sInstance = new JgyUtils(context);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3009,6 +3013,7 @@ public class JgyUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public List<String> getHidePackage() {
|
public List<String> getHidePackage() {
|
||||||
String jsonString = cacheHelper.getAsString(UrlAddress.GET_HIDE_DESKTOPICON);
|
String jsonString = cacheHelper.getAsString(UrlAddress.GET_HIDE_DESKTOPICON);
|
||||||
//为 "" 是已经请求成功的
|
//为 "" 是已经请求成功的
|
||||||
|
|||||||
Reference in New Issue
Block a user