|
@@ -82,22 +82,20 @@ class AppAdapter(var context: Context, var data: ArrayList<AppInfo>) :
|
82
|
82
|
}
|
83
|
83
|
var destroyFlag=false
|
84
|
84
|
try {
|
85
|
|
- /* val launchIntent = Intent()
|
86
|
|
- launchIntent.setComponent(
|
87
|
|
- ComponentName(
|
88
|
|
- Const.STOREAPPPKG,
|
89
|
|
- Const.STOREAPPPKG+".MainActivity"
|
90
|
|
- )
|
91
|
|
- )
|
92
|
|
- context.startActivity(launchIntent)*/
|
93
|
|
- val intent: Intent? =
|
94
|
|
- context.getPackageManager().getLaunchIntentForPackage(Const.STOREAPPPKG)
|
95
|
|
- if (intent != null) {
|
96
|
|
- intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
97
|
|
- context.startActivity(intent)
|
98
|
|
- destroyFlag=true
|
|
85
|
+ val appTimeStrategy = StrategyUtils.getAppTimeStrategy(context, appInfo.packageName)
|
|
86
|
+ if (appTimeStrategy){
|
|
87
|
+ val intent: Intent? =
|
|
88
|
+ context.getPackageManager().getLaunchIntentForPackage(Const.STOREAPPPKG)
|
|
89
|
+ if (intent != null) {
|
|
90
|
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
|
91
|
+ intent.putExtra("isInstalling",InstallUtils.isInstalling)
|
|
92
|
+ context.startActivity(intent)
|
|
93
|
+ destroyFlag=true
|
|
94
|
+ }else{
|
|
95
|
+ destroyFlag=false
|
|
96
|
+ }
|
99
|
97
|
}else{
|
100
|
|
- destroyFlag=false
|
|
98
|
+ Toaster.showLong(context.getString(R.string.apptimestoptips))
|
101
|
99
|
}
|
102
|
100
|
}catch (e:Exception){
|
103
|
101
|
destroyFlag=false
|