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