Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
B
Browser White
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
Browser White
Commits
19c19084
Commit
19c19084
authored
Sep 06, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
33208aac
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
7 deletions
+21
-7
AdmobMaxHelper.kt
...src/main/java/com/base/browserwhite/ads/AdmobMaxHelper.kt
+3
-2
NotificationUiUtil.kt
...main/java/com/base/browserwhite/fcm/NotificationUiUtil.kt
+4
-1
WebBrowserActivity.kt
...browserwhite/ui/activity/webbrowser/WebBrowserActivity.kt
+10
-1
notification_constellation_small.xml
app/src/main/res/layout/notification_constellation_small.xml
+2
-1
notification_usage_report_small.xml
app/src/main/res/layout/notification_usage_report_small.xml
+2
-2
No files found.
app/src/main/java/com/base/browserwhite/ads/AdmobMaxHelper.kt
View file @
19c19084
...
...
@@ -38,8 +38,9 @@ object AdmobMaxHelper {
var
lastShowInter
=
0L
private
fun
getSpAdmobTrueMaxFalse
():
Boolean
{
val
ss
=
AppPreferences
.
getInstance
().
getString
(
"admobTrueMaxFalse"
,
"1"
).
toInt
()
return
ss
==
1
// val ss = AppPreferences.getInstance().getString("admobTrueMaxFalse", "1").toInt()
// return ss == 1
return
true
}
fun
showBackInterAdSp
():
Boolean
{
...
...
app/src/main/java/com/base/browserwhite/fcm/NotificationUiUtil.kt
View file @
19c19084
...
...
@@ -38,6 +38,7 @@ import com.base.browserwhite.ui.activity.splash.Splash2Activity
import
com.base.browserwhite.utils.AppPreferences
import
com.base.browserwhite.utils.ImageUtils.getBitmapFromURL
import
com.base.browserwhite.utils.KotlinExt.toFormatSize
import
com.base.browserwhite.utils.KotlinExt.toFormatTime
import
com.base.browserwhite.utils.LogEx
import
com.base.browserwhite.utils.RamUtils.ramPair
import
com.base.browserwhite.utils.TimeUtils.formatATime
...
...
@@ -201,6 +202,8 @@ object NotificationUiUtil {
ID_USAGE_REPORT
->
{
//使用报告
val
smallRemoteViews
=
RemoteViews
(
context
.
packageName
,
R
.
layout
.
notification_usage_report_small
)
smallRemoteViews
.
setTextViewText
(
R
.
id
.
tv_tittle_1
,
"${System.currentTimeMillis().toFormatTime()} Usage Report"
)
val
bigRemoteViews
=
RemoteViews
(
context
.
packageName
,
R
.
layout
.
notification_usage_report_big
)
val
pm
=
context
.
packageManager
val
apps
=
AppProcessActivity
.
fastGetAppIcon
(
context
)
...
...
@@ -370,7 +373,7 @@ object NotificationUiUtil {
if
(
actionId
==
ID_CONSTELLATION
)
{
AppPreferences
.
getInstance
().
put
(
"last_constellation_notification_time"
,
System
.
currentTimeMillis
())
}
if
(
actionId
==
ID_USAGE_REPORT
)
{
if
(
actionId
==
ID_USAGE_REPORT
)
{
AppPreferences
.
getInstance
().
put
(
"last_usage_notification_time"
,
System
.
currentTimeMillis
())
}
}
...
...
app/src/main/java/com/base/browserwhite/ui/activity/webbrowser/WebBrowserActivity.kt
View file @
19c19084
...
...
@@ -217,7 +217,16 @@ class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() {
}
}
binding
.
ivHome
.
setOnClickListener
{
finishToMain
()
if
(
System
.
currentTimeMillis
()
-
lastShowInter
>
40
*
1000
*
1000
||
lastShowInter
==
0L
)
{
AdmobMaxHelper
.
admobMaxShowInterstitialAd
(
this
@WebBrowserActivity
,
false
)
{
if
(
it
)
{
lastShowInter
=
System
.
currentTimeMillis
()
}
finishToMain
()
}
}
else
{
finishToMain
()
}
}
binding
.
flSearchEngine
.
setOnClickListener
{
showSearchEngineDialog
{
website
->
...
...
app/src/main/res/layout/notification_constellation_small.xml
View file @
19c19084
...
...
@@ -23,7 +23,8 @@
android:layout_weight=
"1"
android:textColor=
"@color/black"
android:textSize=
"14sp"
tools:text=
"Check out your luck today!"
/>
android:text=
"Check out your luck today!"
tools:ignore=
"HardcodedText"
/>
<TextView
android:id=
"@+id/tv_btn"
...
...
app/src/main/res/layout/notification_usage_report_small.xml
View file @
19c19084
...
...
@@ -35,9 +35,9 @@
android:id=
"@+id/tv_tittle_2"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"View the apps that generate the most garbage"
android:textColor=
"#898989"
android:textSize=
"12sp"
tools:text=
"View the apps that generate the most garbage"
/>
android:textSize=
"12sp"
/>
</LinearLayout>
<TextView
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment