Rebrand from "DDroid" to "EtchDroid"

This commit is contained in:
Davide Depau 2018-08-15 19:04:45 +02:00
parent 5be34538fb
commit d49497f2e0
29 changed files with 90 additions and 90 deletions

View file

@ -7,7 +7,7 @@ apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 28
defaultConfig {
applicationId "eu.depau.ddroid"
applicationId "eu.depau.etchdroid"
minSdkVersion 19
targetSdkVersion 28
versionCode 1

View file

@ -1,4 +1,4 @@
package eu.depau.ddroid
package eu.depau.etchdroid
import android.support.test.InstrumentationRegistry
import android.support.test.runner.AndroidJUnit4
@ -19,6 +19,6 @@ class ExampleInstrumentedTest {
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getTargetContext()
assertEquals("eu.depau.ddroid", appContext.packageName)
assertEquals("eu.depau.etchdroid", appContext.packageName)
}
}

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="eu.depau.ddroid">
package="eu.depau.etchdroid">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />

View file

@ -1,12 +1,12 @@
package eu.depau.ddroid
package eu.depau.etchdroid
import android.hardware.usb.UsbDevice
import android.net.Uri
import com.github.mjdev.libaums.UsbMassStorageDevice
import eu.depau.ddroid.abc.WizardFragment
import eu.depau.ddroid.values.FlashMethod
import eu.depau.ddroid.values.ImageLocation
import eu.depau.ddroid.values.WizardStep
import eu.depau.etchdroid.abc.WizardFragment
import eu.depau.etchdroid.values.FlashMethod
import eu.depau.etchdroid.values.ImageLocation
import eu.depau.etchdroid.values.WizardStep
object StateKeeper {
var wizardStep: WizardStep = WizardStep.SELECT_FLASH_METHOD

View file

@ -1,4 +1,4 @@
package eu.depau.ddroid.abc
package eu.depau.etchdroid.abc
import android.view.View

View file

@ -1,4 +1,4 @@
package eu.depau.ddroid.abc
package eu.depau.etchdroid.abc
import android.app.IntentService
import android.app.Notification
@ -10,19 +10,19 @@ import android.net.Uri
import android.os.Build
import android.os.PowerManager
import android.support.v4.app.NotificationCompat
import eu.depau.ddroid.R
import eu.depau.ddroid.utils.getFileName
import eu.depau.ddroid.utils.toHRSize
import eu.depau.ddroid.utils.toHRTime
import eu.depau.etchdroid.R
import eu.depau.etchdroid.utils.getFileName
import eu.depau.etchdroid.utils.toHRSize
import eu.depau.etchdroid.utils.toHRTime
abstract class UsbWriteService(name: String) : IntentService(name) {
val TAG = name
val FOREGROUND_ID = 1931
val RESULT_NOTIFICATION_ID = 3829
val WRITE_PROGRESS_CHANNEL_ID = "eu.depau.ddroid.notifications.USB_WRITE_PROGRESS"
val WRITE_RESULT_CHANNEL_ID = "eu.depau.ddroid.notifications.USB_WRITE_RESULT"
val WAKELOCK_TAG = "eu.depau.ddroid.wakelocks.USB_WRITING"
val WRITE_PROGRESS_CHANNEL_ID = "eu.depau.etchdroid.notifications.USB_WRITE_PROGRESS"
val WRITE_RESULT_CHANNEL_ID = "eu.depau.etchdroid.notifications.USB_WRITE_RESULT"
val WAKELOCK_TAG = "eu.depau.etchdroid.wakelocks.USB_WRITING"
private var prevTime = System.currentTimeMillis()
private var prevBytes = 0L

View file

@ -1,9 +1,9 @@
package eu.depau.ddroid.abc
package eu.depau.etchdroid.abc
import android.content.Intent
import android.support.v7.app.AppCompatActivity
import android.view.View
import eu.depau.ddroid.StateKeeper
import eu.depau.etchdroid.StateKeeper
abstract class WizardActivity : AppCompatActivity() {
abstract fun goToNewFragment(fragment: WizardFragment)

View file

@ -1,4 +1,4 @@
package eu.depau.ddroid.abc
package eu.depau.etchdroid.abc
import android.content.Intent
import android.support.v4.app.Fragment

View file

@ -1,4 +1,4 @@
package eu.depau.ddroid.activities
package eu.depau.etchdroid.activities
import android.app.PendingIntent
import android.content.BroadcastReceiver
@ -10,17 +10,17 @@ import android.hardware.usb.UsbManager
import android.os.Bundle
import android.view.Menu
import android.view.MenuItem
import eu.depau.ddroid.R
import eu.depau.ddroid.StateKeeper
import eu.depau.ddroid.abc.WizardActivity
import eu.depau.ddroid.abc.WizardFragment
import eu.depau.ddroid.fragments.FlashMethodFragment
import eu.depau.ddroid.fragments.UsbDriveFragment
import eu.depau.etchdroid.R
import eu.depau.etchdroid.StateKeeper
import eu.depau.etchdroid.abc.WizardActivity
import eu.depau.etchdroid.abc.WizardFragment
import eu.depau.etchdroid.fragments.FlashMethodFragment
import eu.depau.etchdroid.fragments.UsbDriveFragment
import kotlinx.android.synthetic.main.activity_main.*
class MainActivity : WizardActivity() {
val TAG = "MainActivity"
val ACTION_USB_PERMISSION = "eu.depau.ddroid.USB_PERMISSION"
val ACTION_USB_PERMISSION = "eu.depau.etchdroid.USB_PERMISSION"
lateinit var mUsbPermissionIntent: PendingIntent
private val mUsbReceiver = object : BroadcastReceiver() {

View file

@ -1,4 +1,4 @@
package eu.depau.ddroid.fragments
package eu.depau.etchdroid.fragments
import android.content.Intent
import android.os.Bundle
@ -6,14 +6,14 @@ import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import eu.depau.ddroid.R
import eu.depau.ddroid.StateKeeper
import eu.depau.ddroid.abc.WizardActivity
import eu.depau.ddroid.abc.WizardFragment
import eu.depau.ddroid.services.UsbAPIWriteService
import eu.depau.ddroid.utils.*
import eu.depau.ddroid.values.FlashMethod
import eu.depau.ddroid.values.WizardStep
import eu.depau.etchdroid.R
import eu.depau.etchdroid.StateKeeper
import eu.depau.etchdroid.abc.WizardActivity
import eu.depau.etchdroid.abc.WizardFragment
import eu.depau.etchdroid.services.UsbAPIWriteService
import eu.depau.etchdroid.utils.*
import eu.depau.etchdroid.values.FlashMethod
import eu.depau.etchdroid.values.WizardStep
import kotlinx.android.synthetic.main.fragment_confirminfo.view.*
import java.io.IOException

View file

@ -1,16 +1,16 @@
package eu.depau.ddroid.fragments
package eu.depau.etchdroid.fragments
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import eu.depau.ddroid.R
import eu.depau.ddroid.StateKeeper
import eu.depau.ddroid.abc.WizardActivity
import eu.depau.ddroid.abc.WizardFragment
import eu.depau.ddroid.utils.snackbar
import eu.depau.ddroid.values.FlashMethod
import eu.depau.ddroid.values.WizardStep
import eu.depau.etchdroid.R
import eu.depau.etchdroid.StateKeeper
import eu.depau.etchdroid.abc.WizardActivity
import eu.depau.etchdroid.abc.WizardFragment
import eu.depau.etchdroid.utils.snackbar
import eu.depau.etchdroid.values.FlashMethod
import eu.depau.etchdroid.values.WizardStep
/**
* A placeholder fragment containing a simple view.

View file

@ -1,4 +1,4 @@
package eu.depau.ddroid.fragments
package eu.depau.etchdroid.fragments
import android.Manifest
import android.app.Activity
@ -13,15 +13,15 @@ import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import eu.depau.ddroid.R
import eu.depau.ddroid.StateKeeper
import eu.depau.ddroid.abc.WizardActivity
import eu.depau.ddroid.abc.WizardFragment
import eu.depau.ddroid.utils.getFileName
import eu.depau.ddroid.utils.snackbar
import eu.depau.ddroid.values.FlashMethod
import eu.depau.ddroid.values.ImageLocation
import eu.depau.ddroid.values.WizardStep
import eu.depau.etchdroid.R
import eu.depau.etchdroid.StateKeeper
import eu.depau.etchdroid.abc.WizardActivity
import eu.depau.etchdroid.abc.WizardFragment
import eu.depau.etchdroid.utils.getFileName
import eu.depau.etchdroid.utils.snackbar
import eu.depau.etchdroid.values.FlashMethod
import eu.depau.etchdroid.values.ImageLocation
import eu.depau.etchdroid.values.WizardStep
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.fragment_select_location.*
import kotlinx.android.synthetic.main.wizard_fragment_layout.*

View file

@ -1,4 +1,4 @@
package eu.depau.ddroid.fragments
package eu.depau.etchdroid.fragments
import android.content.Context
import android.hardware.usb.UsbDevice
@ -10,16 +10,16 @@ import android.support.v7.widget.LinearLayoutManager
import android.support.v7.widget.RecyclerView
import android.view.*
import com.github.mjdev.libaums.UsbMassStorageDevice
import eu.depau.ddroid.R
import eu.depau.ddroid.StateKeeper
import eu.depau.ddroid.abc.ClickListener
import eu.depau.ddroid.abc.WizardActivity
import eu.depau.ddroid.abc.WizardFragment
import eu.depau.ddroid.activities.MainActivity
import eu.depau.ddroid.utils.UsbDrivesRecyclerViewAdapter
import eu.depau.ddroid.utils.name
import eu.depau.ddroid.utils.snackbar
import eu.depau.ddroid.values.WizardStep
import eu.depau.etchdroid.R
import eu.depau.etchdroid.StateKeeper
import eu.depau.etchdroid.abc.ClickListener
import eu.depau.etchdroid.abc.WizardActivity
import eu.depau.etchdroid.abc.WizardFragment
import eu.depau.etchdroid.activities.MainActivity
import eu.depau.etchdroid.utils.UsbDrivesRecyclerViewAdapter
import eu.depau.etchdroid.utils.name
import eu.depau.etchdroid.utils.snackbar
import eu.depau.etchdroid.values.WizardStep
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.fragment_select_usb_drive.view.*

View file

@ -1,14 +1,14 @@
package eu.depau.ddroid.services
package eu.depau.etchdroid.services
import android.content.Intent
import android.hardware.usb.UsbDevice
import android.net.Uri
import android.util.Log
import com.github.mjdev.libaums.UsbMassStorageDevice
import eu.depau.ddroid.abc.UsbWriteService
import eu.depau.ddroid.utils.getFileName
import eu.depau.ddroid.utils.getFileSize
import eu.depau.ddroid.utils.name
import eu.depau.etchdroid.abc.UsbWriteService
import eu.depau.etchdroid.utils.getFileName
import eu.depau.etchdroid.utils.getFileSize
import eu.depau.etchdroid.utils.name
import java.nio.ByteBuffer
class UsbAPIWriteService : UsbWriteService("UsbAPIWriteService") {
@ -16,8 +16,8 @@ class UsbAPIWriteService : UsbWriteService("UsbAPIWriteService") {
val DD_BLOCKSIZE = 512 * 32 * 64 // 1 MB
class Action {
val WRITE_IMAGE = "eu.depau.ddroid.action.API_WRITE_IMAGE"
val WRITE_CANCEL = "eu.depau.ddroid.action.API_WRITE_CANCEL"
val WRITE_IMAGE = "eu.depau.etchdroid.action.API_WRITE_IMAGE"
val WRITE_CANCEL = "eu.depau.etchdroid.action.API_WRITE_CANCEL"
}
private fun getUsbMSDevice(usbDevice: UsbDevice): UsbMassStorageDevice? {

View file

@ -1,4 +1,4 @@
package eu.depau.ddroid.utils
package eu.depau.etchdroid.utils
import android.content.Context
import android.widget.Toast

View file

@ -1,4 +1,4 @@
package eu.depau.ddroid.utils
package eu.depau.etchdroid.utils
// https://stackoverflow.com/a/3758880/1124621

View file

@ -1,4 +1,4 @@
package eu.depau.ddroid.utils
package eu.depau.etchdroid.utils
private val timeStrings = arrayOf("s", "m", "h", "d")
private val timeDivs = arrayOf(60, 60, 24)

View file

@ -1,4 +1,4 @@
package eu.depau.ddroid.utils
package eu.depau.etchdroid.utils
import android.content.Context
import android.net.Uri

View file

@ -1,4 +1,4 @@
package eu.depau.ddroid.utils
package eu.depau.etchdroid.utils
import android.content.ContentResolver
import android.content.Context

View file

@ -1,4 +1,4 @@
package eu.depau.ddroid.utils
package eu.depau.etchdroid.utils
import android.hardware.usb.UsbDevice
import android.os.Build

View file

@ -1,4 +1,4 @@
package eu.depau.ddroid.utils
package eu.depau.etchdroid.utils
import android.annotation.SuppressLint
import android.os.Build
@ -8,7 +8,7 @@ import android.view.ViewGroup
import android.widget.RelativeLayout
import android.widget.TextView
import com.github.mjdev.libaums.UsbMassStorageDevice
import eu.depau.ddroid.R
import eu.depau.etchdroid.R
import kotlinx.android.synthetic.main.usb_device_row.view.*
import java.lang.Integer

View file

@ -1,4 +1,4 @@
package eu.depau.ddroid.utils
package eu.depau.etchdroid.utils
import android.support.design.widget.Snackbar
import android.view.View

View file

@ -1,4 +1,4 @@
package eu.depau.ddroid.values
package eu.depau.etchdroid.values
enum class FlashMethod {
FLASH_API,

View file

@ -1,4 +1,4 @@
package eu.depau.ddroid.values
package eu.depau.etchdroid.values
enum class ImageLocation {
REMOTE,

View file

@ -1,4 +1,4 @@
package eu.depau.ddroid.values
package eu.depau.etchdroid.values
enum class WizardStep {
SELECT_FLASH_METHOD,

View file

@ -1,7 +1,7 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="eu.depau.ddroid.activities.MainActivity">
tools:context="eu.depau.etchdroid.activities.MainActivity">
<item
android:id="@+id/action_settings"
android:orderInCategory="100"

View file

@ -1,7 +1,7 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="eu.depau.ddroid.fragments.UsbDriveFragment">
tools:context="eu.depau.etchdroid.fragments.UsbDriveFragment">
<item
android:id="@+id/action_refresh"
android:orderInCategory="100"

View file

@ -1,5 +1,5 @@
<resources>
<string name="app_name">DDroid</string>
<string name="app_name">EtchDroid</string>
<string name="action_settings">Settings</string>
<string name="download_image_from_url">Download image from URL</string>
<string name="use_local_image">Use local image</string>

View file

@ -1,4 +1,4 @@
package eu.depau.ddroid
package eu.depau.etchdroid
import org.junit.Test