mirror of
https://github.com/adolfintel/OpenPods.git
synced 2026-09-14 14:56:11 -04:00
Miscellaneous changes
This commit is contained in:
@@ -80,7 +80,7 @@ public class PodsService extends Service {
|
||||
* <p>
|
||||
* After decoding a beacon, the status is written to leftStatus, rightStatus, caseStatus, chargeL, chargeR, chargeCase so that the NotificationThread can use the information
|
||||
*/
|
||||
private static final ArrayList<ScanResult> recentBeacons = new ArrayList<>();
|
||||
private static ArrayList<ScanResult> recentBeacons = new ArrayList<>();
|
||||
private static final long RECENT_BEACONS_MAX_T_NS = 10000000000L; //10s
|
||||
|
||||
private void startAirPodsScanner () {
|
||||
@@ -294,7 +294,7 @@ public class PodsService extends Service {
|
||||
}
|
||||
}
|
||||
|
||||
private final NotificationManager mNotifyManager;
|
||||
private NotificationManager mNotifyManager;
|
||||
|
||||
@SuppressWarnings("WeakerAccess")
|
||||
public NotificationThread () {
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.dosse.airpods;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.net.Uri;
|
||||
@@ -35,19 +36,20 @@ public class SettingsFragment extends PreferenceFragmentCompat {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(requireContext());
|
||||
builder.setTitle(R.string.hide_dialog);
|
||||
builder.setMessage(R.string.hide_dialog_desc);
|
||||
builder.setPositiveButton(R.string.hide_dialog_button, (dialogInterface, i) -> {
|
||||
builder.setPositiveButton(R.string.hide_dialog_button, (dialog, which) -> {
|
||||
PackageManager p = requireContext().getPackageManager();
|
||||
p.setComponentEnabledSetting(new ComponentName(context, MainActivity.class), PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
|
||||
Toast.makeText(context, getString(R.string.hideClicked), Toast.LENGTH_LONG).show();
|
||||
|
||||
try {
|
||||
context.openFileOutput("hidden", Context.MODE_PRIVATE).close();
|
||||
} catch (Throwable ignored) { }
|
||||
} catch (Throwable ignored) {
|
||||
}
|
||||
|
||||
enableDisableOptions();
|
||||
requireActivity().finish();
|
||||
});
|
||||
builder.setNegativeButton(android.R.string.cancel, (dialogInterface, i) -> { });
|
||||
builder.setNegativeButton(android.R.string.cancel, (dialog, which) -> dialog.dismiss());
|
||||
builder.show();
|
||||
return true;
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="bgColorPrimary" >@android:color/transparent</color>
|
||||
<color name="bgColorPrimary" >@android:color/transparent</color>
|
||||
</resources>
|
||||
|
||||
@@ -7,5 +7,5 @@
|
||||
<color name="textColorPrimary" >@android:color/primary_text_dark</color>
|
||||
<color name="bgColorPrimary" >#000</color>
|
||||
|
||||
<color name="dgrey">@android:color/darker_gray</color>
|
||||
<color name="dgrey" >@android:color/darker_gray</color>
|
||||
</resources>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="bgColorPrimary" >@android:color/transparent</color>
|
||||
<color name="bgColorPrimary" >@android:color/transparent</color>
|
||||
</resources>
|
||||
|
||||
@@ -7,5 +7,5 @@
|
||||
<color name="textColorPrimary" >@android:color/primary_text_light</color>
|
||||
<color name="bgColorPrimary" >#FFF</color>
|
||||
|
||||
<color name="dgrey">#737373</color>
|
||||
<color name="dgrey" >#737373</color>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user