Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
D
Data Recovery 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
Data Recovery White
Commits
a90b28a0
Commit
a90b28a0
authored
Jul 31, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
605a3b5a
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
880 additions
and
21 deletions
+880
-21
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+12
-0
data.json
app/src/main/assets/battery_scan/data.json
+1
-0
img_0.png
app/src/main/assets/battery_scan/images/img_0.png
+0
-0
img_1.png
app/src/main/assets/battery_scan/images/img_1.png
+0
-0
img_2.png
app/src/main/assets/battery_scan/images/img_2.png
+0
-0
BatteryActivity.kt
...com/base/datarecovery/activity/battery/BatteryActivity.kt
+174
-0
BatteryInfoAnimationActivity.kt
...recovery/activity/battery/BatteryInfoAnimationActivity.kt
+73
-0
LargeFileAnimationActivity.kt
...recovery/activity/largefile/LargeFileAnimationActivity.kt
+1
-1
FileScanResultActivity.kt
.../datarecovery/activity/recovery/FileScanResultActivity.kt
+1
-4
ConstObject.kt
app/src/main/java/com/base/datarecovery/bean/ConstObject.kt
+5
-0
HomeFragment.kt
.../main/java/com/base/datarecovery/fragment/HomeFragment.kt
+11
-7
BatteryReceiver.kt
...in/java/com/base/datarecovery/receiver/BatteryReceiver.kt
+39
-0
bg_4773ff_20.xml
app/src/main/res/drawable/bg_4773ff_20.xml
+6
-0
activity_battery.xml
app/src/main/res/layout/activity_battery.xml
+495
-0
activity_battery_info_animation.xml
app/src/main/res/layout/activity_battery_info_animation.xml
+51
-0
fragment_home.xml
app/src/main/res/layout/fragment_home.xml
+10
-9
capacity.png
app/src/main/res/mipmap-xxhdpi/capacity.png
+0
-0
current.png
app/src/main/res/mipmap-xxhdpi/current.png
+0
-0
electric.png
app/src/main/res/mipmap-xxhdpi/electric.png
+0
-0
fanhui_b.png
app/src/main/res/mipmap-xxhdpi/fanhui_b.png
+0
-0
h_battery.png
app/src/main/res/mipmap-xxhdpi/h_battery.png
+0
-0
technology.png
app/src/main/res/mipmap-xxhdpi/technology.png
+0
-0
temperature.png
app/src/main/res/mipmap-xxhdpi/temperature.png
+0
-0
tianchitu.png
app/src/main/res/mipmap-xxhdpi/tianchitu.png
+0
-0
voltage.png
app/src/main/res/mipmap-xxhdpi/voltage.png
+0
-0
loading_completed_w.json
app/src/main/res/raw/loading_completed_w.json
+1
-0
No files found.
app/src/main/AndroidManifest.xml
View file @
a90b28a0
...
...
@@ -50,6 +50,18 @@
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
<activity
android:name=
".activity.battery.BatteryActivity"
android:exported=
"false"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
<activity
android:name=
".activity.battery.BatteryInfoAnimationActivity"
android:exported=
"false"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
<activity
android:name=
".activity.appmanager.AppManagerActivity"
android:exported=
"false"
...
...
app/src/main/assets/battery_scan/data.json
0 → 100644
View file @
a90b28a0
{
"v"
:
"5.8.1"
,
"fr"
:
60
,
"ip"
:
0
,
"op"
:
240
,
"w"
:
720
,
"h"
:
1280
,
"nm"
:
"4a"
,
"ddd"
:
0
,
"assets"
:[{
"id"
:
"image_0"
,
"w"
:
498
,
"h"
:
497
,
"u"
:
"images/"
,
"p"
:
"img_0.png"
,
"e"
:
0
},{
"id"
:
"image_1"
,
"w"
:
498
,
"h"
:
251
,
"u"
:
"images/"
,
"p"
:
"img_1.png"
,
"e"
:
0
},{
"id"
:
"image_2"
,
"w"
:
419
,
"h"
:
513
,
"u"
:
"images/"
,
"p"
:
"img_2.png"
,
"e"
:
0
},{
"id"
:
"comp_0"
,
"nm"
:
"scan"
,
"fr"
:
60
,
"layers"
:[{
"ddd"
:
0
,
"ind"
:
1
,
"ty"
:
2
,
"nm"
:
"scan.png"
,
"cl"
:
"png"
,
"refId"
:
"image_0"
,
"sr"
:
1
,
"ks"
:{
"o"
:{
"a"
:
1
,
"k"
:[{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
0
,
"s"
:[
30
]},{
"i"
:{
"x"
:[
0.833
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
0
]},
"t"
:
15
,
"s"
:[
100
]},{
"i"
:{
"x"
:[
0.833
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
0
]},
"t"
:
222
,
"s"
:[
100
]},{
"t"
:
239
,
"s"
:[
0
]}],
"ix"
:
11
},
"r"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
10
},
"p"
:{
"a"
:
0
,
"k"
:[
360
,
552
,
0
],
"ix"
:
2
,
"l"
:
2
},
"a"
:{
"a"
:
0
,
"k"
:[
249
,
248.5
,
0
],
"ix"
:
1
,
"l"
:
2
},
"s"
:{
"a"
:
1
,
"k"
:[{
"i"
:{
"x"
:[
0.667
,
0.667
,
0.667
],
"y"
:[
0.731
,
0.731
,
-28.047
]},
"o"
:{
"x"
:[
0.333
,
0.333
,
0.333
],
"y"
:[
0
,
0
,
0
]},
"t"
:
0
,
"s"
:[
0
,
0
,
100
]},{
"i"
:{
"x"
:[
0.667
,
0.667
,
0.667
],
"y"
:[
0.52
,
0.52
,
3.935
]},
"o"
:{
"x"
:[
0.333
,
0.333
,
0.333
],
"y"
:[
-0.88
,
-0.88
,
10.562
]},
"t"
:
11
,
"s"
:[
108
,
108
,
100
]},{
"i"
:{
"x"
:[
0.667
,
0.667
,
0.667
],
"y"
:[
1
,
1
,
1
]},
"o"
:{
"x"
:[
0.333
,
0.333
,
0.333
],
"y"
:[
-1.081
,
-1.081
,
-2.202
]},
"t"
:
15
,
"s"
:[
96
,
96
,
100
]},{
"t"
:
18
,
"s"
:[
100
,
100
,
100
]}],
"ix"
:
6
,
"l"
:
2
}},
"ao"
:
0
,
"ip"
:
0
,
"op"
:
720
,
"st"
:
0
,
"bm"
:
0
},{
"ddd"
:
0
,
"ind"
:
2
,
"ty"
:
2
,
"nm"
:
"sm.png"
,
"cl"
:
"png"
,
"refId"
:
"image_1"
,
"sr"
:
1
,
"ks"
:{
"o"
:{
"a"
:
1
,
"k"
:[{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
17
,
"s"
:[
0
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
32
,
"s"
:[
100
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
47
,
"s"
:[
0
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
64
,
"s"
:[
100
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
81
,
"s"
:[
0
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
96
,
"s"
:[
0
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
111
,
"s"
:[
100
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
126
,
"s"
:[
0
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
143
,
"s"
:[
100
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
160
,
"s"
:[
0
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
175
,
"s"
:[
0
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
190
,
"s"
:[
100
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
205
,
"s"
:[
0
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
222
,
"s"
:[
100
]},{
"t"
:
239
,
"s"
:[
0
]}],
"ix"
:
11
},
"r"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
10
},
"p"
:{
"a"
:
1
,
"k"
:[{
"i"
:{
"x"
:
0.667
,
"y"
:
1
},
"o"
:{
"x"
:
0.333
,
"y"
:
0
},
"t"
:
17
,
"s"
:[
360
,
432
,
0
],
"to"
:[
0
,
80
,
0
],
"ti"
:[
0
,
0
,
0
]},{
"i"
:{
"x"
:
0.667
,
"y"
:
1
},
"o"
:{
"x"
:
0.333
,
"y"
:
0
},
"t"
:
47
,
"s"
:[
360
,
912
,
0
],
"to"
:[
0
,
0
,
0
],
"ti"
:[
0
,
80
,
0
]},{
"i"
:{
"x"
:
0.667
,
"y"
:
0.667
},
"o"
:{
"x"
:
0.333
,
"y"
:
0.333
},
"t"
:
81
,
"s"
:[
360
,
432
,
0
],
"to"
:[
0
,
0
,
0
],
"ti"
:[
0
,
0
,
0
]},{
"i"
:{
"x"
:
0.667
,
"y"
:
1
},
"o"
:{
"x"
:
0.333
,
"y"
:
0
},
"t"
:
96
,
"s"
:[
360
,
432
,
0
],
"to"
:[
0
,
80
,
0
],
"ti"
:[
0
,
0
,
0
]},{
"i"
:{
"x"
:
0.667
,
"y"
:
1
},
"o"
:{
"x"
:
0.333
,
"y"
:
0
},
"t"
:
126
,
"s"
:[
360
,
912
,
0
],
"to"
:[
0
,
0
,
0
],
"ti"
:[
0
,
80
,
0
]},{
"i"
:{
"x"
:
0.667
,
"y"
:
0.667
},
"o"
:{
"x"
:
0.333
,
"y"
:
0.333
},
"t"
:
160
,
"s"
:[
360
,
432
,
0
],
"to"
:[
0
,
0
,
0
],
"ti"
:[
0
,
0
,
0
]},{
"i"
:{
"x"
:
0.667
,
"y"
:
1
},
"o"
:{
"x"
:
0.333
,
"y"
:
0
},
"t"
:
175
,
"s"
:[
360
,
432
,
0
],
"to"
:[
0
,
80
,
0
],
"ti"
:[
0
,
0
,
0
]},{
"i"
:{
"x"
:
0.667
,
"y"
:
1
},
"o"
:{
"x"
:
0.333
,
"y"
:
0
},
"t"
:
205
,
"s"
:[
360
,
912
,
0
],
"to"
:[
0
,
0
,
0
],
"ti"
:[
0
,
80
,
0
]},{
"t"
:
239
,
"s"
:[
360
,
432
,
0
]}],
"ix"
:
2
,
"l"
:
2
},
"a"
:{
"a"
:
0
,
"k"
:[
249
,
125.5
,
0
],
"ix"
:
1
,
"l"
:
2
},
"s"
:{
"a"
:
0
,
"k"
:[
100
,
100
,
100
],
"ix"
:
6
,
"l"
:
2
}},
"ao"
:
0
,
"ip"
:
0
,
"op"
:
720
,
"st"
:
0
,
"bm"
:
0
}]}],
"layers"
:[{
"ddd"
:
0
,
"ind"
:
1
,
"ty"
:
0
,
"nm"
:
"scan"
,
"refId"
:
"comp_0"
,
"sr"
:
1
,
"ks"
:{
"o"
:{
"a"
:
0
,
"k"
:
100
,
"ix"
:
11
},
"r"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
10
},
"p"
:{
"a"
:
0
,
"k"
:[
360
,
640
,
0
],
"ix"
:
2
,
"l"
:
2
},
"a"
:{
"a"
:
0
,
"k"
:[
360
,
640
,
0
],
"ix"
:
1
,
"l"
:
2
},
"s"
:{
"a"
:
0
,
"k"
:[
100
,
100
,
100
],
"ix"
:
6
,
"l"
:
2
}},
"ao"
:
0
,
"w"
:
720
,
"h"
:
1280
,
"ip"
:
0
,
"op"
:
720
,
"st"
:
0
,
"bm"
:
0
},{
"ddd"
:
0
,
"ind"
:
2
,
"ty"
:
2
,
"nm"
:
"4-battery.png"
,
"cl"
:
"png"
,
"refId"
:
"image_2"
,
"sr"
:
1
,
"ks"
:{
"o"
:{
"a"
:
0
,
"k"
:
100
,
"ix"
:
11
},
"r"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
10
},
"p"
:{
"a"
:
0
,
"k"
:[
360
,
584
,
0
],
"ix"
:
2
,
"l"
:
2
},
"a"
:{
"a"
:
0
,
"k"
:[
209.5
,
256.5
,
0
],
"ix"
:
1
,
"l"
:
2
},
"s"
:{
"a"
:
0
,
"k"
:[
100
,
100
,
100
],
"ix"
:
6
,
"l"
:
2
}},
"ao"
:
0
,
"ip"
:
0
,
"op"
:
720
,
"st"
:
0
,
"bm"
:
0
}],
"markers"
:[]}
\ No newline at end of file
app/src/main/assets/battery_scan/images/img_0.png
0 → 100644
View file @
a90b28a0
1002 Bytes
app/src/main/assets/battery_scan/images/img_1.png
0 → 100644
View file @
a90b28a0
13.7 KB
app/src/main/assets/battery_scan/images/img_2.png
0 → 100644
View file @
a90b28a0
53.2 KB
app/src/main/java/com/base/datarecovery/activity/battery/BatteryActivity.kt
0 → 100644
View file @
a90b28a0
package
com.base.datarecovery.activity.battery
import
android.annotation.SuppressLint
import
android.content.Intent
import
android.content.IntentFilter
import
android.graphics.Color
import
android.os.BatteryManager
import
androidx.activity.addCallback
import
androidx.core.view.updatePadding
import
com.base.datarecovery.activity.ResultActivity
import
com.base.datarecovery.ads.AdmobMaxHelper
import
com.base.datarecovery.bean.ConstObject.BATTERY_INFO
import
com.base.datarecovery.databinding.ActivityBatteryBinding
import
com.base.datarecovery.help.BaseActivity
import
com.base.datarecovery.receiver.BatteryReceiver
import
com.base.datarecovery.utils.BarUtils
import
kotlin.math.abs
class
BatteryActivity
:
BaseActivity
<
ActivityBatteryBinding
>()
{
private
val
TAG
=
"BatteryActivity"
override
val
binding
:
ActivityBatteryBinding
by
lazy
{
ActivityBatteryBinding
.
inflate
(
layoutInflater
)
}
private
lateinit
var
batteryReceiver
:
BatteryReceiver
private
lateinit
var
mBatteryManager
:
BatteryManager
@SuppressLint
(
"SetTextI18n"
)
override
fun
initView
()
{
BarUtils
.
setStatusBarLightMode
(
this
,
true
)
BarUtils
.
setStatusBarColor
(
this
,
Color
.
parseColor
(
"#FAFAFA"
))
binding
.
root
.
updatePadding
(
top
=
BarUtils
.
getStatusBarHeight
())
batteryReceiver
=
BatteryReceiver
{
updateUi
()
}
registerReceiver
(
batteryReceiver
,
IntentFilter
().
apply
{
addAction
(
"android.intent.action.BATTERY_CHANGED"
)
})
mBatteryManager
=
getSystemService
(
BATTERY_SERVICE
)
as
BatteryManager
// getAverageCurrent()
//
// lifecycleScope.launch(Dispatchers.Main) {
// currentFlow.collectLatest {
// binding.tvElectric.text = "${it}mA"
// }
// }
// lifecycleScope.launch(Dispatchers.Main) {
// averageFlow.collectLatest {
// binding.tvCurrentAverage.text = "${it}mA"
// }
// }
AdmobMaxHelper
.
admobMaxShowNativeAd
(
this
,
binding
.
flAd
,
2
)
}
override
fun
initListener
()
{
super
.
initListener
()
onBackPressedDispatcher
.
addCallback
{
finishToMain
()
}
binding
.
flFanhui
.
setOnClickListener
{
onBackPressedDispatcher
.
onBackPressed
()
}
binding
.
tvFinish
.
setOnClickListener
{
startActivity
(
Intent
(
this
,
ResultActivity
::
class
.
java
).
apply
{
putExtra
(
"from"
,
BATTERY_INFO
)
})
finish
()
}
}
@SuppressLint
(
"SetTextI18n"
)
private
fun
updateUi
()
{
val
temperature
=
BatteryReceiver
.
temperature
/
10f
binding
.
tvTemperature
.
text
=
format
(
temperature
)
+
" °C"
binding
.
tvVoltage
.
text
=
"${format((BatteryReceiver.voltage / 1000f))} mV"
binding
.
tvTechnology
.
text
=
BatteryReceiver
.
technology
val
capacity
=
BatteryReceiver
.
mAh
.
toInt
()
binding
.
tvCapacity
.
text
=
"$capacity mAh"
val
currentNow
=
mBatteryManager
.
getIntProperty
(
BatteryManager
.
BATTERY_PROPERTY_CURRENT_NOW
)
binding
.
tvElectric
.
text
=
"${currentNow * 100} mA"
val
currentAverage
:
Int
=
mBatteryManager
.
getIntProperty
(
BatteryManager
.
BATTERY_PROPERTY_CURRENT_AVERAGE
)
binding
.
tvCurrentAverage
.
text
=
"${currentAverage * 100} mA"
val
hm
=
(
capacity
.
toFloat
()
/
(
currentNow
*
100f
))
binding
.
tvH
.
text
=
abs
(
hm
.
toInt
()).
toString
()
binding
.
tvM
.
text
=
abs
(((
hm
-
hm
.
toInt
())
*
60
).
toInt
()).
toString
()
}
private
fun
format
(
float
:
Float
):
String
{
return
"%.1f"
.
format
(
float
)
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
unregisterReceiver
(
batteryReceiver
)
}
// @SuppressLint("PrivateApi")
// fun getBatteryFilePath(): String {
// val systemProperties = Class.forName("android.os.SystemProperties")
// val getMethod = systemProperties.getDeclaredMethod("get", String::class.java)
// val platName = getMethod.invoke(null, "ro.hardware") as String
//
// LogEx.logDebug(TAG, "platName=$platName")
// val filePath: String = if (platName.startsWith("mt") || platName.startsWith("MT")) {
// "/sys/class/power_supply/battery/device/FG_Battery_CurrentConsumption"
// // MTK平台该值不区分充放电,都为负数
// } else if (platName.startsWith("qcom")) {
// "/sys/class/power_supply/battery/current_now"
// } else if (platName.startsWith("exynos"))
// "/sys/class/power_supply/battery/BatteryAverageCurrent"
// else {
// ""
// }
// LogEx.logDebug(TAG, "filePath=$filePath")
// return filePath
// }
// var mAverageFlow = MutableSharedFlow<Float>()
// val averageFlow: SharedFlow<Float> = mAverageFlow
//
// var mCurrentFlow = MutableSharedFlow<Int>()
// var currentFlow: SharedFlow<Int> = mCurrentFlow
// private fun getAverageCurrent(filePath: String = getBatteryFilePath()) {
// var sum = 0
// var loopCount = 0
// lifecycleScope.launch(Dispatchers.IO) {
// while (isActive) {
// val currentValue = readFileValue(filePath)
// mCurrentFlow.emit(currentValue)
// sum += currentValue
// loopCount++
// val average = sum / loopCount.toFloat()
// mAverageFlow.emit(average)
// delay(150)
// }
// }
// }
// private fun readFileValue(filePath: String): Int {
// var value = 0
// var br: BufferedReader? = null
// try {
// br = BufferedReader(FileReader(filePath))
// val line = br.readLine()
// value = line?.toInt() ?: 0
// LogEx.logDebug(TAG, "readFileValue value=$value")
// } catch (e: Exception) {
// e.printStackTrace()
// } finally {
// br?.close()
// }
// return value
// }
}
\ No newline at end of file
app/src/main/java/com/base/datarecovery/activity/battery/BatteryInfoAnimationActivity.kt
0 → 100644
View file @
a90b28a0
package
com.base.datarecovery.activity.battery
import
android.annotation.SuppressLint
import
android.content.Intent
import
android.view.View
import
android.widget.Toast
import
androidx.activity.addCallback
import
androidx.lifecycle.lifecycleScope
import
com.base.datarecovery.ads.AdmobMaxHelper
import
com.base.datarecovery.databinding.ActivityBatteryInfoAnimationBinding
import
com.base.datarecovery.help.BaseActivity
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.Job
import
kotlinx.coroutines.delay
import
kotlinx.coroutines.launch
import
kotlin.random.Random
class
BatteryInfoAnimationActivity
:
BaseActivity
<
ActivityBatteryInfoAnimationBinding
>()
{
override
val
binding
:
ActivityBatteryInfoAnimationBinding
by
lazy
{
ActivityBatteryInfoAnimationBinding
.
inflate
(
layoutInflater
)
}
private
var
job
:
Job
?
=
null
override
fun
initView
()
{
resumeLottie
()
}
override
fun
initListener
()
{
onBackPressedDispatcher
.
addCallback
{
Toast
.
makeText
(
this
@BatteryInfoAnimationActivity
,
"wait a moment"
,
Toast
.
LENGTH_SHORT
).
show
()
}
}
override
fun
onPause
()
{
super
.
onPause
()
binding
.
lottie
.
pauseAnimation
()
job
?.
cancel
()
job
=
null
}
override
fun
onResume
()
{
super
.
onResume
()
resumeLottie
()
if
(
job
?.
isActive
==
false
||
job
==
null
)
{
job
=
waitJob
()
}
}
private
fun
resumeLottie
()
{
binding
.
lottie
.
imageAssetsFolder
=
"battery_scan/images/"
binding
.
lottie
.
setAnimation
(
"battery_scan/data.json"
)
binding
.
lottie
.
playAnimation
()
}
@SuppressLint
(
"SetTextI18n"
)
private
fun
waitJob
()
=
lifecycleScope
.
launch
(
Dispatchers
.
Main
)
{
delay
(
Random
.
nextLong
(
3000
,
4500
))
binding
.
lottie
.
visibility
=
View
.
GONE
binding
.
lottieCompleted
.
visibility
=
View
.
VISIBLE
binding
.
lottieCompleted
.
playAnimation
()
binding
.
tv
.
text
=
"Completed!"
delay
(
1000
)
AdmobMaxHelper
.
admobMaxShowOpenAd
(
this
@BatteryInfoAnimationActivity
,
showBeforeAction
=
{})
{
binding
.
lottie
.
clearAnimation
()
startActivity
(
Intent
(
this
@BatteryInfoAnimationActivity
,
BatteryActivity
::
class
.
java
))
finish
()
}
}
}
\ No newline at end of file
app/src/main/java/com/base/datarecovery/activity/largefile/LargeFileAnimationActivity.kt
View file @
a90b28a0
...
...
@@ -32,7 +32,7 @@ class LargeFileAnimationActivity : BaseActivity<ActivityLargeFileAnimationBindin
}
fun
jumpJob
()
=
lifecycleScope
.
launch
(
Dispatchers
.
Main
)
{
private
fun
jumpJob
()
=
lifecycleScope
.
launch
(
Dispatchers
.
Main
)
{
delay
(
5000
)
binding
.
lottie
.
visibility
=
View
.
GONE
binding
.
lottie
.
clearAnimation
()
...
...
app/src/main/java/com/base/datarecovery/activity/recovery/FileScanResultActivity.kt
View file @
a90b28a0
...
...
@@ -10,7 +10,6 @@ import androidx.core.view.isVisible
import
androidx.lifecycle.lifecycleScope
import
com.base.datarecovery.adapter.FileFolderAdapter
import
com.base.datarecovery.ads.AdmobMaxHelper
import
com.base.datarecovery.ads.admob.AdmobInterstitialUtils
import
com.base.datarecovery.bean.ConstObject.SCAN_DOCUMENTS
import
com.base.datarecovery.bean.ConstObject.SCAN_PHOTOS
import
com.base.datarecovery.bean.ConstObject.SCAN_VIDEOS
...
...
@@ -28,12 +27,10 @@ import com.base.datarecovery.utils.LogEx
import
com.base.datarecovery.view.DialogViews.showExitFunctionDialog
import
com.base.datarecovery.view.DialogViews.showGerPermission
import
com.base.datarecovery.view.FileScanDialog
import
com.google.gson.Gson
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.channels.BufferOverflow
import
kotlinx.coroutines.flow.MutableSharedFlow
import
kotlinx.coroutines.flow.SharedFlow
import
kotlinx.coroutines.isActive
import
kotlinx.coroutines.launch
import
java.io.File
...
...
@@ -162,7 +159,7 @@ class FileScanResultActivity : BaseActivity<ActivityFileScanResultBinding>() {
lifecycleScope
.
launch
(
Dispatchers
.
Main
)
{
binding
.
ivWancheng
.
visibility
=
View
.
VISIBLE
binding
.
tvScanning
.
text
=
"Completed"
if
(
isActive
)
{
lifecycleScope
.
launchWhenResumed
{
AdmobMaxHelper
.
admobMaxShowInterstitialAd
(
this
@FileScanResultActivity
)
}
binding
.
flEmpty
.
isVisible
=
pathList
.
isEmpty
()
...
...
app/src/main/java/com/base/datarecovery/bean/ConstObject.kt
View file @
a90b28a0
...
...
@@ -14,6 +14,9 @@ object ConstObject {
const
val
ID_WHATSAPP_CLEANER
=
13006
const
val
ID_LARGE_FILE
=
13009
const
val
ID_APP_PROCESS
=
13011
const
val
ID_APP_MANAGER
=
12076
const
val
ID_BATTERY_INFO
=
12086
const
val
RECOVERY_PHOTOS
=
"Recovery Photos"
const
val
RECOVERY_VIDEOS
=
"Recovery Videos"
...
...
@@ -25,6 +28,8 @@ object ConstObject {
const
val
WHATSAPP_CLEANER
=
"Whatsapp Cleaner"
const
val
LARGE_FILE
=
"Large File"
const
val
APP_PROCESS
=
"App Process"
const
val
APP_MANAGER
=
"App Manager"
const
val
BATTERY_INFO
=
"Battery Info"
const
val
SCAN_PHOTOS
=
1
const
val
SCAN_DOCUMENTS
=
2
...
...
app/src/main/java/com/base/datarecovery/fragment/HomeFragment.kt
View file @
a90b28a0
...
...
@@ -7,10 +7,11 @@ import android.content.Intent
import
android.view.View
import
android.view.animation.AccelerateDecelerateInterpolator
import
com.base.datarecovery.activity.SettingActivity
import
com.base.datarecovery.activity.appmanager.AppManagerAnimationActivity
import
com.base.datarecovery.activity.appprocess.AppProcessAnimationActivity
import
com.base.datarecovery.activity.battery.BatteryInfoAnimationActivity
import
com.base.datarecovery.activity.junkclean.ScanJunkActivity
import
com.base.datarecovery.activity.largefile.LargeFileAnimationActivity
import
com.base.datarecovery.activity.photomanager.PhotoManagerAnimationActivity
import
com.base.datarecovery.activity.whatsapp.WhatsAppCleanerAnimationActivity
import
com.base.datarecovery.ads.AdmobMaxHelper
import
com.base.datarecovery.databinding.FragmentHomeBinding
...
...
@@ -40,18 +41,21 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
binding
.
cardCleanJunk
.
setOnClickListener
{
startActivity
(
Intent
(
requireContext
(),
ScanJunkActivity
::
class
.
java
))
}
binding
.
cardPhotosManager
.
setOnClickListener
{
startActivity
(
Intent
(
requireContext
(),
PhotoManagerAnimationActivity
::
class
.
java
))
}
binding
.
cardWhatsApp
.
setOnClickListener
{
startActivity
(
Intent
(
requireContext
(),
WhatsAppCleanerAnimationActivity
::
class
.
java
))
}
binding
.
cardLargeFile
.
setOnClickListener
{
startActivity
(
Intent
(
requireContext
(),
LargeFileAnimationActivity
::
class
.
java
))
}
binding
.
cardAppManager
.
setOnClickListener
{
startActivity
(
Intent
(
requireContext
(),
AppManagerAnimationActivity
::
class
.
java
))
}
binding
.
cardAppProcess
.
setOnClickListener
{
startActivity
(
Intent
(
requireContext
(),
AppProcessAnimationActivity
::
class
.
java
))
}
binding
.
card
LargeFile
.
setOnClickListener
{
startActivity
(
Intent
(
requireContext
(),
LargeFile
AnimationActivity
::
class
.
java
))
binding
.
card
BatteryInfo
.
setOnClickListener
{
startActivity
(
Intent
(
requireContext
(),
BatteryInfo
AnimationActivity
::
class
.
java
))
}
binding
.
flSetting
.
setOnClickListener
{
...
...
app/src/main/java/com/base/datarecovery/receiver/BatteryReceiver.kt
0 → 100644
View file @
a90b28a0
package
com.base.datarecovery.receiver
import
android.content.BroadcastReceiver
import
android.content.Context
import
android.content.Intent
import
android.os.BatteryManager
class
BatteryReceiver
(
private
val
change
:
()
->
Unit
)
:
BroadcastReceiver
()
{
companion
object
{
var
level
=
0
var
scale
=
0
var
voltage
=
0
var
temperature
=
0
var
mAh
=
0f
var
health
=
0
var
status
=
0
var
technology
=
""
//获取电池技术支持
}
override
fun
onReceive
(
context
:
Context
,
intent
:
Intent
)
{
if
(
intent
.
action
==
Intent
.
ACTION_BATTERY_CHANGED
)
{
level
=
intent
.
getIntExtra
(
"level"
,
0
)
scale
=
intent
.
getIntExtra
(
"scale"
,
0
)
voltage
=
intent
.
getIntExtra
(
"voltage"
,
0
)
temperature
=
intent
.
getIntExtra
(
"temperature"
,
0
)
technology
=
intent
.
getStringExtra
(
"technology"
).
toString
()
status
=
intent
.
getIntExtra
(
"status"
,
BatteryManager
.
BATTERY_STATUS_UNKNOWN
)
health
=
intent
.
getIntExtra
(
"health"
,
BatteryManager
.
BATTERY_HEALTH_UNKNOWN
)
val
batteryManager
=
context
.
getSystemService
(
Context
.
BATTERY_SERVICE
)
as
?
BatteryManager
?:
return
val
chargeCounter
=
batteryManager
.
getIntProperty
(
BatteryManager
.
BATTERY_PROPERTY_CHARGE_COUNTER
)
val
propertyCapacity
=
batteryManager
.
getIntProperty
(
BatteryManager
.
BATTERY_PROPERTY_CAPACITY
)
if
(
chargeCounter
!=
Int
.
MIN_VALUE
&&
propertyCapacity
!=
Int
.
MIN_VALUE
)
{
mAh
=
(
chargeCounter
/
(
propertyCapacity
.
toFloat
()
/
100f
))
/
1000f
}
change
.
invoke
()
}
}
}
\ No newline at end of file
app/src/main/res/drawable/bg_4773ff_20.xml
0 → 100644
View file @
a90b28a0
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"#4773FF"
/>
<corners
android:radius=
"20dp"
/>
</shape>
\ No newline at end of file
app/src/main/res/layout/activity_battery.xml
0 → 100644
View file @
a90b28a0
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/main"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#FAFAFA"
android:orientation=
"vertical"
>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
tools:ignore=
"UselessParent"
>
<FrameLayout
android:id=
"@+id/fl_fanhui"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:padding=
"15dp"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/fanhui_b"
tools:ignore=
"ContentDescription"
/>
</FrameLayout>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:text=
"Battery Info"
android:textColor=
"@color/black"
android:textSize=
"19sp"
android:textStyle=
"bold"
tools:ignore=
"HardcodedText"
/>
</FrameLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"16dp"
>
<LinearLayout
android:id=
"@+id/ll"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"20dp"
android:layout_marginTop=
"40dp"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
<TextView
android:id=
"@+id/tv_h"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"28sp"
android:textStyle=
"bold"
tools:text=
"00"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"8dp"
android:text=
"h"
android:textColor=
"@color/black"
android:textSize=
"16sp"
android:textStyle=
"bold"
tools:ignore=
"HardcodedText"
/>
<TextView
android:id=
"@+id/tv_m"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"12dp"
android:textSize=
"28sp"
android:textStyle=
"bold"
tools:text=
"00"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"8dp"
android:text=
"m"
android:textColor=
"@color/black"
android:textSize=
"16sp"
android:textStyle=
"bold"
tools:ignore=
"HardcodedText"
/>
</LinearLayout>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"28dp"
android:text=
"left with current power\ncosumption"
android:textColor=
"#666666"
android:textSize=
"15sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"@id/ll"
app:layout_constraintTop_toBottomOf=
"@id/ll"
tools:ignore=
"HardcodedText"
/>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"16dp"
android:layout_marginEnd=
"30dp"
android:src=
"@mipmap/tianchitu"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
tools:ignore=
"ContentDescription"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginHorizontal=
"8dp"
android:orientation=
"horizontal"
>
<androidx.cardview.widget.CardView
android:layout_width=
"0dp"
android:layout_height=
"90dp"
android:layout_marginHorizontal=
"8dp"
android:layout_marginVertical=
"6dp"
android:layout_weight=
"1"
app:cardBackgroundColor=
"@color/white"
app:cardCornerRadius=
"10dp"
app:cardElevation=
"0dp"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:src=
"@mipmap/temperature"
tools:ignore=
"ContentDescription"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_temperature"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/black"
android:textSize=
"18sp"
android:textStyle=
"bold"
tools:text=
"37.5°C"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"8dp"
android:text=
"Temperature"
android:textColor=
"#838383"
android:textSize=
"13sp"
tools:ignore=
"HardcodedText"
/>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_width=
"0dp"
android:layout_height=
"90dp"
android:layout_marginHorizontal=
"8dp"
android:layout_marginVertical=
"6dp"
android:layout_weight=
"1"
app:cardBackgroundColor=
"@color/white"
app:cardCornerRadius=
"10dp"
app:cardElevation=
"0dp"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:src=
"@mipmap/voltage"
tools:ignore=
"ContentDescription"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_voltage"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/black"
android:textSize=
"18sp"
android:textStyle=
"bold"
tools:text=
"3.6V"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"8dp"
android:text=
"Voltage"
android:textColor=
"#838383"
android:textSize=
"13sp"
tools:ignore=
"HardcodedText"
/>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginHorizontal=
"8dp"
android:orientation=
"horizontal"
>
<androidx.cardview.widget.CardView
android:layout_width=
"0dp"
android:layout_height=
"90dp"
android:layout_marginHorizontal=
"8dp"
android:layout_marginVertical=
"6dp"
android:layout_weight=
"1"
app:cardBackgroundColor=
"@color/white"
app:cardCornerRadius=
"10dp"
app:cardElevation=
"0dp"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:src=
"@mipmap/technology"
tools:ignore=
"ContentDescription"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_technology"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Li-Poly"
android:textColor=
"@color/black"
android:textSize=
"18sp"
android:textStyle=
"bold"
tools:ignore=
"HardcodedText"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"8dp"
android:text=
"Technology"
android:textColor=
"#838383"
android:textSize=
"13sp"
tools:ignore=
"HardcodedText"
/>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_width=
"0dp"
android:layout_height=
"90dp"
android:layout_marginHorizontal=
"8dp"
android:layout_marginVertical=
"6dp"
android:layout_weight=
"1"
app:cardBackgroundColor=
"@color/white"
app:cardCornerRadius=
"10dp"
app:cardElevation=
"0dp"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:src=
"@mipmap/capacity"
tools:ignore=
"ContentDescription"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_capacity"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/black"
android:textSize=
"18sp"
android:textStyle=
"bold"
tools:text=
"5000mAh"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"8dp"
android:text=
"Temperature"
android:textColor=
"#838383"
android:textSize=
"13sp"
tools:ignore=
"HardcodedText"
/>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginHorizontal=
"8dp"
android:orientation=
"horizontal"
>
<androidx.cardview.widget.CardView
android:layout_width=
"0dp"
android:layout_height=
"90dp"
android:layout_marginHorizontal=
"8dp"
android:layout_marginVertical=
"6dp"
android:layout_weight=
"1"
app:cardBackgroundColor=
"@color/white"
app:cardCornerRadius=
"10dp"
app:cardElevation=
"0dp"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:src=
"@mipmap/electric"
tools:ignore=
"ContentDescription"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_electric"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/black"
android:textSize=
"18sp"
android:textStyle=
"bold"
tools:text=
"263mA"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"8dp"
android:text=
"Electric Current"
android:textColor=
"#838383"
android:textSize=
"13sp"
tools:ignore=
"HardcodedText"
/>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_width=
"0dp"
android:layout_height=
"90dp"
android:layout_marginHorizontal=
"8dp"
android:layout_marginVertical=
"6dp"
android:layout_weight=
"1"
app:cardBackgroundColor=
"@color/white"
app:cardCornerRadius=
"10dp"
app:cardElevation=
"0dp"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:src=
"@mipmap/current"
tools:ignore=
"ContentDescription"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_current_average"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/black"
android:textSize=
"18sp"
android:textStyle=
"bold"
tools:text=
"23mA"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"8dp"
android:text=
"Current Average"
android:textColor=
"#838383"
android:textSize=
"13sp"
tools:ignore=
"HardcodedText"
/>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
>
<FrameLayout
android:id=
"@+id/fl_ad"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"16dp"
/>
</FrameLayout>
<TextView
android:id=
"@+id/tv_finish"
android:layout_width=
"290dp"
android:layout_height=
"50dp"
android:layout_gravity=
"center_horizontal"
android:layout_marginVertical=
"20dp"
android:background=
"@drawable/bg_4773ff_20"
android:gravity=
"center"
android:text=
"Finish"
android:textColor=
"@color/white"
android:textSize=
"19sp"
tools:ignore=
"HardcodedText"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/activity_battery_info_animation.xml
0 → 100644
View file @
a90b28a0
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/main"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#0ec897"
>
<com.base.datarecovery.view.XmlLottieAnimationView
android:id=
"@+id/lottie"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:adjustViewBounds=
"true"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:lottie_autoPlay=
"true"
app:lottie_loop=
"true"
/>
<com.base.datarecovery.view.XmlLottieAnimationView
android:id=
"@+id/lottie_completed"
android:layout_width=
"90dp"
android:layout_height=
"90dp"
android:layout_gravity=
"center"
android:visibility=
"gone"
app:layout_constraintBottom_toTopOf=
"@id/tv"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:lottie_autoPlay=
"false"
app:lottie_rawRes=
"@raw/loading_completed_w"
/>
<TextView
android:id=
"@+id/tv"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom|center_horizontal"
android:layout_marginBottom=
"250dp"
android:text=
"Wait a moment..."
android:textColor=
"@color/white"
android:textSize=
"16sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
tools:ignore=
"HardcodedText"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_home.xml
View file @
a90b28a0
...
...
@@ -256,7 +256,7 @@
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id=
"@+id/card_
photos
_manager"
android:id=
"@+id/card_
app
_manager"
android:layout_width=
"0dp"
android:layout_height=
"70dp"
android:layout_marginHorizontal=
"8dp"
...
...
@@ -279,7 +279,7 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:src=
"@mipmap/
photosmanager
"
android:src=
"@mipmap/
app
"
tools:ignore=
"ContentDescription"
/>
<TextView
...
...
@@ -287,7 +287,7 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:text=
"
Photos
\nManager"
android:text=
"
App
\nManager"
android:textColor=
"@color/black"
android:textSize=
"15sp"
tools:ignore=
"HardcodedText"
/>
...
...
@@ -297,6 +297,7 @@
</androidx.cardview.widget.CardView>
</LinearLayout>
<LinearLayout
...
...
@@ -308,7 +309,7 @@
<androidx.cardview.widget.CardView
android:id=
"@+id/card_app_
manager
"
android:id=
"@+id/card_app_
process
"
android:layout_width=
"0dp"
android:layout_height=
"70dp"
android:layout_marginHorizontal=
"8dp"
...
...
@@ -331,7 +332,7 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:src=
"@mipmap/
app
"
android:src=
"@mipmap/
h_appprocess
"
tools:ignore=
"ContentDescription"
/>
<TextView
...
...
@@ -339,7 +340,7 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:text=
"App
\nManager
"
android:text=
"App
Process
"
android:textColor=
"@color/black"
android:textSize=
"15sp"
tools:ignore=
"HardcodedText"
/>
...
...
@@ -350,7 +351,7 @@
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id=
"@+id/card_
app_process
"
android:id=
"@+id/card_
battery_info
"
android:layout_width=
"0dp"
android:layout_height=
"70dp"
android:layout_marginHorizontal=
"8dp"
...
...
@@ -373,7 +374,7 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:src=
"@mipmap/h_
appprocess
"
android:src=
"@mipmap/h_
battery
"
tools:ignore=
"ContentDescription"
/>
<TextView
...
...
@@ -381,7 +382,7 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:text=
"
App Process
"
android:text=
"
Battery Info
"
android:textColor=
"@color/black"
android:textSize=
"15sp"
tools:ignore=
"HardcodedText"
/>
...
...
app/src/main/res/mipmap-xxhdpi/capacity.png
0 → 100644
View file @
a90b28a0
4.64 KB
app/src/main/res/mipmap-xxhdpi/current.png
0 → 100644
View file @
a90b28a0
5.52 KB
app/src/main/res/mipmap-xxhdpi/electric.png
0 → 100644
View file @
a90b28a0
5.93 KB
app/src/main/res/mipmap-xxhdpi/fanhui_b.png
0 → 100644
View file @
a90b28a0
747 Bytes
app/src/main/res/mipmap-xxhdpi/h_battery.png
0 → 100644
View file @
a90b28a0
6.03 KB
app/src/main/res/mipmap-xxhdpi/technology.png
0 → 100644
View file @
a90b28a0
4.64 KB
app/src/main/res/mipmap-xxhdpi/temperature.png
0 → 100644
View file @
a90b28a0
5.71 KB
app/src/main/res/mipmap-xxhdpi/tianchitu.png
0 → 100644
View file @
a90b28a0
38.2 KB
app/src/main/res/mipmap-xxhdpi/voltage.png
0 → 100644
View file @
a90b28a0
5.8 KB
app/src/main/res/raw/loading_completed_w.json
0 → 100644
View file @
a90b28a0
{
"nm"
:
"Success Animation"
,
"ddd"
:
0
,
"h"
:
400
,
"w"
:
400
,
"meta"
:{
"g"
:
"@lottiefiles/toolkit-js 0.33.2"
},
"layers"
:[{
"ty"
:
4
,
"nm"
:
"Success_Tick"
,
"sr"
:
1
,
"st"
:
4.00000016292334
,
"op"
:
154.000006272549
,
"ip"
:
4.00000016292334
,
"hd"
:
false
,
"ddd"
:
0
,
"bm"
:
0
,
"hasMask"
:
false
,
"ao"
:
0
,
"ks"
:{
"a"
:{
"a"
:
0
,
"k"
:[
29
,
-36
,
0
],
"ix"
:
1
},
"s"
:{
"a"
:
0
,
"k"
:[
100
,
100
,
100
],
"ix"
:
6
},
"sk"
:{
"a"
:
0
,
"k"
:
0
},
"p"
:{
"a"
:
0
,
"k"
:[
205.75
,
194.75
,
0
],
"ix"
:
2
},
"r"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
10
},
"sa"
:{
"a"
:
0
,
"k"
:
0
},
"o"
:{
"a"
:
0
,
"k"
:
100
,
"ix"
:
11
}},
"ef"
:[],
"shapes"
:[{
"ty"
:
"gr"
,
"bm"
:
0
,
"hd"
:
false
,
"mn"
:
"ADBE Vector Group"
,
"nm"
:
"Shape 1"
,
"ix"
:
1
,
"cix"
:
2
,
"np"
:
3
,
"it"
:[{
"ty"
:
"sh"
,
"bm"
:
0
,
"hd"
:
false
,
"mn"
:
"ADBE Vector Shape - Group"
,
"nm"
:
"Path 1"
,
"ix"
:
1
,
"d"
:
1
,
"ks"
:{
"a"
:
0
,
"k"
:{
"c"
:
false
,
"i"
:[[
0
,
0
],[
0
,
0
],[
0
,
0
]],
"o"
:[[
0
,
0
],[
0
,
0
],[
0
,
0
]],
"v"
:[[
-48
,
-34
],[
2
,
16
],[
94.5
,
-77.5
]]},
"ix"
:
2
}},{
"ty"
:
"st"
,
"bm"
:
0
,
"hd"
:
false
,
"mn"
:
"ADBE Vector Graphic - Stroke"
,
"nm"
:
"Stroke 1"
,
"lc"
:
2
,
"lj"
:
2
,
"ml"
:
1
,
"o"
:{
"a"
:
0
,
"k"
:
100
,
"ix"
:
4
},
"w"
:{
"a"
:
1
,
"k"
:[{
"o"
:{
"x"
:
0.333
,
"y"
:
0
},
"i"
:{
"x"
:
0.146
,
"y"
:
1
},
"s"
:[
15
],
"t"
:
4
},{
"s"
:[
30
],
"t"
:
25.0000010182709
}],
"ix"
:
5
},
"c"
:{
"a"
:
0
,
"k"
:[
1
,
1
,
1
],
"ix"
:
3
}},{
"ty"
:
"tr"
,
"a"
:{
"a"
:
0
,
"k"
:[
0
,
0
],
"ix"
:
1
},
"s"
:{
"a"
:
0
,
"k"
:[
100
,
100
],
"ix"
:
3
},
"sk"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
4
},
"p"
:{
"a"
:
0
,
"k"
:[
0
,
0
],
"ix"
:
2
},
"r"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
6
},
"sa"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
5
},
"o"
:{
"a"
:
0
,
"k"
:
100
,
"ix"
:
7
}}]},{
"ty"
:
"tm"
,
"bm"
:
0
,
"hd"
:
false
,
"mn"
:
"ADBE Vector Filter - Trim"
,
"nm"
:
"Trim Paths 1"
,
"ix"
:
2
,
"e"
:{
"a"
:
1
,
"k"
:[{
"o"
:{
"x"
:
0.333
,
"y"
:
0
},
"i"
:{
"x"
:
0.113
,
"y"
:
1
},
"s"
:[
0
],
"t"
:
4
},{
"s"
:[
100
],
"t"
:
25.0000010182709
}],
"ix"
:
2
},
"o"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
3
},
"s"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
1
},
"m"
:
1
}],
"ind"
:
1
},{
"ty"
:
4
,
"nm"
:
"Circle"
,
"sr"
:
1
,
"st"
:
0
,
"op"
:
150.000006109625
,
"ip"
:
0
,
"hd"
:
false
,
"ddd"
:
0
,
"bm"
:
0
,
"hasMask"
:
false
,
"ao"
:
0
,
"ks"
:{
"a"
:{
"a"
:
0
,
"k"
:[
30.765
,
23.931
,
0
],
"ix"
:
1
},
"s"
:{
"a"
:
0
,
"k"
:[
100
,
100
,
100
],
"ix"
:
6
},
"sk"
:{
"a"
:
0
,
"k"
:
0
},
"p"
:{
"a"
:
0
,
"k"
:[
200
,
200
,
0
],
"ix"
:
2
},
"r"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
10
},
"sa"
:{
"a"
:
0
,
"k"
:
0
},
"o"
:{
"a"
:
0
,
"k"
:
100
,
"ix"
:
11
}},
"ef"
:[{
"ty"
:
22
,
"mn"
:
"ADBE Stroke"
,
"nm"
:
"Stroke"
,
"ix"
:
1
,
"en"
:
1
,
"ef"
:[{
"ty"
:
10
,
"mn"
:
"ADBE Stroke-0001"
,
"nm"
:
"Path"
,
"ix"
:
1
,
"v"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
1
}},{
"ty"
:
7
,
"mn"
:
"ADBE Stroke-0010"
,
"nm"
:
"All Masks"
,
"ix"
:
2
,
"v"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
2
}},{
"ty"
:
7
,
"mn"
:
"ADBE Stroke-0011"
,
"nm"
:
"Stroke Sequentially"
,
"ix"
:
3
,
"v"
:{
"a"
:
0
,
"k"
:
1
,
"ix"
:
3
}},{
"ty"
:
2
,
"mn"
:
"ADBE Stroke-0002"
,
"nm"
:
"Color"
,
"ix"
:
4
,
"v"
:{
"a"
:
0
,
"k"
:[
1
,
1
,
1
],
"ix"
:
4
}},{
"ty"
:
0
,
"mn"
:
"ADBE Stroke-0003"
,
"nm"
:
"Brush Size"
,
"ix"
:
5
,
"v"
:{
"a"
:
0
,
"k"
:
2
,
"ix"
:
5
}},{
"ty"
:
0
,
"mn"
:
"ADBE Stroke-0004"
,
"nm"
:
"Brush Hardness"
,
"ix"
:
6
,
"v"
:{
"a"
:
0
,
"k"
:
0.75
,
"ix"
:
6
}},{
"ty"
:
0
,
"mn"
:
"ADBE Stroke-0005"
,
"nm"
:
"Opacity"
,
"ix"
:
7
,
"v"
:{
"a"
:
0
,
"k"
:
1
,
"ix"
:
7
}},{
"ty"
:
0
,
"mn"
:
"ADBE Stroke-0008"
,
"nm"
:
"Start"
,
"ix"
:
8
,
"v"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
8
}},{
"ty"
:
0
,
"mn"
:
"ADBE Stroke-0009"
,
"nm"
:
"End"
,
"ix"
:
9
,
"v"
:{
"a"
:
0
,
"k"
:
100
,
"ix"
:
9
}},{
"ty"
:
7
,
"mn"
:
"ADBE Stroke-0006"
,
"nm"
:
"Spacing"
,
"ix"
:
10
,
"v"
:{
"a"
:
0
,
"k"
:
15
,
"ix"
:
10
}},{
"ty"
:
7
,
"mn"
:
"ADBE Stroke-0007"
,
"nm"
:
"Paint Style"
,
"ix"
:
11
,
"v"
:{
"a"
:
0
,
"k"
:
1
,
"ix"
:
11
}}]}],
"shapes"
:[{
"ty"
:
"gr"
,
"bm"
:
0
,
"hd"
:
false
,
"mn"
:
"ADBE Vector Group"
,
"nm"
:
"Ellipse 1"
,
"ix"
:
1
,
"cix"
:
2
,
"np"
:
3
,
"it"
:[{
"ty"
:
"el"
,
"bm"
:
0
,
"hd"
:
false
,
"mn"
:
"ADBE Vector Shape - Ellipse"
,
"nm"
:
"Ellipse Path 1"
,
"d"
:
1
,
"p"
:{
"a"
:
0
,
"k"
:[
0
,
0
],
"ix"
:
3
},
"s"
:{
"a"
:
0
,
"k"
:[
318.933
,
318.933
],
"ix"
:
2
}},{
"ty"
:
"st"
,
"bm"
:
0
,
"hd"
:
false
,
"mn"
:
"ADBE Vector Graphic - Stroke"
,
"nm"
:
"Stroke 1"
,
"lc"
:
2
,
"lj"
:
1
,
"ml"
:
4
,
"o"
:{
"a"
:
0
,
"k"
:
100
,
"ix"
:
4
},
"w"
:{
"a"
:
1
,
"k"
:[{
"o"
:{
"x"
:
0.333
,
"y"
:
0
},
"i"
:{
"x"
:
0.188
,
"y"
:
1
},
"s"
:[
50
],
"t"
:
0
},{
"s"
:[
20
],
"t"
:
20.0000008146167
}],
"ix"
:
5
},
"c"
:{
"a"
:
0
,
"k"
:[
1
,
1
,
1
],
"ix"
:
3
}},{
"ty"
:
"tr"
,
"a"
:{
"a"
:
0
,
"k"
:[
0
,
0
],
"ix"
:
1
},
"s"
:{
"a"
:
0
,
"k"
:[
100
,
100
],
"ix"
:
3
},
"sk"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
4
},
"p"
:{
"a"
:
0
,
"k"
:[
30.765
,
23.931
],
"ix"
:
2
},
"r"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
6
},
"sa"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
5
},
"o"
:{
"a"
:
0
,
"k"
:
100
,
"ix"
:
7
}}]},{
"ty"
:
"tm"
,
"bm"
:
0
,
"hd"
:
false
,
"mn"
:
"ADBE Vector Filter - Trim"
,
"nm"
:
"Trim Paths 1"
,
"ix"
:
2
,
"e"
:{
"a"
:
0
,
"k"
:
100
,
"ix"
:
2
},
"o"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
3
},
"s"
:{
"a"
:
1
,
"k"
:[{
"o"
:{
"x"
:
0.333
,
"y"
:
0
},
"i"
:{
"x"
:
0.096
,
"y"
:
1
},
"s"
:[
100
],
"t"
:
0
},{
"s"
:[
0
],
"t"
:
20.0000008146167
}],
"ix"
:
1
},
"m"
:
1
}],
"ind"
:
2
}],
"v"
:
"5.7.4"
,
"fr"
:
29.9700012207031
,
"op"
:
30.0000012219251
,
"ip"
:
0
,
"assets"
:[]}
\ No newline at end of file
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