diff --git a/android/brave_java_resources.gni b/android/brave_java_resources.gni index f013687baf59..eb4977560a94 100644 --- a/android/brave_java_resources.gni +++ b/android/brave_java_resources.gni @@ -46,7 +46,6 @@ brave_java_resources = [ "java/res/drawable-hdpi/ic_ad_free_videos.png", "java/res/drawable-hdpi/ic_brave_onboarding.png", "java/res/drawable-hdpi/ic_chrome.png", - "java/res/drawable-hdpi/ic_cross_modal.png", "java/res/drawable-hdpi/ic_delete_white_24dp.png", "java/res/drawable-hdpi/ic_expand_less_black_24dp.png", "java/res/drawable-hdpi/ic_expand_more_black_24dp.png", @@ -103,7 +102,6 @@ brave_java_resources = [ "java/res/drawable-mdpi/ic_ad_free_videos.png", "java/res/drawable-mdpi/ic_brave_onboarding.png", "java/res/drawable-mdpi/ic_chrome.png", - "java/res/drawable-mdpi/ic_cross_modal.png", "java/res/drawable-mdpi/ic_delete_white_24dp.png", "java/res/drawable-mdpi/ic_expand_less_black_24dp.png", "java/res/drawable-mdpi/ic_expand_more_black_24dp.png", @@ -182,7 +180,6 @@ brave_java_resources = [ "java/res/drawable-xhdpi/ic_ad_free_videos.png", "java/res/drawable-xhdpi/ic_brave_onboarding.png", "java/res/drawable-xhdpi/ic_chrome.png", - "java/res/drawable-xhdpi/ic_cross_modal.png", "java/res/drawable-xhdpi/ic_delete_white_24dp.png", "java/res/drawable-xhdpi/ic_expand_less_black_24dp.png", "java/res/drawable-xhdpi/ic_expand_more_black_24dp.png", @@ -238,7 +235,6 @@ brave_java_resources = [ "java/res/drawable-xxhdpi/ic_ad_free_videos.png", "java/res/drawable-xxhdpi/ic_brave_onboarding.png", "java/res/drawable-xxhdpi/ic_chrome.png", - "java/res/drawable-xxhdpi/ic_cross_modal.png", "java/res/drawable-xxhdpi/ic_delete_white_24dp.png", "java/res/drawable-xxhdpi/ic_expand_less_black_24dp.png", "java/res/drawable-xxhdpi/ic_expand_more_black_24dp.png", @@ -293,7 +289,6 @@ brave_java_resources = [ "java/res/drawable-xxxhdpi/ic_ad_free_videos.png", "java/res/drawable-xxxhdpi/ic_brave_onboarding.png", "java/res/drawable-xxxhdpi/ic_chrome.png", - "java/res/drawable-xxxhdpi/ic_cross_modal.png", "java/res/drawable-xxxhdpi/ic_delete_white_24dp.png", "java/res/drawable-xxxhdpi/ic_expand_less_black_24dp.png", "java/res/drawable-xxxhdpi/ic_expand_more_black_24dp.png", @@ -886,7 +881,6 @@ brave_java_resources = [ "java/res/layout/fragment_create_account.xml", "java/res/layout/fragment_create_custom_filters.xml", "java/res/layout/fragment_creating_wallet.xml", - "java/res/layout/fragment_cross_promotional_modal_dialog.xml", "java/res/layout/fragment_dapps_message.xml", "java/res/layout/fragment_dormant_users_engagement_dialog.xml", "java/res/layout/fragment_encryption_key.xml", diff --git a/android/brave_java_sources.gni b/android/brave_java_sources.gni index a746cbc842d5..1cf58ebcc42c 100644 --- a/android/brave_java_sources.gni +++ b/android/brave_java_sources.gni @@ -41,7 +41,6 @@ brave_java_sources = [ "../../brave/android/java/org/chromium/chrome/browser/BraveSwipeRefreshHandler.java", "../../brave/android/java/org/chromium/chrome/browser/BraveSyncWorker.java", "../../brave/android/java/org/chromium/chrome/browser/BraveWalletProvider.java", - "../../brave/android/java/org/chromium/chrome/browser/CrossPromotionalModalDialogFragment.java", "../../brave/android/java/org/chromium/chrome/browser/DormantUsersEngagementDialogFragment.java", "../../brave/android/java/org/chromium/chrome/browser/InternetConnection.java", "../../brave/android/java/org/chromium/chrome/browser/OpenYtInBraveDialogFragment.java", diff --git a/android/java/org/chromium/chrome/browser/CrossPromotionalModalDialogFragment.java b/android/java/org/chromium/chrome/browser/CrossPromotionalModalDialogFragment.java deleted file mode 100644 index 36d05641a587..000000000000 --- a/android/java/org/chromium/chrome/browser/CrossPromotionalModalDialogFragment.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Copyright (c) 2020 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 https://mozilla.org/MPL/2.0/. - */ - -package org.chromium.chrome.browser; - -import android.os.Bundle; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.Button; - -import org.chromium.chrome.R; - -public class CrossPromotionalModalDialogFragment - extends BraveDialogFragment implements View.OnClickListener { - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - return inflater.inflate(R.layout.fragment_cross_promotional_modal_dialog, container, false); - } - - @Override - public void onViewCreated(View view, Bundle savedInstanceState) { - Button mDoneButton = view.findViewById(R.id.btn_done); - mDoneButton.setOnClickListener(this); - } - - @Override - public void onClick(View view) { - dismiss(); - } -} diff --git a/android/java/org/chromium/chrome/browser/app/BraveActivity.java b/android/java/org/chromium/chrome/browser/app/BraveActivity.java index b70dfb0460d3..6d10d87b39cc 100644 --- a/android/java/org/chromium/chrome/browser/app/BraveActivity.java +++ b/android/java/org/chromium/chrome/browser/app/BraveActivity.java @@ -100,7 +100,6 @@ import org.chromium.chrome.browser.BraveRewardsHelper; import org.chromium.chrome.browser.BraveSyncWorker; import org.chromium.chrome.browser.ChromeTabbedActivity; -import org.chromium.chrome.browser.CrossPromotionalModalDialogFragment; import org.chromium.chrome.browser.DormantUsersEngagementDialogFragment; import org.chromium.chrome.browser.IntentHandler; import org.chromium.chrome.browser.InternetConnection; @@ -282,7 +281,6 @@ public abstract class BraveActivity extends ChromeActivity private static final int DAYS_4 = 4; private static final int DAYS_7 = 7; - private static final int DAYS_12 = 12; private static final int MONTH_1 = 1; @@ -1143,19 +1141,6 @@ public void finishNativeInitialization() { // OnboardingPrefManager.getInstance().setOnboardingShownForSkip(true); // } - if (ChromeSharedPreferences.getInstance().readInt(BravePreferenceKeys.BRAVE_APP_OPEN_COUNT) - == 1) { - Calendar calender = Calendar.getInstance(); - calender.setTime(new Date()); - calender.add(Calendar.DATE, DAYS_12); - OnboardingPrefManager.getInstance().setNextCrossPromoModalDate( - calender.getTimeInMillis()); - } - - if (OnboardingPrefManager.getInstance().showCrossPromoModal()) { - showCrossPromotionalDialog(); - OnboardingPrefManager.getInstance().setCrossPromoModalShown(true); - } BraveSyncAccountDeletedInformer.show(); if (!OnboardingPrefManager.getInstance().isOneTimeNotificationStarted() && isFirstInstall) { @@ -2066,13 +2051,6 @@ private void showBraveRateDialog() { rateDialogFragment.show(getSupportFragmentManager(), BraveRateDialogFragment.TAG_FRAGMENT); } - private void showCrossPromotionalDialog() { - CrossPromotionalModalDialogFragment mCrossPromotionalModalDialogFragment = - new CrossPromotionalModalDialogFragment(); - mCrossPromotionalModalDialogFragment.show( - getSupportFragmentManager(), "CrossPromotionalModalDialogFragment"); - } - private void openYtInBraveDialog() { OpenYtInBraveDialogFragment mOpenYtInBraveDialogFragment = new OpenYtInBraveDialogFragment(); diff --git a/android/java/org/chromium/chrome/browser/onboarding/OnboardingPrefManager.java b/android/java/org/chromium/chrome/browser/onboarding/OnboardingPrefManager.java index 8486915e1a1d..2fa79c79ef0b 100644 --- a/android/java/org/chromium/chrome/browser/onboarding/OnboardingPrefManager.java +++ b/android/java/org/chromium/chrome/browser/onboarding/OnboardingPrefManager.java @@ -33,9 +33,7 @@ public class OnboardingPrefManager { private static final String PREF_ONBOARDING = "onboarding"; private static final String PREF_P3A_ONBOARDING = "p3a_onboarding"; - private static final String PREF_CROSS_PROMO_MODAL = "cross_promo_modal"; private static final String PREF_ONBOARDING_V2 = "onboarding_v2"; - private static final String PREF_NEXT_CROSS_PROMO_MODAL_DATE = "next_cross_promo_modal_date"; private static final String PREF_SEARCH_ENGINE_ONBOARDING = "search_engine_onboarding"; public static final String PREF_BRAVE_STATS = "brave_stats"; public static final String PREF_BRAVE_STATS_NOTIFICATION = "brave_stats_notification"; @@ -237,33 +235,6 @@ public void onboardingNotification() { } } - private long getNextCrossPromoModalDate() { - return mSharedPreferences.getLong(PREF_NEXT_CROSS_PROMO_MODAL_DATE, 0); - } - - public void setNextCrossPromoModalDate(long nextDate) { - SharedPreferences.Editor sharedPreferencesEditor = mSharedPreferences.edit(); - sharedPreferencesEditor.putLong(PREF_NEXT_CROSS_PROMO_MODAL_DATE, nextDate); - sharedPreferencesEditor.apply(); - } - - public void setCrossPromoModalShown(boolean isShown) { - SharedPreferences.Editor sharedPreferencesEditor = mSharedPreferences.edit(); - sharedPreferencesEditor.putBoolean(PREF_CROSS_PROMO_MODAL, isShown); - sharedPreferencesEditor.apply(); - } - - private boolean hasCrossPromoModalShown() { - return mSharedPreferences.getBoolean(PREF_CROSS_PROMO_MODAL, false); - } - - public boolean showCrossPromoModal() { - boolean shouldShow = !hasCrossPromoModalShown() - && (getNextCrossPromoModalDate() > 0 - && System.currentTimeMillis() > getNextCrossPromoModalDate()); - return shouldShow; - } - public static Map searchEngineMap = Map.ofEntries( Map.entry(GOOGLE, SearchEngineEnum.GOOGLE), diff --git a/android/java/res/drawable-hdpi/ic_cross_modal.png b/android/java/res/drawable-hdpi/ic_cross_modal.png deleted file mode 100644 index a88c777d4139..000000000000 Binary files a/android/java/res/drawable-hdpi/ic_cross_modal.png and /dev/null differ diff --git a/android/java/res/drawable-mdpi/ic_cross_modal.png b/android/java/res/drawable-mdpi/ic_cross_modal.png deleted file mode 100644 index fb858892fe2a..000000000000 Binary files a/android/java/res/drawable-mdpi/ic_cross_modal.png and /dev/null differ diff --git a/android/java/res/drawable-xhdpi/ic_cross_modal.png b/android/java/res/drawable-xhdpi/ic_cross_modal.png deleted file mode 100644 index 5a282a3d396c..000000000000 Binary files a/android/java/res/drawable-xhdpi/ic_cross_modal.png and /dev/null differ diff --git a/android/java/res/drawable-xxhdpi/ic_cross_modal.png b/android/java/res/drawable-xxhdpi/ic_cross_modal.png deleted file mode 100644 index 588ffe456689..000000000000 Binary files a/android/java/res/drawable-xxhdpi/ic_cross_modal.png and /dev/null differ diff --git a/android/java/res/drawable-xxxhdpi/ic_cross_modal.png b/android/java/res/drawable-xxxhdpi/ic_cross_modal.png deleted file mode 100644 index 7bb4f7e87147..000000000000 Binary files a/android/java/res/drawable-xxxhdpi/ic_cross_modal.png and /dev/null differ diff --git a/android/java/res/layout/fragment_cross_promotional_modal_dialog.xml b/android/java/res/layout/fragment_cross_promotional_modal_dialog.xml deleted file mode 100644 index c3449daf177c..000000000000 --- a/android/java/res/layout/fragment_cross_promotional_modal_dialog.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - diff --git a/browser/ui/android/strings/android_brave_strings.grd b/browser/ui/android/strings/android_brave_strings.grd index 0505968c9604..3551cb76cc4a 100644 --- a/browser/ui/android/strings/android_brave_strings.grd +++ b/browser/ui/android/strings/android_brave_strings.grd @@ -1708,12 +1708,6 @@ Are you sure you want to do this? No, thank you - - Brave works everywhere - - - Download Brave at brave.com on your laptop or tablet for a faster and more private web - Privacy protection