mirror of
https://github.com/adolfintel/OpenPods.git
synced 2026-09-14 14:56:11 -04:00
Android 13 support
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.dosse.airpods">
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
@@ -8,7 +8,10 @@
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
|
||||
<uses-permission
|
||||
android:name="android.permission.BLUETOOTH_SCAN"
|
||||
android:usesPermissionFlags="neverForLocation"
|
||||
tools:targetApi="s" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
||||
@@ -23,7 +26,8 @@
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
android:theme="@style/AppTheme"
|
||||
tools:ignore="DataExtractionRules">
|
||||
|
||||
<activity
|
||||
android:name=".ui.MainActivity"
|
||||
@@ -47,13 +51,10 @@
|
||||
android:launchMode="singleTop"
|
||||
android:parentActivityName=".ui.MainActivity" />
|
||||
|
||||
<activity
|
||||
android:name=".ui.NoBTActivity"
|
||||
android:label="@string/app_name" />
|
||||
<activity android:name=".ui.NoBTActivity" />
|
||||
|
||||
<activity
|
||||
android:name=".ui.IntroActivity"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
|
||||
<receiver
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.dosse.airpods.pods;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
@@ -59,6 +60,7 @@ public class PodsService extends Service {
|
||||
*
|
||||
* After decoding a beacon, the status is written to PodsStatus so that the NotificationThread can use the information
|
||||
*/
|
||||
@SuppressLint("MissingPermission")
|
||||
private void startAirPodsScanner () {
|
||||
try {
|
||||
Logger.debug("START SCANNER");
|
||||
@@ -71,7 +73,6 @@ public class PodsService extends Service {
|
||||
return;
|
||||
}
|
||||
|
||||
//if (batterySaver && btScanner != null && scanCallback != null) {
|
||||
if (btScanner != null && scanCallback != null) {
|
||||
btScanner.stopScan(scanCallback);
|
||||
scanCallback = null;
|
||||
@@ -102,6 +103,7 @@ public class PodsService extends Service {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("MissingPermission")
|
||||
private void stopAirPodsScanner () {
|
||||
try {
|
||||
if (btScanner != null && scanCallback != null) {
|
||||
@@ -233,6 +235,7 @@ public class PodsService extends Service {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("MissingPermission")
|
||||
private static boolean checkUUID (BluetoothDevice bluetoothDevice) {
|
||||
ParcelUuid[] AIRPODS_UUIDS = {
|
||||
ParcelUuid.fromString("74ec2172-0bad-4d01-8f77-997b2be0722a"),
|
||||
|
||||
Reference in New Issue
Block a user