version:1.0
update:2021-10-13 18:52:13 fix:去除okgo,rxAndroid1,优化依赖 add:切换到奥乐云平台
This commit is contained in:
38
app/src/main/java/com/aoleyun/sn/utils/BootManager.java
Normal file
38
app/src/main/java/com/aoleyun/sn/utils/BootManager.java
Normal file
@@ -0,0 +1,38 @@
|
||||
package com.aoleyun.sn.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.aoleyun.sn.action.JGYActions;
|
||||
import com.aoleyun.sn.service.MainService;
|
||||
|
||||
public class BootManager {
|
||||
private Context mContext;
|
||||
private final static String TAG = BootManager.class.getSimpleName();
|
||||
|
||||
public BootManager(Context context) {
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
public void start() {
|
||||
sendLauncherIcon();
|
||||
timeControlUpdate();
|
||||
JGYUtils.getInstance().onBootSendNetwork();
|
||||
JGYUtils.getInstance().onBootSetAppInsideWeb();
|
||||
}
|
||||
|
||||
private void sendLauncherIcon() {
|
||||
String packageList = Settings.System.getString(mContext.getContentResolver(), JGYActions.ACTION_JGY_SHORTCUTLIST);
|
||||
if (TextUtils.isEmpty(packageList)) {
|
||||
Settings.System.putString(mContext.getContentResolver(), "qch_launcher_icon_app", "");
|
||||
}
|
||||
}
|
||||
|
||||
private void timeControlUpdate(){
|
||||
Intent intent = new Intent();
|
||||
intent.setAction(MainService.TimeChangedReceiver.ACTION_UPDATE);
|
||||
mContext.sendBroadcast(intent);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user