Rename root package to org.fairscan.app

This commit is contained in:
Pierre-Yves Nicolas
2025-08-25 11:24:30 +02:00
committed by pynicolas
parent 49cdbaf704
commit 2eec4fe7ca
38 changed files with 94 additions and 95 deletions

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan
package org.fairscan.app
import android.Manifest
import android.content.Context

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan
package org.fairscan.app
import android.graphics.Bitmap
import androidx.core.graphics.createBitmap

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan
package org.fairscan.app
import kotlin.math.atan2
import kotlin.math.sqrt

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan
package org.fairscan.app
import java.io.File

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan
package org.fairscan.app
import android.content.Context
import android.graphics.Bitmap

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan
package org.fairscan.app
import android.graphics.Bitmap
import androidx.compose.runtime.Immutable

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan
package org.fairscan.app
import android.content.ActivityNotFoundException
import android.content.Intent
@@ -37,12 +37,12 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.suspendCancellableCoroutine
import kotlinx.coroutines.withContext
import org.mydomain.myscan.ui.theme.MyScanTheme
import org.mydomain.myscan.view.AboutScreen
import org.mydomain.myscan.view.CameraScreen
import org.mydomain.myscan.view.DocumentScreen
import org.mydomain.myscan.view.HomeScreen
import org.mydomain.myscan.view.LibrariesScreen
import org.fairscan.app.ui.theme.MyScanTheme
import org.fairscan.app.view.AboutScreen
import org.fairscan.app.view.CameraScreen
import org.fairscan.app.view.DocumentScreen
import org.fairscan.app.view.HomeScreen
import org.fairscan.app.view.LibrariesScreen
import org.opencv.android.OpenCVLoader
private const val PDF_MIME_TYPE = "application/pdf"

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan
package org.fairscan.app
import android.content.Context
import android.graphics.Bitmap
@@ -38,10 +38,10 @@ import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import org.mydomain.myscan.data.recentDocumentsDataStore
import org.mydomain.myscan.ui.PdfGenerationUiState
import org.mydomain.myscan.ui.RecentDocumentUiState
import org.mydomain.myscan.view.DocumentUiModel
import org.fairscan.app.data.recentDocumentsDataStore
import org.fairscan.app.ui.PdfGenerationUiState
import org.fairscan.app.ui.RecentDocumentUiState
import org.fairscan.app.view.DocumentUiModel
import java.io.ByteArrayOutputStream
import java.io.File

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan
package org.fairscan.app
sealed class Screen {
sealed class Main : Screen() {

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan
package org.fairscan.app
import java.io.File
import java.io.FileOutputStream

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan
package org.fairscan.app
import com.tom_roush.pdfbox.pdmodel.PDDocument
import com.tom_roush.pdfbox.pdmodel.PDPage

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan
package org.fairscan.app
import android.util.Log
import org.opencv.core.Core

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan.data
package org.fairscan.app.data
import android.content.Context
import androidx.datastore.core.CorruptionException
@@ -20,7 +20,7 @@ import androidx.datastore.core.DataStore
import androidx.datastore.core.Serializer
import androidx.datastore.dataStore
import com.google.protobuf.InvalidProtocolBufferException
import org.mydomain.myscan.RecentDocuments
import org.fairscan.app.RecentDocuments
import java.io.InputStream
import java.io.OutputStream

View File

@@ -12,10 +12,10 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan.ui
package org.fairscan.app.ui
import android.net.Uri
import org.mydomain.myscan.GeneratedPdf
import org.fairscan.app.GeneratedPdf
import java.io.File
data class PdfGenerationUiState(

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan.ui.theme
package org.fairscan.app.ui.theme
import androidx.compose.ui.graphics.Color

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan.ui.theme
package org.fairscan.app.ui.theme
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.MaterialTheme

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan.ui.theme
package org.fairscan.app.ui.theme
import androidx.compose.material3.Typography
import androidx.compose.ui.text.TextStyle

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan.view
package org.fairscan.app.view
import androidx.activity.compose.BackHandler
import androidx.compose.foundation.clickable
@@ -52,9 +52,9 @@ import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import org.mydomain.myscan.BuildConfig
import org.mydomain.myscan.R
import org.mydomain.myscan.ui.theme.MyScanTheme
import org.fairscan.app.BuildConfig
import org.fairscan.app.R
import org.fairscan.app.ui.theme.MyScanTheme
@OptIn(ExperimentalMaterial3Api::class)
@Composable

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan.view
package org.fairscan.app.view
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.size
@@ -32,7 +32,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import org.mydomain.myscan.R
import org.fairscan.app.R
@Composable
fun MainActionButton(

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan.view
package org.fairscan.app.view
import android.graphics.Bitmap
import android.util.Log
@@ -52,10 +52,10 @@ import androidx.core.graphics.scale
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.compose.LocalLifecycleOwner
import com.google.common.util.concurrent.ListenableFuture
import org.mydomain.myscan.CameraPermissionState
import org.mydomain.myscan.LiveAnalysisState
import org.mydomain.myscan.Point
import org.mydomain.myscan.scaledTo
import org.fairscan.app.CameraPermissionState
import org.fairscan.app.LiveAnalysisState
import org.fairscan.app.Point
import org.fairscan.app.scaledTo
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan.view
package org.fairscan.app.view
import android.content.res.Configuration
import android.graphics.Bitmap
@@ -75,14 +75,14 @@ import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import kotlinx.coroutines.delay
import org.mydomain.myscan.CameraPermissionState
import org.mydomain.myscan.LiveAnalysisState
import org.mydomain.myscan.MainViewModel
import org.mydomain.myscan.MainViewModel.CaptureState
import org.mydomain.myscan.Navigation
import org.mydomain.myscan.R
import org.mydomain.myscan.Screen
import org.mydomain.myscan.ui.theme.MyScanTheme
import org.fairscan.app.CameraPermissionState
import org.fairscan.app.LiveAnalysisState
import org.fairscan.app.MainViewModel
import org.fairscan.app.MainViewModel.CaptureState
import org.fairscan.app.Navigation
import org.fairscan.app.R
import org.fairscan.app.Screen
import org.fairscan.app.ui.theme.MyScanTheme
data class CameraUiState(
val pageCount: Int,

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan.view
package org.fairscan.app.view
import androidx.activity.compose.BackHandler
import androidx.compose.foundation.Image
@@ -57,11 +57,11 @@ import androidx.compose.ui.unit.dp
import kotlinx.coroutines.flow.MutableStateFlow
import net.engawapg.lib.zoomable.rememberZoomState
import net.engawapg.lib.zoomable.zoomable
import org.mydomain.myscan.Navigation
import org.mydomain.myscan.PdfGenerationActions
import org.mydomain.myscan.R
import org.mydomain.myscan.ui.PdfGenerationUiState
import org.mydomain.myscan.ui.theme.MyScanTheme
import org.fairscan.app.Navigation
import org.fairscan.app.PdfGenerationActions
import org.fairscan.app.R
import org.fairscan.app.ui.PdfGenerationUiState
import org.fairscan.app.ui.theme.MyScanTheme
@OptIn(ExperimentalMaterial3Api::class)
@Composable

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan.view
package org.fairscan.app.view
import android.graphics.Bitmap

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan.view
package org.fairscan.app.view
import androidx.compose.foundation.Image
import androidx.compose.foundation.clickable
@@ -50,12 +50,12 @@ import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import org.mydomain.myscan.CameraPermissionState
import org.mydomain.myscan.Navigation
import org.mydomain.myscan.R
import org.mydomain.myscan.rememberCameraPermissionState
import org.mydomain.myscan.ui.RecentDocumentUiState
import org.mydomain.myscan.ui.theme.MyScanTheme
import org.fairscan.app.CameraPermissionState
import org.fairscan.app.Navigation
import org.fairscan.app.R
import org.fairscan.app.rememberCameraPermissionState
import org.fairscan.app.ui.RecentDocumentUiState
import org.fairscan.app.ui.theme.MyScanTheme
import java.io.File
import kotlin.math.min

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan.view
package org.fairscan.app.view
import androidx.activity.compose.BackHandler
import androidx.compose.foundation.layout.fillMaxSize
@@ -30,7 +30,7 @@ import androidx.compose.ui.res.stringResource
import com.mikepenz.aboutlibraries.ui.compose.LibraryDefaults
import com.mikepenz.aboutlibraries.ui.compose.android.rememberLibraries
import com.mikepenz.aboutlibraries.ui.compose.m3.LibrariesContainer
import org.mydomain.myscan.R
import org.fairscan.app.R
@OptIn(ExperimentalMaterial3Api::class)
@Composable

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan.view
package org.fairscan.app.view
import android.content.res.Configuration
import android.graphics.Bitmap

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan.view
package org.fairscan.app.view
import android.content.Context
import android.text.format.Formatter
@@ -56,11 +56,11 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.core.net.toUri
import org.mydomain.myscan.GeneratedPdf
import org.mydomain.myscan.PdfGenerationActions
import org.mydomain.myscan.R
import org.mydomain.myscan.ui.PdfGenerationUiState
import org.mydomain.myscan.ui.theme.MyScanTheme
import org.fairscan.app.GeneratedPdf
import org.fairscan.app.PdfGenerationActions
import org.fairscan.app.R
import org.fairscan.app.ui.PdfGenerationUiState
import org.fairscan.app.ui.theme.MyScanTheme
import java.io.File
import java.text.SimpleDateFormat
import java.util.Date

View File

@@ -12,11 +12,11 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan.view
package org.fairscan.app.view
import android.content.Context
import android.graphics.BitmapFactory
import org.mydomain.myscan.Navigation
import org.fairscan.app.Navigation
fun dummyNavigation(): Navigation {
return Navigation({}, {}, {}, {}, {}, {})

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan.view
package org.fairscan.app.view
import android.content.res.Configuration
import androidx.compose.foundation.background

View File

@@ -12,13 +12,13 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.mydomain.myscan.view
package org.fairscan.app.view
import android.content.Context
import android.text.format.DateFormat
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalContext
import org.mydomain.myscan.R
import org.fairscan.app.R
import java.util.Date
@Composable

View File

@@ -1,6 +1,6 @@
syntax = "proto3";
option java_package = "org.mydomain.myscan";
option java_package = "org.fairscan.app";
option java_multiple_files = true;
message RecentDocument {