18
18
import org .chromium .base .Log ;
19
19
import org .chromium .chrome .R ;
20
20
import org .chromium .chrome .browser .BraveRewardsNativeWorker ;
21
+ import org .chromium .chrome .browser .init .AsyncInitializationActivity ;
21
22
import org .chromium .chrome .browser .rewards .BraveRewardsAmountChangeListener ;
22
23
import org .chromium .chrome .browser .rewards .BraveRewardsBannerInfo ;
23
24
import org .chromium .chrome .browser .rewards .BraveRewardsCreatorPanelFragment ;
26
27
import org .chromium .chrome .browser .rewards .BraveRewardsTipFailureFragment ;
27
28
import org .chromium .chrome .browser .rewards .BraveRewardsTippingPanelFragment ;
28
29
29
- public class BraveRewardsSiteBannerActivity
30
- extends FragmentActivity implements BraveRewardsTipConfirmationListener ,
31
- BraveRewardsAmountChangeListener , BraveRewardsObserver {
30
+ public class BraveRewardsSiteBannerActivity extends AsyncInitializationActivity
31
+ implements BraveRewardsTipConfirmationListener , BraveRewardsAmountChangeListener ,
32
+ BraveRewardsObserver {
32
33
private ToggleButton radio_tip_amount [] = new ToggleButton [3 ];
33
34
public static final String TAB_ID_EXTRA = "currentTabId" ;
34
35
public static final String IS_MONTHLY_CONTRIBUTION = "is_monthly_contribution" ;
@@ -60,10 +61,8 @@ public class BraveRewardsSiteBannerActivity
60
61
private static final String TAG = "TippingBanner" ;
61
62
62
63
@ Override
63
- protected void onCreate (Bundle savedInstanceState ) {
64
-
65
- //inflate
66
- super .onCreate (savedInstanceState );
64
+ protected void triggerLayoutInflation () {
65
+ // inflate
67
66
setContentView (R .layout .brave_rewards_site_banner );
68
67
mIsActivityIsActive = true ;
69
68
mProgressBar = findViewById (R .id .progressBar );
@@ -73,13 +72,16 @@ protected void onCreate(Bundle savedInstanceState) {
73
72
currentTabId_ = IntentUtils .safeGetIntExtra (getIntent (), TAB_ID_EXTRA , -1 );
74
73
mIsMonthlyContribution =
75
74
IntentUtils .safeGetBooleanExtra (getIntent (), IS_MONTHLY_CONTRIBUTION , false );
76
- if (savedInstanceState == null ) {
77
- mBraveRewardsNativeWorker .GetPublisherBanner (
78
- mBraveRewardsNativeWorker .GetPublisherId (currentTabId_ ));
79
- }
75
+ mBraveRewardsNativeWorker .GetPublisherBanner (
76
+ mBraveRewardsNativeWorker .GetPublisherId (currentTabId_ ));
80
77
clickOnCloseButton ();
81
78
}
82
79
80
+ @ Override
81
+ public boolean shouldStartGpuProcess () {
82
+ return true ;
83
+ }
84
+
83
85
private void clickOnCloseButton () {
84
86
View closeButton = findViewById (R .id .button_close );
85
87
closeButton .setOnClickListener ((v ) -> { finish (); });
0 commit comments