Skip to content
Merged
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
11 changes: 6 additions & 5 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ dependencies {


implementation(libs.glide)
implementation(libs.androidx.wear.tiles.tooling.preview)
debugImplementation(libs.androidx.wear.tiles.tooling)
ksp(libs.glide.compiler)


Expand Down Expand Up @@ -121,10 +119,10 @@ dependencies {
implementation(libs.androidx.wear.protolayout)
implementation(libs.androidx.wear.protolayout.material)
implementation(libs.androidx.wear.protolayout.expression)
debugImplementation(libs.androidx.wear.tiles.tooling)
debugImplementation(libs.androidx.wear.tiles.tooling.preview)
implementation(libs.androidx.concurrent.futures)

implementation(libs.androidx.wear.tiles.tooling.preview)
implementation(libs.androidx.wear.tooling.preview)
debugImplementation(libs.androidx.wear.tiles.tooling)

implementation(libs.google.guava)
implementation(libs.google.horologist.compose.tools)
Expand All @@ -151,6 +149,9 @@ dependencies {
implementation(libs.resultat)


implementation(libs.ktor.client.core)


testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
Expand Down
303 changes: 303 additions & 0 deletions app/schemas/com.github.miwu.logic.database.AppDatabase/2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,303 @@
{
"formatVersion": 1,
"database": {
"version": 2,
"identityHash": "0518eb9590d1368b07546d66fe61ffff",
"entities": [
{
"tableName": "favorite_device",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`bssid` TEXT NOT NULL, `cnt` INTEGER, `comFlag` INTEGER NOT NULL, `did` TEXT NOT NULL, `freqFlag` INTEGER NOT NULL, `hideMode` INTEGER, `isOnline` INTEGER NOT NULL, `lastOnline` INTEGER, `latitude` TEXT NOT NULL, `localIp` TEXT, `longitude` TEXT NOT NULL, `mac` TEXT NOT NULL, `model` TEXT NOT NULL, `name` TEXT NOT NULL, `orderTime` INTEGER NOT NULL, `parentId` TEXT, `permitLevel` INTEGER NOT NULL, `pid` INTEGER NOT NULL, `rssi` INTEGER, `showMode` INTEGER, `specType` TEXT, `ssid` TEXT, `token` TEXT NOT NULL, `uid` INTEGER NOT NULL, `fwVersion` TEXT, `isSetPinCode` INTEGER, `isSubGroup` INTEGER, `mcuVersion` TEXT, `pinCodeType` INTEGER, `platform` TEXT, `showGroupMember` INTEGER, PRIMARY KEY(`uid`, `did`))",
"fields": [
{
"fieldPath": "bssid",
"columnName": "bssid",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "cnt",
"columnName": "cnt",
"affinity": "INTEGER"
},
{
"fieldPath": "comFlag",
"columnName": "comFlag",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "did",
"columnName": "did",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "freqFlag",
"columnName": "freqFlag",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "hideMode",
"columnName": "hideMode",
"affinity": "INTEGER"
},
{
"fieldPath": "isOnline",
"columnName": "isOnline",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastOnline",
"columnName": "lastOnline",
"affinity": "INTEGER"
},
{
"fieldPath": "latitude",
"columnName": "latitude",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "localIp",
"columnName": "localIp",
"affinity": "TEXT"
},
{
"fieldPath": "longitude",
"columnName": "longitude",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "mac",
"columnName": "mac",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "model",
"columnName": "model",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "orderTime",
"columnName": "orderTime",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "parentId",
"columnName": "parentId",
"affinity": "TEXT"
},
{
"fieldPath": "permitLevel",
"columnName": "permitLevel",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "pid",
"columnName": "pid",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "rssi",
"columnName": "rssi",
"affinity": "INTEGER"
},
{
"fieldPath": "showMode",
"columnName": "showMode",
"affinity": "INTEGER"
},
{
"fieldPath": "specType",
"columnName": "specType",
"affinity": "TEXT"
},
{
"fieldPath": "ssid",
"columnName": "ssid",
"affinity": "TEXT"
},
{
"fieldPath": "token",
"columnName": "token",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "uid",
"columnName": "uid",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "extra.fwVersion",
"columnName": "fwVersion",
"affinity": "TEXT"
},
{
"fieldPath": "extra.isSetPinCode",
"columnName": "isSetPinCode",
"affinity": "INTEGER"
},
{
"fieldPath": "extra.isSubGroup",
"columnName": "isSubGroup",
"affinity": "INTEGER"
},
{
"fieldPath": "extra.mcuVersion",
"columnName": "mcuVersion",
"affinity": "TEXT"
},
{
"fieldPath": "extra.pinCodeType",
"columnName": "pinCodeType",
"affinity": "INTEGER"
},
{
"fieldPath": "extra.platform",
"columnName": "platform",
"affinity": "TEXT"
},
{
"fieldPath": "extra.showGroupMember",
"columnName": "showGroupMember",
"affinity": "INTEGER"
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"uid",
"did"
]
},
"indices": [
{
"name": "index_favorite_device_uid_did",
"unique": false,
"columnNames": [
"uid",
"did"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_favorite_device_uid_did` ON `${TABLE_NAME}` (`uid`, `did`)"
}
]
},
{
"tableName": "favorite_device_metadata",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uid` INTEGER NOT NULL, `did` TEXT NOT NULL, `sort_index` INTEGER NOT NULL DEFAULT 2147483647, PRIMARY KEY(`uid`, `did`), FOREIGN KEY(`uid`, `did`) REFERENCES `favorite_device`(`uid`, `did`) ON UPDATE CASCADE ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "uid",
"columnName": "uid",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "did",
"columnName": "did",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "sortIndex",
"columnName": "sort_index",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "2147483647"
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"uid",
"did"
]
},
"indices": [
{
"name": "index_favorite_device_metadata_uid_did",
"unique": false,
"columnNames": [
"uid",
"did"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_favorite_device_metadata_uid_did` ON `${TABLE_NAME}` (`uid`, `did`)"
}
],
"foreignKeys": [
{
"table": "favorite_device",
"onDelete": "CASCADE",
"onUpdate": "CASCADE",
"columns": [
"uid",
"did"
],
"referencedColumns": [
"uid",
"did"
]
}
]
},
{
"tableName": "crash_item",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`errorMessage` TEXT NOT NULL, `timestamp` INTEGER NOT NULL, `path` TEXT NOT NULL, `index` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)",
"fields": [
{
"fieldPath": "errorMessage",
"columnName": "errorMessage",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "timestamp",
"columnName": "timestamp",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "path",
"columnName": "path",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "index",
"columnName": "index",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"index"
]
}
}
],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '0518eb9590d1368b07546d66fe61ffff')"
]
}
}
6 changes: 3 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<uses-feature android:name="android.hardware.type.watch" />

<uses-sdk tools:overrideLibrary="androidx.wear.tiles.tooling,androidx.wear.tiles.tooling.preview,androidx.wear.compose.material.core,androidx.wear,androidx.wear.watchface.complications,androidx.wear.protolayout.renderer,androidx.wear.compose.navigation , androidx.wear.protolayout,androidx.wear.protolayout.expression.pipeline, androidx.wear.protolayout.material,androidx.wear.protolayout.expression,com.google.android.horologist.compose.tools, androidx.wear.tiles, androidx.wear.protolayout.materialcore, androidx.wear.watchface.complications.data, androidx.wear.compose.foundation, androidx.wear.compose.material, com.google.android.horologist.tiles, androidx.wear.watchface.complications.datasource, kndroidx.wear.tile" />
<uses-sdk tools:overrideLibrary="androidx.wear.protolayout.material3,androidx.wear.tiles.tooling,androidx.wear.tiles.tooling.preview,androidx.wear.compose.material.core,androidx.wear,androidx.wear.watchface.complications,androidx.wear.protolayout.renderer,androidx.wear.compose.navigation , androidx.wear.protolayout,androidx.wear.protolayout.expression.pipeline, androidx.wear.protolayout.material,androidx.wear.protolayout.expression,com.google.android.horologist.compose.tools, androidx.wear.tiles, androidx.wear.protolayout.materialcore, androidx.wear.watchface.complications.data, androidx.wear.compose.foundation, androidx.wear.compose.material, com.google.android.horologist.tiles, androidx.wear.watchface.complications.datasource, kndroidx.wear.tile" />

<application
android:name=".MainApplication"
Expand Down Expand Up @@ -74,8 +74,8 @@
</intent-filter>
</activity>
<activity
android:name=".ui.device.DeviceActivity"
android:exported="false"
android:name="com.github.miwu.ui.device.DeviceActivity"
android:exported="true"
android:taskAffinity="" />
<activity
android:name=".ui.about.AboutActivity"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.github.miwu.logic.database

import androidx.room.AutoMigration
import androidx.room.Database
import androidx.room.RoomDatabase
import com.github.miwu.logic.database.dao.CrashDAO
Expand All @@ -9,14 +10,14 @@ import com.github.miwu.logic.database.entity.FavoriteDevice
import com.github.miwu.logic.database.entity.FavoriteDeviceMetadata

@Database(
version = 1,
version = 2,
entities = [
FavoriteDevice::class,
FavoriteDeviceMetadata::class,
CrashItem::class
],
exportSchema = true,
autoMigrations = []
autoMigrations = [AutoMigration(from = 1, to = 2)]
)
abstract class AppDatabase : RoomDatabase() {
abstract fun deviceDAO(): FavoriteDeviceDAO
Expand Down
Loading
Loading