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:
Electric
2020-05-11 17:08:22 +03:00
parent e15c35a3f9
commit 18311dafe1
27 changed files with 257 additions and 90 deletions
@@ -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));
}
}