Skip to content

Commit

Permalink
android chromium-130 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikhil7174 committed Nov 3, 2024
1 parent 421be2f commit 03b874e
Show file tree
Hide file tree
Showing 7 changed files with 278 additions and 290 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public BraveNtpAdapter(Activity activity, OnBraveNtpListener onBraveNtpListener,
mIsNewsLoading = isNewsLoading;
mRecyclerViewHeight = recyclerViewHeight;
mIsTopSitesEnabled = isTopSitesEnabled;
mIsBraveStatsEnabled = isBraveStatsEnabled;
mIsBraveStatsEnabled = false;
mIsDisplayNewsFeed = false;
mIsDisplayNewsOptin = false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,21 @@ protected void onFinishInflate() {
// any shortcut causes the UrlBar to be focused. See ViewRootImpl.leaveTouchMode().
mScrollView.setDescendantFocusability(FOCUS_BEFORE_DESCENDANTS);

mVpnCta = findViewById(R.id.tv_try_vpn);
if (BraveVpnUtils.isVpnFeatureSupported(getContext())
&& !BraveVpnNativeWorker.getInstance().isPurchasedUser()) {
mVpnCta.setOnClickListener(
v -> {
if (!InternetConnection.isNetworkAvailable(getContext())) {
Toast.makeText(getContext(), R.string.no_internet, Toast.LENGTH_SHORT)
.show();
} else {
BraveVpnUtils.openBraveVpnPlansActivity(getContext());
}
});
} else {
mVpnCta.setVisibility(View.GONE);
}
// mVpnCta = findViewById(R.id.tv_try_vpn);
// if (BraveVpnUtils.isVpnFeatureSupported(getContext())
// && !BraveVpnNativeWorker.getInstance().isPurchasedUser()) {
// mVpnCta.setOnClickListener(
// v -> {
// if (!InternetConnection.isNetworkAvailable(getContext())) {
// Toast.makeText(getContext(), R.string.no_internet, Toast.LENGTH_SHORT)
// .show();
// } else {
// BraveVpnUtils.openBraveVpnPlansActivity(getContext());
// }
// });
// } else {
// mVpnCta.setVisibility(View.GONE);
// }
}

/**
Expand Down
20 changes: 10 additions & 10 deletions android/java/res/layout/new_tab_page_incognito.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
app:layout_constraintGuide_end="32dp" />

<!-- Keep the ID below as it's been tested in Chromium code by IncognitoNewTabPageStation. -->
<ImageView
<!-- <ImageView
android:id="@+id/new_tab_incognito_icon"
android:layout_width="@dimen/new_tab_page_incognito_logo_size"
android:layout_height="@dimen/new_tab_page_incognito_logo_size"
Expand All @@ -54,7 +54,7 @@
app:layout_constraintBottom_toBottomOf="@+id/title"
app:layout_constraintStart_toStartOf="@id/guideline_begin"
app:layout_constraintEnd_toStartOf="@+id/title"
/>
/> -->

<TextView
android:id="@+id/title"
Expand Down Expand Up @@ -160,7 +160,7 @@
app:layout_constraintEnd_toEndOf="@id/tv_second_title"
/>

<ImageView
<!-- <ImageView
android:id="@+id/iv_third_icon"
app:layout_constraintHorizontal_chainStyle="packed"
android:layout_width="@dimen/new_tab_page_incognito_icon_size"
Expand All @@ -171,9 +171,9 @@
app:layout_constraintTop_toTopOf="@+id/tv_third_title"
app:layout_constraintStart_toStartOf="@+id/guideline_begin"
app:layout_constraintEnd_toStartOf="@+id/tv_third_title"
/>
/> -->

<TextView
<!-- <TextView
android:id="@+id/tv_third_title"
style="@style/DefaultSemibold"
app:layout_constraintWidth_max="460dp"
Expand All @@ -186,9 +186,9 @@
app:layout_constraintBottom_toTopOf="@+id/tv_third_description"
app:layout_constraintStart_toEndOf="@id/iv_third_icon"
app:layout_constraintEnd_toEndOf="@id/guideline_end"
/>
/> -->

<TextView
<!-- <TextView
android:id="@+id/tv_third_description"
style="@style/DefaultRegular"
android:layout_width="0dp"
Expand All @@ -200,9 +200,9 @@
app:layout_constraintBottom_toTopOf="@+id/tv_try_vpn"
app:layout_constraintStart_toStartOf="@id/tv_third_title"
app:layout_constraintEnd_toEndOf="@id/tv_third_title"
/>
/> -->

<TextView
<!-- <TextView
android:id="@+id/tv_try_vpn"
style="@style/DefaultSemibold"
android:layout_width="0dp"
Expand All @@ -213,7 +213,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@id/tv_third_title"
app:layout_constraintEnd_toEndOf="@id/tv_third_title"
/>
/> -->

</androidx.constraintlayout.widget.ConstraintLayout>

Expand Down
Loading

0 comments on commit 03b874e

Please sign in to comment.