Merge pull request #8187 from brave/remove_safe_browsing_help_option_android
Remove safe browsing help option
This commit is contained in:
@@ -205,3 +205,11 @@
|
||||
-keep class org.chromium.chrome.browser.customtabs.CustomTabAppMenuPropertiesDelegate {
|
||||
public <init>(...);
|
||||
}
|
||||
|
||||
-keep class org.chromium.chrome.browser.settings.SettingsLauncherImpl {
|
||||
public <init>(...);
|
||||
}
|
||||
|
||||
-keep class org.chromium.chrome.browser.settings.BraveSettingsLauncherImpl {
|
||||
public <init>(...);
|
||||
}
|
||||
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
/* Copyright (c) 2021 The Brave Authors. All rights reserved.
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.chromium.chrome.browser.safe_browsing.settings;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import org.chromium.base.BraveReflectionUtil;
|
||||
import org.chromium.chrome.browser.safe_browsing.SafeBrowsingBridge;
|
||||
|
||||
/**
|
||||
* Fragment containing standard protection settings.
|
||||
*/
|
||||
public class BraveStandardProtectionSettingsFragment extends StandardProtectionSettingsFragment {
|
||||
@Override
|
||||
protected void onCreatePreferencesInternal(Bundle bundle, String rootKey) {
|
||||
super.onCreatePreferencesInternal(bundle, rootKey);
|
||||
|
||||
SafeBrowsingBridge.setSafeBrowsingExtendedReportingEnabled(false);
|
||||
getPreferenceScreen().removePreference(mExtendedReportingPreference);
|
||||
getPreferenceScreen().removePreference(mPasswordLeakDetectionPreference);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/* Copyright (c) 2021 The Brave Authors. All rights reserved.
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.chromium.chrome.browser.settings;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import org.chromium.base.IntentUtils;
|
||||
import org.chromium.chrome.browser.safe_browsing.settings.BraveStandardProtectionSettingsFragment;
|
||||
import org.chromium.chrome.browser.safe_browsing.settings.StandardProtectionSettingsFragment;
|
||||
|
||||
public class BraveSettingsLauncherImpl extends SettingsLauncherImpl {
|
||||
public BraveSettingsLauncherImpl() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void launchSettingsActivity(Context context,
|
||||
@Nullable Class<? extends Fragment> fragment, @Nullable Bundle fragmentArgs) {
|
||||
if (fragment != null) {
|
||||
// Substitute with our version of class
|
||||
if (fragment.equals(StandardProtectionSettingsFragment.class)) {
|
||||
fragment = BraveStandardProtectionSettingsFragment.class;
|
||||
}
|
||||
}
|
||||
super.launchSettingsActivity(context, fragment, fragmentArgs);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user