Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
buildscript {
plugins {
id 'com.android.application'
id 'kotlin-android'
}
apply plugin: 'com.android.application'

repositories {
maven { url 'https://dl.bintray.com/galtashma/maven' }
Expand Down Expand Up @@ -31,13 +32,18 @@ android {
}
}

configurations {
cleanedAnnotations
implementation.exclude group: 'org.jetbrains' , module:'annotations'
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

implementation 'com.squareup.okhttp3:logging-interceptor:3.8.1'
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.galtashma.parsedashboard

import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.galtashma.parsedashboard", appContext.packageName)
}
}
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
<activity
android:name=".screens.AppsMenuParseActivity"
android:label="@string/title_activity_main"
android:theme="@style/AppTheme.NoActionBar.Dark">
android:theme="@style/AppTheme.NoActionBar.Dark"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand Down
15 changes: 0 additions & 15 deletions app/src/main/java/com/galtashma/parsedashboard/Const.java

This file was deleted.

13 changes: 13 additions & 0 deletions app/src/main/java/com/galtashma/parsedashboard/Const.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.galtashma.parsedashboard

/**
* Created by gal on 3/16/18, rewritten by Cyb3rKo on 05/12/22.
*/

object Const {
const val TAG = "ParseDashboard"
const val BUNDLE_KEY_PARSE_APP_NAME = "app_name"
const val BUNDLE_KEY_CLASS_NAME = "table_name"
const val BUNDLE_KEY_CLASS_FIELDS_NAME = "table_fields"
const val BUNDLE_KEY_OBJECT_ID = "object_id"
}
27 changes: 0 additions & 27 deletions app/src/main/java/com/galtashma/parsedashboard/Hash.java

This file was deleted.

32 changes: 32 additions & 0 deletions app/src/main/java/com/galtashma/parsedashboard/Hash.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.galtashma.parsedashboard

import android.util.Log
import java.security.MessageDigest
import kotlin.experimental.and

/**
* Created by gal on 3/16/18, rewritten by Cyb3rKo on 05/12/22.
*/

object Hash {
private const val salt = "1m4bqk"

fun sha1(value: String): String? {
try {
val messageDigest = MessageDigest.getInstance("SHA-1")
messageDigest.update((value + salt).toByteArray(Charsets.UTF_8))
val bytes = messageDigest.digest()
val buffer = StringBuilder()
bytes.forEach {
buffer.append(((it and 0xff.toByte()) + 0x100).toString(16).drop(1))
}
val result = buffer.toString()
Log.d(Const.TAG, "Hash result $result")

return result
} catch (ignored: Exception) {
ignored.printStackTrace()
return null
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package com.galtashma.parsedashboard

import com.appizona.yehiahd.fastsave.FastSave

/**
* Created by gal on 3/16/18, rewritten by Cyb3rKo on 05/12/22.
*/

class ListPreferenceStore(private val prefId: String) {
var list = load()

fun add(key: String) {
if (!exists(key)) {
list.add(key)
save()
}
}

fun remove(key: String) {
if (list.contains(key)) {
list.remove(key)
}
save()
}

fun reset() {
list = mutableListOf()
save()
}

fun exists(key: String) = list.contains(key)

fun isEmpty() = list.isEmpty()

fun size() = list.size

private fun save() {
FastSave.getInstance().saveObjectsList(prefId, list)
}

private fun load(): MutableList<String> {
val l = FastSave.getInstance().getObjectsList(prefId, String::class.java)
if (l != null) {
return l
}
return mutableListOf()
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.galtashma.parsedashboard

import android.app.Application
import com.appizona.yehiahd.fastsave.FastSave

/**
* Created by gal on 3/16/18, rewritten by Cyb3rKo on 05/12/22.
*/

class ParseDashboardApplication : Application() {
override fun onCreate() {
super.onCreate()
FastSave.init(applicationContext)
}
}
16 changes: 0 additions & 16 deletions app/src/main/java/com/galtashma/parsedashboard/ParseField.java

This file was deleted.

7 changes: 7 additions & 0 deletions app/src/main/java/com/galtashma/parsedashboard/ParseField.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.galtashma.parsedashboard

/**
* Created by gal on 3/16/18, rewritten by Cyb3rKo on 05/12/22.
*/

class ParseField(val key: String, val value: String)

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.galtashma.parsedashboard

/**
* Created by gal on 3/16/18, rewritten by Cyb3rKo on 05/12/22.
*/

class ParseServerConfig(
val appName: String = "",
val appId: String = "",
val masterKey: String = "",
val serverUrl: String = ""
)
Loading