mirror of https://github.com/M66B/NetGuard.git
Added option to debug ads
This commit is contained in:
parent
10594c398b
commit
9ae27cb5b9
|
@ -28,6 +28,7 @@ import android.content.SharedPreferences;
|
|||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.os.RemoteException;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.vending.billing.IInAppBillingService;
|
||||
|
@ -184,8 +185,10 @@ public class IAB implements ServiceConnection {
|
|||
}
|
||||
|
||||
public static boolean isPurchasedAny(Context context) {
|
||||
if (Util.isDebuggable(context))
|
||||
return true;
|
||||
if (Util.isDebuggable(context)) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
return !prefs.getBoolean("debug_ads", false);
|
||||
}
|
||||
|
||||
SharedPreferences prefs = context.getSharedPreferences("IAB", Context.MODE_PRIVATE);
|
||||
for (String key : prefs.getAll().keySet())
|
||||
|
|
|
@ -269,6 +269,10 @@
|
|||
<Preference
|
||||
android:key="show_resolved"
|
||||
android:title="@string/setting_show_resolved" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="debug_ads"
|
||||
android:title="Debug advertisements" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
|
||||
|
|
|
@ -269,6 +269,10 @@
|
|||
<Preference
|
||||
android:key="show_resolved"
|
||||
android:title="@string/setting_show_resolved" />
|
||||
<eu.faircode.netguard.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="debug_ads"
|
||||
android:title="Debug advertisements" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
|
||||
|
|
Loading…
Reference in New Issue