@@ -161,7 +161,6 @@ class AppHelper @Inject constructor() {
161
161
162
162
val intent = Intent ()
163
163
intent.component = ComponentName (packageName, className)
164
- intent.flags = Intent .FLAG_ACTIVITY_NEW_TASK
165
164
context.startActivity(intent)
166
165
} catch (e: ActivityNotFoundException ) {
167
166
// Digital Wellbeing app is not installed or cannot be opened
@@ -264,29 +263,25 @@ class AppHelper @Inject constructor() {
264
263
Intent .EXTRA_TEXT ,
265
264
" $description https://f-droid.org/packages/${context.packageName} "
266
265
)
267
- shareIntent.addFlags(Intent .FLAG_ACTIVITY_NEW_TASK )
268
266
context.startActivity(Intent .createChooser(shareIntent, " Share Application" ))
269
267
}
270
268
271
269
fun helpFeedbackButton (context : Context ) {
272
270
val uri = Uri .parse(" https://github.com/DroidWorksStudio/EasyLauncher" )
273
271
val intent = Intent (Intent .ACTION_VIEW , uri)
274
- intent.addFlags(Intent .FLAG_ACTIVITY_NEW_TASK )
275
272
context.startActivity(intent)
276
273
}
277
274
278
275
fun communitySupportButton (context : Context ) {
279
276
val uri = Uri .parse(" https://t.me/DroidWorksStudio/" )
280
277
val intent = Intent (Intent .ACTION_VIEW , uri)
281
- intent.addFlags(Intent .FLAG_ACTIVITY_NEW_TASK )
282
278
context.startActivity(intent)
283
279
}
284
280
285
281
fun emailButton (context : Context ) {
286
282
val emailIntent = Intent (Intent .ACTION_SENDTO )
287
283
emailIntent.data = Uri .parse(" mailto:droidworksstuido@063240.xyz" )
288
284
emailIntent.putExtra(Intent .EXTRA_SUBJECT , R .string.app_name)
289
- emailIntent.addFlags(Intent .FLAG_ACTIVITY_NEW_TASK )
290
285
context.startActivity(Intent .createChooser(emailIntent, " Choose Mail Application" ))
291
286
}
292
287
@@ -300,7 +295,6 @@ class AppHelper @Inject constructor() {
300
295
type = " application/json"
301
296
putExtra(Intent .EXTRA_TITLE , fileName)
302
297
}
303
- intent.addFlags(Intent .FLAG_ACTIVITY_NEW_TASK )
304
298
activity.startActivityForResult(intent, Constants .BACKUP_WRITE , null )
305
299
}
306
300
@@ -309,7 +303,6 @@ class AppHelper @Inject constructor() {
309
303
addCategory(Intent .CATEGORY_OPENABLE )
310
304
type = " application/json"
311
305
}
312
- intent.addFlags(Intent .FLAG_ACTIVITY_NEW_TASK )
313
306
activity.startActivityForResult(intent, Constants .BACKUP_READ , null )
314
307
}
315
308
@@ -370,7 +363,7 @@ class AppHelper @Inject constructor() {
370
363
fun fetchWeatherData (
371
364
context : Context ,
372
365
latitude : Float ,
373
- longitude : Float
366
+ longitude : Float ,
374
367
): WeatherResult {
375
368
// Check if cached data is available and not expired
376
369
val cachedWeatherData = context.getWeatherDataFromCache()
0 commit comments