|
@@ -43,11 +43,13 @@ class AppAdapter(var context: Context, var data: ArrayList<AppInfo>) :
|
43
|
43
|
holder.mBinding.itemCv.setText(appInfo.name)
|
44
|
44
|
holder.mBinding.itemCv.setOnClickListener {
|
45
|
45
|
if (appInfo.packageName.equals(Const.CUSTOMSPEEDAPP)){
|
46
|
|
- StrategyUtils.clearMemory(context,data)
|
47
|
|
- Toaster.show(context.getString(R.string.speedend))
|
|
46
|
+ changePwdListener?.let {
|
|
47
|
+ it.clearMemory(context,data)
|
|
48
|
+ }
|
48
|
49
|
}else if (appInfo.packageName.equals(Const.CUSTOMCLEARAPP)){
|
49
|
|
- StrategyUtils.clearAppData(context)
|
50
|
|
- Toaster.show(context.getString(R.string.clearend))
|
|
50
|
+ changePwdListener?.let {
|
|
51
|
+ it.clearAppData(context)
|
|
52
|
+ }
|
51
|
53
|
}else if (appInfo.packageName.equals(Const.CUSTOMROTATIONAPP)){
|
52
|
54
|
val rotationAllowed = SystemUtil.isRotationAllowed(context)
|
53
|
55
|
ManageApplication.disallowSetAutoRotation(!rotationAllowed)
|
|
@@ -138,5 +140,7 @@ class AppAdapter(var context: Context, var data: ArrayList<AppInfo>) :
|
138
|
140
|
}
|
139
|
141
|
interface ChangePwdListener{
|
140
|
142
|
fun changeCode()
|
|
143
|
+ fun clearMemory(context: Context,data: List<AppInfo>)
|
|
144
|
+ fun clearAppData(context: Context)
|
141
|
145
|
}
|
142
|
146
|
}
|