Skip to content

Commit

Permalink
Move extensions files into helpers package
Browse files Browse the repository at this point in the history
  • Loading branch information
MarmadileManteater committed Jan 15, 2025
1 parent 106b267 commit 552d41a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.freetubeapp.freetube

import android.annotation.SuppressLint
import android.content.Context
import android.content.Intent
import android.content.res.Configuration
import android.graphics.Color
Expand Down Expand Up @@ -32,6 +31,8 @@ import androidx.core.view.WindowInsetsCompat
import androidx.core.view.WindowInsetsControllerCompat
import androidx.documentfile.provider.DocumentFile
import io.freetubeapp.freetube.databinding.ActivityMainBinding
import io.freetubeapp.freetube.helpers.readText
import io.freetubeapp.freetube.helpers.writeFile
import io.freetubeapp.freetube.javascript.BotGuardJavascriptInterface
import io.freetubeapp.freetube.javascript.FreeTubeJavaScriptInterface
import io.freetubeapp.freetube.javascript.dispatchEvent
Expand All @@ -47,10 +48,6 @@ import java.net.URLEncoder
import java.text.SimpleDateFormat
import java.util.Date
import java.util.UUID
import java.util.concurrent.BlockingQueue
import java.util.concurrent.LinkedBlockingQueue
import java.util.concurrent.ThreadPoolExecutor
import java.util.concurrent.TimeUnit


class MainActivity : AppCompatActivity(), OnRequestPermissionsResultCallback {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
package io.freetubeapp.freetube
package io.freetubeapp.freetube.helpers

import android.content.ContentResolver
import android.net.Uri
import io.freetubeapp.freetube.helpers.Promise
import io.freetubeapp.freetube.helpers.toJSON
import io.freetubeapp.freetube.javascript.consoleError
import java.io.File
import java.io.FileInputStream

fun ContentResolver.readFile(contentTreeUri: Uri): Promise<ByteArray> {
return Promise {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package io.freetubeapp.freetube
package io.freetubeapp.freetube.helpers

import io.freetubeapp.freetube.helpers.Promise
import io.freetubeapp.freetube.helpers.toJSON
import java.io.File
import java.io.FileInputStream

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,26 @@ import android.media.session.PlaybackState.STATE_PAUSED
import android.net.Uri
import android.os.Build
import android.os.Build.VERSION.SDK_INT
import android.os.Environment
import android.provider.OpenableColumns
import android.provider.Settings
import android.view.WindowManager
import android.webkit.JavascriptInterface
import android.webkit.PermissionRequest
import androidx.activity.result.ActivityResult
import androidx.annotation.RequiresApi
import androidx.core.app.ActivityCompat
import androidx.core.app.NotificationManagerCompat
import androidx.core.content.ContextCompat.startActivity
import androidx.core.view.WindowCompat
import androidx.documentfile.provider.DocumentFile
import io.freetubeapp.freetube.MainActivity
import io.freetubeapp.freetube.MediaControlsReceiver
import io.freetubeapp.freetube.R
import io.freetubeapp.freetube.WriteMode
import io.freetubeapp.freetube.readFile
import io.freetubeapp.freetube.readText
import io.freetubeapp.freetube.writeFile
import io.freetubeapp.freetube.writeText
import io.freetubeapp.freetube.helpers.WriteMode
import io.freetubeapp.freetube.helpers.readFile
import io.freetubeapp.freetube.helpers.readText
import io.freetubeapp.freetube.helpers.writeFile
import io.freetubeapp.freetube.helpers.writeText
import org.json.JSONObject
import java.io.File
import java.io.FileInputStream
import java.net.URL
import java.util.UUID.*

Expand Down

0 comments on commit 552d41a

Please sign in to comment.