mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
rescan folders after restarting so they get scanned quicker later
This commit is contained in:
parent
462182271d
commit
1130407046
3 changed files with 26 additions and 1 deletions
|
@ -78,7 +78,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:5.26.25'
|
implementation 'com.simplemobiletools:commons:5.26.26'
|
||||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
|
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
|
||||||
implementation 'androidx.multidex:multidex:2.0.1'
|
implementation 'androidx.multidex:multidex:2.0.1'
|
||||||
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||||
<uses-permission android:name="android.permission.SET_WALLPAPER"/>
|
<uses-permission android:name="android.permission.SET_WALLPAPER"/>
|
||||||
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
||||||
<uses-permission
|
<uses-permission
|
||||||
android:name="android.permission.ACCESS_NETWORK_STATE"
|
android:name="android.permission.ACCESS_NETWORK_STATE"
|
||||||
tools:node="remove"/>
|
tools:node="remove"/>
|
||||||
|
@ -285,6 +286,15 @@
|
||||||
android:resource="@xml/widget_info"/>
|
android:resource="@xml/widget_info"/>
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
|
<receiver android:name=".receivers.BootCompletedReceiver"
|
||||||
|
android:exported="true"
|
||||||
|
android:enabled="true">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.BOOT_COMPLETED"/>
|
||||||
|
<action android:name="android.intent.action.QUICKBOOT_POWERON"/>
|
||||||
|
</intent-filter>
|
||||||
|
</receiver>
|
||||||
|
|
||||||
<service
|
<service
|
||||||
android:name=".jobs.NewPhotoFetcher"
|
android:name=".jobs.NewPhotoFetcher"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.simplemobiletools.gallery.pro.receivers
|
||||||
|
|
||||||
|
import android.content.BroadcastReceiver
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.Intent
|
||||||
|
import com.simplemobiletools.gallery.pro.extensions.updateDirectoryPath
|
||||||
|
import com.simplemobiletools.gallery.pro.helpers.MediaFetcher
|
||||||
|
|
||||||
|
class BootCompletedReceiver : BroadcastReceiver() {
|
||||||
|
override fun onReceive(context: Context, intent: Intent) {
|
||||||
|
MediaFetcher(context).getFoldersToScan().forEach {
|
||||||
|
context.updateDirectoryPath(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue