mirror of
https://github.com/adolfintel/OpenPods.git
synced 2026-09-14 14:56:11 -04:00
Remove badge from app notifications & fixed 2ms delay on BLE scanner
This commit is contained in:
Generated
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="1.8" />
|
||||
<bytecodeTargetLevel target="11" />
|
||||
</component>
|
||||
</project>
|
||||
Generated
+1
-1
@@ -5,7 +5,7 @@
|
||||
<configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
|
||||
</configurations>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
||||
@@ -116,12 +116,10 @@ public class PodsService extends Service {
|
||||
throw new Exception("BT Off");
|
||||
|
||||
List<ScanFilter> filters = getScanFilters();
|
||||
ScanSettings settings;
|
||||
|
||||
if (prefs.getBoolean("batterySaver", false))
|
||||
settings = new ScanSettings.Builder().setScanMode(0).setReportDelay(0).build();
|
||||
else
|
||||
settings = new ScanSettings.Builder().setScanMode(2).setReportDelay(2).build();
|
||||
ScanSettings settings = new ScanSettings.Builder()
|
||||
.setScanMode(prefs.getBoolean("batterySaver", false) ? ScanSettings.SCAN_MODE_LOW_POWER : ScanSettings.SCAN_MODE_LOW_LATENCY)
|
||||
.setReportDelay(0)
|
||||
.build();
|
||||
|
||||
btScanner.startScan(filters, settings, new ScanCallback() {
|
||||
@Override
|
||||
@@ -267,7 +265,7 @@ public class PodsService extends Service {
|
||||
channel.setSound(null, null);
|
||||
channel.enableVibration(false);
|
||||
channel.enableLights(false);
|
||||
channel.setShowBadge(true);
|
||||
channel.setShowBadge(false);
|
||||
channel.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);
|
||||
mNotifyManager.createNotificationChannel(channel);
|
||||
}
|
||||
@@ -578,7 +576,7 @@ public class PodsService extends Service {
|
||||
|
||||
NotificationManager notManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
NotificationChannel notChannel = new NotificationChannel(notChannelID, getString(R.string.bg_noti_channel), NotificationManager.IMPORTANCE_LOW);
|
||||
|
||||
notChannel.setShowBadge(false);
|
||||
notManager.createNotificationChannel(notChannel);
|
||||
|
||||
Intent notIntent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS)
|
||||
|
||||
@@ -7,7 +7,7 @@ buildscript {
|
||||
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.0.0'
|
||||
classpath 'com.android.tools.build:gradle:7.0.1'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
#Mon Jul 19 00:51:02 IDT 2021
|
||||
#Thu Aug 19 19:47:14 IDT 2021
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
Reference in New Issue
Block a user