mirror of
https://github.com/adolfintel/OpenPods.git
synced 2026-09-14 23:06:11 -04:00
Workaround for API 29.
Improved charging indicator. Added support for dark theme. Added proper support for RTL. Added Hebrew translation. Merged changes from https://github.com/Domi04151309/OpenPods/tree/general-improvements.
This commit is contained in:
@@ -1,27 +1,32 @@
|
||||
package com.dosse.airpods;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
/**
|
||||
* A simple starter class that starts the service when the device is booted, or after an update
|
||||
*/
|
||||
public class Starter extends BroadcastReceiver {
|
||||
|
||||
@SuppressLint("UnsafeProtectedBroadcastReceiver")
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
public void onReceive (Context context, Intent intent) {
|
||||
startPodsService(context);
|
||||
}
|
||||
|
||||
public static final void startPodsService(Context context){
|
||||
public static void startPodsService (Context context) {
|
||||
context.startService(new Intent(context, PodsService.class));
|
||||
}
|
||||
|
||||
public static final void restartPodsService(Context context){
|
||||
public static void restartPodsService (Context context) {
|
||||
context.stopService(new Intent(context, PodsService.class));
|
||||
try{Thread.sleep(500);}catch(Throwable t){}
|
||||
try {
|
||||
Thread.sleep(500);
|
||||
} catch (Throwable ignored) {
|
||||
}
|
||||
context.startService(new Intent(context, PodsService.class));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user