refactor
parent
18817f2642
commit
7f0a75eae2
|
@ -42,9 +42,6 @@ class NativeX(private val mActivity: AppCompatActivity) {
|
|||
|
||||
companion object {
|
||||
lateinit var mDlService: DownloadService
|
||||
fun getDlService(): DownloadService {
|
||||
return mDlService;
|
||||
}
|
||||
}
|
||||
|
||||
fun handleRequest(request: WebResourceRequest): WebResourceResponse {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package gallery.memories.service
|
||||
package gallery.memories.mapper
|
||||
|
||||
class Fields {
|
||||
object Day {
|
|
@ -7,6 +7,6 @@ import gallery.memories.NativeX
|
|||
|
||||
class DownloadBroadcastReceiver : BroadcastReceiver() {
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
NativeX.getDlService().runDownloadCallback(intent)
|
||||
NativeX.mDlService.runDownloadCallback(intent)
|
||||
}
|
||||
}
|
|
@ -16,6 +16,7 @@ import androidx.activity.result.contract.ActivityResultContracts
|
|||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.collection.ArraySet
|
||||
import androidx.exifinterface.media.ExifInterface
|
||||
import gallery.memories.mapper.Fields
|
||||
import gallery.memories.mapper.SystemImage
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONException
|
||||
|
@ -142,7 +143,8 @@ class TimelineQuery(private val mCtx: AppCompatActivity) {
|
|||
|
||||
try {
|
||||
val exif = ExifInterface(image.dataPath)
|
||||
obj.put(Fields.Photo.EXIF, JSONObject()
|
||||
obj.put(
|
||||
Fields.Photo.EXIF, JSONObject()
|
||||
.put("Aperture", exif.getAttribute(ExifInterface.TAG_APERTURE_VALUE))
|
||||
.put("FocalLength", exif.getAttribute(ExifInterface.TAG_FOCAL_LENGTH))
|
||||
.put("FNumber", exif.getAttribute(ExifInterface.TAG_F_NUMBER))
|
||||
|
|
Loading…
Reference in New Issue