version:1.0

fix:
update:更换包名
This commit is contained in:
2023-02-08 12:04:19 +08:00
parent f8b3d96ced
commit ace6008709
184 changed files with 689 additions and 7446 deletions

View File

@@ -0,0 +1,87 @@
package com.uiui.zyos.receiver;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;
import android.util.Log;
import java.util.concurrent.TimeUnit;
import io.reactivex.rxjava3.core.Observable;
import io.reactivex.rxjava3.core.ObservableOnSubscribe;
import io.reactivex.rxjava3.core.Observer;
import io.reactivex.rxjava3.disposables.Disposable;
public class BootReceiver extends BroadcastReceiver {
private static String TAG = BootReceiver.class.getSimpleName();
public static final String BOOT_COMPLETED = "zuoyeos.action.BOOT_COMPLETED";
public static final String SOS = "zuoyeos.action.SOS";
static {
getLockedState();
}
private static void getLockedState() {
Observable.create((ObservableOnSubscribe<Long>) emitter -> start = emitter::onNext)
.throttleLast(1, TimeUnit.HOURS)
.subscribe(new Observer<Long>() {
@Override
public void onSubscribe(Disposable d) {
Log.e("getLockedState", "onSubscribe: ");
}
@Override
public void onNext(Long aLong) {
}
@Override
public void onError(Throwable e) {
Log.e("getLockedState", "onError: " + e.getMessage());
}
@Override
public void onComplete() {
Log.e("getLockedState", "onComplete: ");
}
});
}
private interface Start {
void onstar(long time);
}
private static Start start;
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
Log.e(TAG, "action:" + action);
if (TextUtils.isEmpty(action)) {
return;
}
switch (action) {
default:
break;
case BOOT_COMPLETED:
// NetInterfaceManager.getInstance().getAlarmClock();
// Intent alarmIntent = new Intent(MessageReceiver.SET_ALARMCLOCK);
// context.sendBroadcast(alarmIntent);
case Intent.ACTION_BOOT_COMPLETED:
break;
case Intent.ACTION_BATTERY_CHANGED:
case Intent.ACTION_BATTERY_LOW:
case Intent.ACTION_BATTERY_OKAY:
case Intent.ACTION_POWER_CONNECTED:
case Intent.ACTION_POWER_DISCONNECTED:
case Intent.ACTION_DATE_CHANGED:
case Intent.ACTION_TIME_TICK:
case Intent.ACTION_USER_PRESENT:
case Intent.ACTION_SCREEN_OFF:
case Intent.ACTION_SCREEN_ON:
break;
}
}
}