Skip to content

Commit

Permalink
Merge pull request #82 from crypto-das/android_support
Browse files Browse the repository at this point in the history
Better Android support
  • Loading branch information
deemru authored Feb 21, 2024
2 parents 8350332 + 7c8c9ce commit d6c944f
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 24 deletions.
15 changes: 11 additions & 4 deletions build_android/chromium-gost-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,23 @@ git am --3way --ignore-space-change < $CHROMIUM_GOST_REPO/patch/android.patch ||

perl -pi -e "s/Chromium/Chromium-Gost/g" chrome/app/chromium_strings.grd
perl -pi -e "s/Chromium/Chromium-Gost/g" chrome/app/resources/chromium_strings*.xtb
cp -f $CHROMIUM_GOST_REPO/extra/exit_0.sh chrome/installer/linux/common/repo.cron
cp -f $CHROMIUM_GOST_REPO/extra/exit_0.sh chrome/installer/linux/common/rpmrepo.cron

cp -f $CHROMIUM_GOST_REPO/extra/product_logo/*.png chrome/app/theme/chromium/
cp -f $CHROMIUM_GOST_REPO/extra/product_logo/*.png chrome/app/theme/chromium/linux/
cp -f $CHROMIUM_GOST_REPO/extra/product_logo/product_logo_16.png chrome/app/theme/default_100_percent/chromium/product_logo_16.png
cp -f $CHROMIUM_GOST_REPO/extra/product_logo/product_logo_32.png chrome/app/theme/default_100_percent/chromium/product_logo_32.png
cp -f $CHROMIUM_GOST_REPO/extra/product_logo/product_logo_32.png chrome/app/theme/default_200_percent/chromium/product_logo_16.png
cp -f $CHROMIUM_GOST_REPO/extra/product_logo/product_logo_64.png chrome/app/theme/default_200_percent/chromium/product_logo_32.png
cp -f $CHROMIUM_GOST_REPO/extra/product_logo/product_logo_32.xpm chrome/app/theme/chromium/linux/product_logo_32.xpm

cp -f $CHROMIUM_GOST_REPO/extra/res_chromium_base/mipmap-hdpi/app_icon.png chrome/android/java/res_chromium_base/mipmap-hdpi/app_icon.png
cp -f $CHROMIUM_GOST_REPO/extra/res_chromium_base/mipmap-hdpi/layered_app_icon.png chrome/android/java/res_chromium_base/mipmap-hdpi/layered_app_icon.png
cp -f $CHROMIUM_GOST_REPO/extra/res_chromium_base/mipmap-mdpi/app_icon.png chrome/android/java/res_chromium_base/mipmap-mdpi/app_icon.png
cp -f $CHROMIUM_GOST_REPO/extra/res_chromium_base/mipmap-mdpi/layered_app_icon.png chrome/android/java/res_chromium_base/mipmap-mdpi/layered_app_icon.png
cp -f $CHROMIUM_GOST_REPO/extra/res_chromium_base/mipmap-xhdpi/app_icon.png chrome/android/java/res_chromium_base/mipmap-xhdpi/app_icon.png
cp -f $CHROMIUM_GOST_REPO/extra/res_chromium_base/mipmap-xhdpi/layered_app_icon.png chrome/android/java/res_chromium_base/mipmap-xhdpi/layered_app_icon.png
cp -f $CHROMIUM_GOST_REPO/extra/res_chromium_base/mipmap-xxhdpi/app_icon.png chrome/android/java/res_chromium_base/mipmap-xxhdpi/app_icon.png
cp -f $CHROMIUM_GOST_REPO/extra/res_chromium_base/mipmap-xxhdpi/layered_app_icon.png chrome/android/java/res_chromium_base/mipmap-xxhdpi/layered_app_icon.png
cp -f $CHROMIUM_GOST_REPO/extra/res_chromium_base/mipmap-xxxhdpi/app_icon.png chrome/android/java/res_chromium_base/mipmap-xxxhdpi/app_icon.png
cp -f $CHROMIUM_GOST_REPO/extra/res_chromium_base/mipmap-xxxhdpi/layered_app_icon.png chrome/android/java/res_chromium_base/mipmap-xxxhdpi/layered_app_icon.png

cp -f $CHROMIUM_GOST_REPO/extra/favicon_ntp_16.png chrome/app/theme/default_100_percent/common/favicon_ntp.png
cp -f $CHROMIUM_GOST_REPO/extra/favicon_ntp_32.png chrome/app/theme/default_200_percent/common/favicon_ntp.png
Expand Down
Binary file added extra/res_chromium_base/mipmap-hdpi/app_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added extra/res_chromium_base/mipmap-mdpi/app_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added extra/res_chromium_base/mipmap-xhdpi/app_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 21 additions & 20 deletions patch/android.patch
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,23 @@ index 54c50b54bb7ca..0f00e512bc425 100644
forward_variables_from(invoker,
"*",
TESTONLY_AND_VISIBILITY + [
diff --git a/chrome/android/java/res_chromium_base/values/channel_constants.xml b/chrome/android/java/res_chromium_base/values/channel_constants.xml
index cc1f2a30cb3c5..3953c9ad3800f 100644
--- a/chrome/android/java/res_chromium_base/values/channel_constants.xml
+++ b/chrome/android/java/res_chromium_base/values/channel_constants.xml
@@ -7,8 +7,8 @@ found in the LICENSE file.

<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The application name displayed to the user. -->
- <string name="app_name" translatable="false">Chromium</string>
- <string name="bookmark_widget_title" translatable="false">Chromium bookmarks</string>
- <string name="search_widget_title" translatable="false">Chromium search</string>
- <string name="quick_action_search_widget_title" translatable="false">Chromium quick action search</string>
+ <string name="app_name" translatable="false">Chromium-Gost</string>
+ <string name="bookmark_widget_title" translatable="false">Chromium-Gost bookmarks</string>
+ <string name="search_widget_title" translatable="false">Chromium-Gost search</string>
+ <string name="quick_action_search_widget_title" translatable="false">Chromium-Gost quick action search</string>
</resources>
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
index 74e852c79190b..2f5afed5e07f2 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
Expand Down Expand Up @@ -80,32 +97,16 @@ index 74e852c79190b..2f5afed5e07f2 100644
}

@Override
diff --git a/chrome/browser/search_engines/ui_thread_search_terms_data.h b/chrome/browser/search_engines/ui_thread_search_terms_data.h
index 89658e9aa7b7e..8ad2461605751 100644
--- a/chrome/browser/search_engines/ui_thread_search_terms_data.h
+++ b/chrome/browser/search_engines/ui_thread_search_terms_data.h
@@ -28,7 +28,7 @@ class UIThreadSearchTermsData : public SearchTermsData {
std::string GoogleImageSearchSource() const override;

#if BUILDFLAG(IS_ANDROID)
- std::string GetYandexReferralID() const override;
+// std::string GetYandexReferralID() const override;
std::string GetMailRUReferralID() const override;
#endif

diff --git a/chrome/browser/search_engines/ui_thread_search_terms_data_android.cc b/chrome/browser/search_engines/ui_thread_search_terms_data_android.cc
index 1278f9e64ed1f..79b5c56dfb04a 100644
index 1278f9e64ed1f..caf77c47e85b9 100644
--- a/chrome/browser/search_engines/ui_thread_search_terms_data_android.cc
+++ b/chrome/browser/search_engines/ui_thread_search_terms_data_android.cc
@@ -30,9 +30,11 @@ std::string UIThreadSearchTermsData::GetSearchClient() const {
return SearchTermsDataAndroid::search_client_.Get();
@@ -31,7 +31,7 @@ std::string UIThreadSearchTermsData::GetSearchClient() const {
}

+#if 0
std::string UIThreadSearchTermsData::GetYandexReferralID() const {
return LocaleManager::GetYandexReferralID();
- return LocaleManager::GetYandexReferralID();
+ return "5476077";
}
+#endif

std::string UIThreadSearchTermsData::GetMailRUReferralID() const {
return LocaleManager::GetMailRUReferralID();

0 comments on commit d6c944f

Please sign in to comment.