mirror of
https://github.com/emanuele-f/PCAPdroid.git
synced 2026-07-03 21:21:12 +08:00
Move pcapng format option below TLS decryption
This commit is contained in:
parent
3830f93054
commit
d82df49c0d
@ -98,9 +98,6 @@ public class Billing {
|
||||
}
|
||||
|
||||
public boolean isPurchased(String sku) {
|
||||
if(PCAPNG_SKU.equals(sku))
|
||||
return true;
|
||||
|
||||
if(mPeerSkus.contains(sku))
|
||||
return true;
|
||||
|
||||
|
||||
@ -269,14 +269,6 @@ public class SettingsActivity extends BaseActivity implements PreferenceFragment
|
||||
return true;
|
||||
});
|
||||
|
||||
mPcapngEnabled = requirePreference("pcapng_format");
|
||||
mPcapngEnabled.setOnPreferenceChangeListener(((preference, newValue) -> {
|
||||
mTrailerEnabled.setVisible(!(boolean)newValue);
|
||||
return true;
|
||||
}));
|
||||
if(!mIab.isPurchased(Billing.PCAPNG_SKU))
|
||||
mPcapngEnabled.setVisible(false);
|
||||
|
||||
mTrailerEnabled = requirePreference("pcapdroid_trailer");
|
||||
mTrailerEnabled.setVisible(!isPcapngEnabled()); // TODO support
|
||||
}
|
||||
@ -317,6 +309,20 @@ public class SettingsActivity extends BaseActivity implements PreferenceFragment
|
||||
return true;
|
||||
});
|
||||
|
||||
mPcapngEnabled = requirePreference("pcapng_format");
|
||||
|
||||
if(mIab.isAvailable(Billing.PCAPNG_SKU)) {
|
||||
mPcapngEnabled.setOnPreferenceClickListener((preference -> {
|
||||
// Billing code here
|
||||
|
||||
mTrailerEnabled.setVisible(!mPcapngEnabled.isChecked());
|
||||
return false;
|
||||
}));
|
||||
if(!mIab.isPurchased(Billing.PCAPNG_SKU))
|
||||
mPcapngEnabled.setEnabled(false);
|
||||
} else
|
||||
mPcapngEnabled.setVisible(false);
|
||||
|
||||
mFullPayloadEnabled = requirePreference(Prefs.PREF_FULL_PAYLOAD);
|
||||
mBlockQuic = requirePreference(Prefs.PREF_BLOCK_QUIC);
|
||||
mMitmproxyOpts = requirePreference(Prefs.PREF_MITMPROXY_OPTS);
|
||||
|
||||
@ -79,6 +79,13 @@
|
||||
app:iconSpaceReserved="false"
|
||||
app:useSimpleSummaryProvider="true" />
|
||||
|
||||
<SwitchPreference
|
||||
app:key="pcapng_format"
|
||||
app:title="@string/pcapng_format"
|
||||
app:iconSpaceReserved="false"
|
||||
app:summary="@string/pcapng_format_summary"
|
||||
app:defaultValue="true" />
|
||||
|
||||
<SwitchPreference
|
||||
app:key="block_quic"
|
||||
app:title="@string/block_quick"
|
||||
@ -150,13 +157,6 @@
|
||||
app:summary="@string/start_at_boot_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<SwitchPreference
|
||||
app:key="pcapng_format"
|
||||
app:title="@string/pcapng_format"
|
||||
app:iconSpaceReserved="false"
|
||||
app:summary="@string/pcapng_format_summary"
|
||||
app:defaultValue="true" />
|
||||
|
||||
<SwitchPreference
|
||||
app:key="pcapdroid_trailer"
|
||||
app:title="@string/pcapdroid_trailer"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user