fix(android): rename app package to ai.openclaw.app
This commit is contained in:
@@ -1,5 +1,35 @@
|
|||||||
import com.android.build.api.variant.impl.VariantOutputImpl
|
import com.android.build.api.variant.impl.VariantOutputImpl
|
||||||
|
|
||||||
|
val androidStoreFile = providers.gradleProperty("OPENCLAW_ANDROID_STORE_FILE").orNull?.takeIf { it.isNotBlank() }
|
||||||
|
val androidStorePassword = providers.gradleProperty("OPENCLAW_ANDROID_STORE_PASSWORD").orNull?.takeIf { it.isNotBlank() }
|
||||||
|
val androidKeyAlias = providers.gradleProperty("OPENCLAW_ANDROID_KEY_ALIAS").orNull?.takeIf { it.isNotBlank() }
|
||||||
|
val androidKeyPassword = providers.gradleProperty("OPENCLAW_ANDROID_KEY_PASSWORD").orNull?.takeIf { it.isNotBlank() }
|
||||||
|
val resolvedAndroidStoreFile =
|
||||||
|
androidStoreFile?.let { storeFilePath ->
|
||||||
|
if (storeFilePath.startsWith("~/")) {
|
||||||
|
"${System.getProperty("user.home")}/${storeFilePath.removePrefix("~/")}"
|
||||||
|
} else {
|
||||||
|
storeFilePath
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val hasAndroidReleaseSigning =
|
||||||
|
listOf(resolvedAndroidStoreFile, androidStorePassword, androidKeyAlias, androidKeyPassword).all { it != null }
|
||||||
|
|
||||||
|
val wantsAndroidReleaseBuild =
|
||||||
|
gradle.startParameter.taskNames.any { taskName ->
|
||||||
|
taskName.contains("Release", ignoreCase = true) ||
|
||||||
|
Regex("""(^|:)(bundle|assemble)$""").containsMatchIn(taskName)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (wantsAndroidReleaseBuild && !hasAndroidReleaseSigning) {
|
||||||
|
error(
|
||||||
|
"Missing Android release signing properties. Set OPENCLAW_ANDROID_STORE_FILE, " +
|
||||||
|
"OPENCLAW_ANDROID_STORE_PASSWORD, OPENCLAW_ANDROID_KEY_ALIAS, and " +
|
||||||
|
"OPENCLAW_ANDROID_KEY_PASSWORD in ~/.gradle/gradle.properties.",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application")
|
id("com.android.application")
|
||||||
id("org.jlleitschuh.gradle.ktlint")
|
id("org.jlleitschuh.gradle.ktlint")
|
||||||
@@ -8,9 +38,21 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "ai.openclaw.android"
|
namespace = "ai.openclaw.app"
|
||||||
compileSdk = 36
|
compileSdk = 36
|
||||||
|
|
||||||
|
// Release signing is local-only; keep the keystore path and passwords out of the repo.
|
||||||
|
signingConfigs {
|
||||||
|
if (hasAndroidReleaseSigning) {
|
||||||
|
create("release") {
|
||||||
|
storeFile = project.file(checkNotNull(resolvedAndroidStoreFile))
|
||||||
|
storePassword = checkNotNull(androidStorePassword)
|
||||||
|
keyAlias = checkNotNull(androidKeyAlias)
|
||||||
|
keyPassword = checkNotNull(androidKeyPassword)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
getByName("main") {
|
getByName("main") {
|
||||||
assets.directories.add("../../shared/OpenClawKit/Sources/OpenClawKit/Resources")
|
assets.directories.add("../../shared/OpenClawKit/Sources/OpenClawKit/Resources")
|
||||||
@@ -18,7 +60,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "ai.openclaw.android"
|
applicationId = "ai.openclaw.app"
|
||||||
minSdk = 31
|
minSdk = 31
|
||||||
targetSdk = 36
|
targetSdk = 36
|
||||||
versionCode = 202603010
|
versionCode = 202603010
|
||||||
@@ -31,6 +73,9 @@ android {
|
|||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
|
if (hasAndroidReleaseSigning) {
|
||||||
|
signingConfig = signingConfigs.getByName("release")
|
||||||
|
}
|
||||||
isMinifyEnabled = true
|
isMinifyEnabled = true
|
||||||
isShrinkResources = true
|
isShrinkResources = true
|
||||||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||||
|
|||||||
2
apps/android/app/proguard-rules.pro
vendored
2
apps/android/app/proguard-rules.pro
vendored
@@ -1,5 +1,5 @@
|
|||||||
# ── App classes ───────────────────────────────────────────────────
|
# ── App classes ───────────────────────────────────────────────────
|
||||||
-keep class ai.openclaw.android.** { *; }
|
-keep class ai.openclaw.app.** { *; }
|
||||||
|
|
||||||
# ── Bouncy Castle ─────────────────────────────────────────────────
|
# ── Bouncy Castle ─────────────────────────────────────────────────
|
||||||
-keep class org.bouncycastle.** { *; }
|
-keep class org.bouncycastle.** { *; }
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android
|
package ai.openclaw.app
|
||||||
|
|
||||||
enum class CameraHudKind {
|
enum class CameraHudKind {
|
||||||
Photo,
|
Photo,
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android
|
package ai.openclaw.app
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android
|
package ai.openclaw.app
|
||||||
|
|
||||||
import android.content.BroadcastReceiver
|
import android.content.BroadcastReceiver
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android
|
package ai.openclaw.app
|
||||||
|
|
||||||
enum class LocationMode(val rawValue: String) {
|
enum class LocationMode(val rawValue: String) {
|
||||||
Off("off"),
|
Off("off"),
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android
|
package ai.openclaw.app
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
@@ -11,8 +11,8 @@ import androidx.compose.ui.Modifier
|
|||||||
import androidx.lifecycle.Lifecycle
|
import androidx.lifecycle.Lifecycle
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import androidx.lifecycle.repeatOnLifecycle
|
import androidx.lifecycle.repeatOnLifecycle
|
||||||
import ai.openclaw.android.ui.RootScreen
|
import ai.openclaw.app.ui.RootScreen
|
||||||
import ai.openclaw.android.ui.OpenClawTheme
|
import ai.openclaw.app.ui.OpenClawTheme
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
class MainActivity : ComponentActivity() {
|
class MainActivity : ComponentActivity() {
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
package ai.openclaw.android
|
package ai.openclaw.app
|
||||||
|
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
import androidx.lifecycle.AndroidViewModel
|
import androidx.lifecycle.AndroidViewModel
|
||||||
import ai.openclaw.android.gateway.GatewayEndpoint
|
import ai.openclaw.app.gateway.GatewayEndpoint
|
||||||
import ai.openclaw.android.chat.OutgoingAttachment
|
import ai.openclaw.app.chat.OutgoingAttachment
|
||||||
import ai.openclaw.android.node.CameraCaptureManager
|
import ai.openclaw.app.node.CameraCaptureManager
|
||||||
import ai.openclaw.android.node.CanvasController
|
import ai.openclaw.app.node.CanvasController
|
||||||
import ai.openclaw.android.node.ScreenRecordManager
|
import ai.openclaw.app.node.ScreenRecordManager
|
||||||
import ai.openclaw.android.node.SmsManager
|
import ai.openclaw.app.node.SmsManager
|
||||||
import ai.openclaw.android.voice.VoiceConversationEntry
|
import ai.openclaw.app.voice.VoiceConversationEntry
|
||||||
import kotlinx.coroutines.flow.StateFlow
|
import kotlinx.coroutines.flow.StateFlow
|
||||||
|
|
||||||
class MainViewModel(app: Application) : AndroidViewModel(app) {
|
class MainViewModel(app: Application) : AndroidViewModel(app) {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android
|
package ai.openclaw.app
|
||||||
|
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
import android.os.StrictMode
|
import android.os.StrictMode
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android
|
package ai.openclaw.app
|
||||||
|
|
||||||
import android.app.Notification
|
import android.app.Notification
|
||||||
import android.app.NotificationChannel
|
import android.app.NotificationChannel
|
||||||
@@ -163,7 +163,7 @@ class NodeForegroundService : Service() {
|
|||||||
private const val CHANNEL_ID = "connection"
|
private const val CHANNEL_ID = "connection"
|
||||||
private const val NOTIFICATION_ID = 1
|
private const val NOTIFICATION_ID = 1
|
||||||
|
|
||||||
private const val ACTION_STOP = "ai.openclaw.android.action.STOP"
|
private const val ACTION_STOP = "ai.openclaw.app.action.STOP"
|
||||||
|
|
||||||
fun start(context: Context) {
|
fun start(context: Context) {
|
||||||
val intent = Intent(context, NodeForegroundService::class.java)
|
val intent = Intent(context, NodeForegroundService::class.java)
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android
|
package ai.openclaw.app
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
@@ -6,22 +6,22 @@ import android.content.pm.PackageManager
|
|||||||
import android.os.SystemClock
|
import android.os.SystemClock
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import ai.openclaw.android.chat.ChatController
|
import ai.openclaw.app.chat.ChatController
|
||||||
import ai.openclaw.android.chat.ChatMessage
|
import ai.openclaw.app.chat.ChatMessage
|
||||||
import ai.openclaw.android.chat.ChatPendingToolCall
|
import ai.openclaw.app.chat.ChatPendingToolCall
|
||||||
import ai.openclaw.android.chat.ChatSessionEntry
|
import ai.openclaw.app.chat.ChatSessionEntry
|
||||||
import ai.openclaw.android.chat.OutgoingAttachment
|
import ai.openclaw.app.chat.OutgoingAttachment
|
||||||
import ai.openclaw.android.gateway.DeviceAuthStore
|
import ai.openclaw.app.gateway.DeviceAuthStore
|
||||||
import ai.openclaw.android.gateway.DeviceIdentityStore
|
import ai.openclaw.app.gateway.DeviceIdentityStore
|
||||||
import ai.openclaw.android.gateway.GatewayDiscovery
|
import ai.openclaw.app.gateway.GatewayDiscovery
|
||||||
import ai.openclaw.android.gateway.GatewayEndpoint
|
import ai.openclaw.app.gateway.GatewayEndpoint
|
||||||
import ai.openclaw.android.gateway.GatewaySession
|
import ai.openclaw.app.gateway.GatewaySession
|
||||||
import ai.openclaw.android.gateway.probeGatewayTlsFingerprint
|
import ai.openclaw.app.gateway.probeGatewayTlsFingerprint
|
||||||
import ai.openclaw.android.node.*
|
import ai.openclaw.app.node.*
|
||||||
import ai.openclaw.android.protocol.OpenClawCanvasA2UIAction
|
import ai.openclaw.app.protocol.OpenClawCanvasA2UIAction
|
||||||
import ai.openclaw.android.voice.MicCaptureManager
|
import ai.openclaw.app.voice.MicCaptureManager
|
||||||
import ai.openclaw.android.voice.TalkModeManager
|
import ai.openclaw.app.voice.TalkModeManager
|
||||||
import ai.openclaw.android.voice.VoiceConversationEntry
|
import ai.openclaw.app.voice.VoiceConversationEntry
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android
|
package ai.openclaw.app
|
||||||
|
|
||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android
|
package ai.openclaw.app
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
@file:Suppress("DEPRECATION")
|
@file:Suppress("DEPRECATION")
|
||||||
|
|
||||||
package ai.openclaw.android
|
package ai.openclaw.app
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android
|
package ai.openclaw.app
|
||||||
|
|
||||||
internal fun normalizeMainKey(raw: String?): String {
|
internal fun normalizeMainKey(raw: String?): String {
|
||||||
val trimmed = raw?.trim()
|
val trimmed = raw?.trim()
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android
|
package ai.openclaw.app
|
||||||
|
|
||||||
enum class VoiceWakeMode(val rawValue: String) {
|
enum class VoiceWakeMode(val rawValue: String) {
|
||||||
Off("off"),
|
Off("off"),
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android
|
package ai.openclaw.app
|
||||||
|
|
||||||
object WakeWords {
|
object WakeWords {
|
||||||
const val maxWords: Int = 32
|
const val maxWords: Int = 32
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package ai.openclaw.android.chat
|
package ai.openclaw.app.chat
|
||||||
|
|
||||||
import ai.openclaw.android.gateway.GatewaySession
|
import ai.openclaw.app.gateway.GatewaySession
|
||||||
import java.util.UUID
|
import java.util.UUID
|
||||||
import java.util.concurrent.ConcurrentHashMap
|
import java.util.concurrent.ConcurrentHashMap
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.chat
|
package ai.openclaw.app.chat
|
||||||
|
|
||||||
data class ChatMessage(
|
data class ChatMessage(
|
||||||
val id: String,
|
val id: String,
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.gateway
|
package ai.openclaw.app.gateway
|
||||||
|
|
||||||
object BonjourEscapes {
|
object BonjourEscapes {
|
||||||
fun decode(input: String): String {
|
fun decode(input: String): String {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.gateway
|
package ai.openclaw.app.gateway
|
||||||
|
|
||||||
internal object DeviceAuthPayload {
|
internal object DeviceAuthPayload {
|
||||||
fun buildV3(
|
fun buildV3(
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package ai.openclaw.android.gateway
|
package ai.openclaw.app.gateway
|
||||||
|
|
||||||
import ai.openclaw.android.SecurePrefs
|
import ai.openclaw.app.SecurePrefs
|
||||||
|
|
||||||
interface DeviceAuthTokenStore {
|
interface DeviceAuthTokenStore {
|
||||||
fun loadToken(deviceId: String, role: String): String?
|
fun loadToken(deviceId: String, role: String): String?
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.gateway
|
package ai.openclaw.app.gateway
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.util.Base64
|
import android.util.Base64
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.gateway
|
package ai.openclaw.app.gateway
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.net.ConnectivityManager
|
import android.net.ConnectivityManager
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.gateway
|
package ai.openclaw.app.gateway
|
||||||
|
|
||||||
data class GatewayEndpoint(
|
data class GatewayEndpoint(
|
||||||
val stableId: String,
|
val stableId: String,
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
package ai.openclaw.android.gateway
|
package ai.openclaw.app.gateway
|
||||||
|
|
||||||
const val GATEWAY_PROTOCOL_VERSION = 3
|
const val GATEWAY_PROTOCOL_VERSION = 3
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.gateway
|
package ai.openclaw.app.gateway
|
||||||
|
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.gateway
|
package ai.openclaw.app.gateway
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.gateway
|
package ai.openclaw.app.gateway
|
||||||
|
|
||||||
data class ParsedInvokeError(
|
data class ParsedInvokeError(
|
||||||
val code: String,
|
val code: String,
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import ai.openclaw.android.gateway.GatewaySession
|
import ai.openclaw.app.gateway.GatewaySession
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import kotlinx.serialization.json.JsonArray
|
import kotlinx.serialization.json.JsonArray
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import android.app.PendingIntent
|
import android.app.PendingIntent
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import ai.openclaw.android.InstallResultReceiver
|
import ai.openclaw.app.InstallResultReceiver
|
||||||
import ai.openclaw.android.MainActivity
|
import ai.openclaw.app.MainActivity
|
||||||
import ai.openclaw.android.gateway.GatewayEndpoint
|
import ai.openclaw.app.gateway.GatewayEndpoint
|
||||||
import ai.openclaw.android.gateway.GatewaySession
|
import ai.openclaw.app.gateway.GatewaySession
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
import java.security.MessageDigest
|
import java.security.MessageDigest
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.content.ContentResolver
|
import android.content.ContentResolver
|
||||||
@@ -7,7 +7,7 @@ import android.content.ContentValues
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.provider.CalendarContract
|
import android.provider.CalendarContract
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import ai.openclaw.android.gateway.GatewaySession
|
import ai.openclaw.app.gateway.GatewaySession
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
import java.time.temporal.ChronoUnit
|
import java.time.temporal.ChronoUnit
|
||||||
import java.util.TimeZone
|
import java.util.TimeZone
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
@@ -28,7 +28,7 @@ import androidx.camera.video.VideoRecordEvent
|
|||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.core.content.ContextCompat.checkSelfPermission
|
import androidx.core.content.ContextCompat.checkSelfPermission
|
||||||
import androidx.core.graphics.scale
|
import androidx.core.graphics.scale
|
||||||
import ai.openclaw.android.PermissionRequester
|
import ai.openclaw.app.PermissionRequester
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.suspendCancellableCoroutine
|
import kotlinx.coroutines.suspendCancellableCoroutine
|
||||||
import kotlinx.coroutines.withTimeout
|
import kotlinx.coroutines.withTimeout
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import ai.openclaw.android.CameraHudKind
|
import ai.openclaw.app.CameraHudKind
|
||||||
import ai.openclaw.android.BuildConfig
|
import ai.openclaw.app.BuildConfig
|
||||||
import ai.openclaw.android.gateway.GatewaySession
|
import ai.openclaw.app.gateway.GatewaySession
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.flow.MutableStateFlow
|
import kotlinx.coroutines.flow.MutableStateFlow
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
import android.graphics.Canvas
|
import android.graphics.Canvas
|
||||||
@@ -20,7 +20,7 @@ import kotlinx.serialization.json.Json
|
|||||||
import kotlinx.serialization.json.JsonElement
|
import kotlinx.serialization.json.JsonElement
|
||||||
import kotlinx.serialization.json.JsonObject
|
import kotlinx.serialization.json.JsonObject
|
||||||
import kotlinx.serialization.json.JsonPrimitive
|
import kotlinx.serialization.json.JsonPrimitive
|
||||||
import ai.openclaw.android.BuildConfig
|
import ai.openclaw.app.BuildConfig
|
||||||
import kotlin.coroutines.resume
|
import kotlin.coroutines.resume
|
||||||
|
|
||||||
class CanvasController {
|
class CanvasController {
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import ai.openclaw.android.BuildConfig
|
import ai.openclaw.app.BuildConfig
|
||||||
import ai.openclaw.android.SecurePrefs
|
import ai.openclaw.app.SecurePrefs
|
||||||
import ai.openclaw.android.gateway.GatewayClientInfo
|
import ai.openclaw.app.gateway.GatewayClientInfo
|
||||||
import ai.openclaw.android.gateway.GatewayConnectOptions
|
import ai.openclaw.app.gateway.GatewayConnectOptions
|
||||||
import ai.openclaw.android.gateway.GatewayEndpoint
|
import ai.openclaw.app.gateway.GatewayEndpoint
|
||||||
import ai.openclaw.android.gateway.GatewayTlsParams
|
import ai.openclaw.app.gateway.GatewayTlsParams
|
||||||
import ai.openclaw.android.LocationMode
|
import ai.openclaw.app.LocationMode
|
||||||
import ai.openclaw.android.VoiceWakeMode
|
import ai.openclaw.app.VoiceWakeMode
|
||||||
|
|
||||||
class ConnectionManager(
|
class ConnectionManager(
|
||||||
private val prefs: SecurePrefs,
|
private val prefs: SecurePrefs,
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.content.ContentProviderOperation
|
import android.content.ContentProviderOperation
|
||||||
@@ -7,7 +7,7 @@ import android.content.ContentValues
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.provider.ContactsContract
|
import android.provider.ContactsContract
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import ai.openclaw.android.gateway.GatewaySession
|
import ai.openclaw.app.gateway.GatewaySession
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import kotlinx.serialization.json.JsonArray
|
import kotlinx.serialization.json.JsonArray
|
||||||
import kotlinx.serialization.json.JsonObject
|
import kotlinx.serialization.json.JsonObject
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import ai.openclaw.android.BuildConfig
|
import ai.openclaw.app.BuildConfig
|
||||||
import ai.openclaw.android.gateway.DeviceIdentityStore
|
import ai.openclaw.app.gateway.DeviceIdentityStore
|
||||||
import ai.openclaw.android.gateway.GatewaySession
|
import ai.openclaw.app.gateway.GatewaySession
|
||||||
import kotlinx.serialization.json.JsonPrimitive
|
import kotlinx.serialization.json.JsonPrimitive
|
||||||
|
|
||||||
class DebugHandler(
|
class DebugHandler(
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.app.ActivityManager
|
import android.app.ActivityManager
|
||||||
@@ -15,8 +15,8 @@ import android.os.PowerManager
|
|||||||
import android.os.StatFs
|
import android.os.StatFs
|
||||||
import android.os.SystemClock
|
import android.os.SystemClock
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import ai.openclaw.android.BuildConfig
|
import ai.openclaw.app.BuildConfig
|
||||||
import ai.openclaw.android.gateway.GatewaySession
|
import ai.openclaw.app.gateway.GatewaySession
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import kotlinx.serialization.json.JsonPrimitive
|
import kotlinx.serialization.json.JsonPrimitive
|
||||||
import kotlinx.serialization.json.buildJsonArray
|
import kotlinx.serialization.json.buildJsonArray
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import android.app.Notification
|
import android.app.Notification
|
||||||
import android.app.NotificationManager
|
import android.app.NotificationManager
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import ai.openclaw.android.SecurePrefs
|
import ai.openclaw.app.SecurePrefs
|
||||||
import ai.openclaw.android.gateway.GatewaySession
|
import ai.openclaw.app.gateway.GatewaySession
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
@@ -1,19 +1,19 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import ai.openclaw.android.protocol.OpenClawCalendarCommand
|
import ai.openclaw.app.protocol.OpenClawCalendarCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawCanvasA2UICommand
|
import ai.openclaw.app.protocol.OpenClawCanvasA2UICommand
|
||||||
import ai.openclaw.android.protocol.OpenClawCanvasCommand
|
import ai.openclaw.app.protocol.OpenClawCanvasCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawCameraCommand
|
import ai.openclaw.app.protocol.OpenClawCameraCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawCapability
|
import ai.openclaw.app.protocol.OpenClawCapability
|
||||||
import ai.openclaw.android.protocol.OpenClawContactsCommand
|
import ai.openclaw.app.protocol.OpenClawContactsCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawDeviceCommand
|
import ai.openclaw.app.protocol.OpenClawDeviceCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawLocationCommand
|
import ai.openclaw.app.protocol.OpenClawLocationCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawMotionCommand
|
import ai.openclaw.app.protocol.OpenClawMotionCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawNotificationsCommand
|
import ai.openclaw.app.protocol.OpenClawNotificationsCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawPhotosCommand
|
import ai.openclaw.app.protocol.OpenClawPhotosCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawScreenCommand
|
import ai.openclaw.app.protocol.OpenClawScreenCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawSmsCommand
|
import ai.openclaw.app.protocol.OpenClawSmsCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawSystemCommand
|
import ai.openclaw.app.protocol.OpenClawSystemCommand
|
||||||
|
|
||||||
data class NodeRuntimeFlags(
|
data class NodeRuntimeFlags(
|
||||||
val cameraEnabled: Boolean,
|
val cameraEnabled: Boolean,
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import ai.openclaw.android.gateway.GatewaySession
|
import ai.openclaw.app.gateway.GatewaySession
|
||||||
import ai.openclaw.android.protocol.OpenClawCalendarCommand
|
import ai.openclaw.app.protocol.OpenClawCalendarCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawCanvasA2UICommand
|
import ai.openclaw.app.protocol.OpenClawCanvasA2UICommand
|
||||||
import ai.openclaw.android.protocol.OpenClawCanvasCommand
|
import ai.openclaw.app.protocol.OpenClawCanvasCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawCameraCommand
|
import ai.openclaw.app.protocol.OpenClawCameraCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawContactsCommand
|
import ai.openclaw.app.protocol.OpenClawContactsCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawDeviceCommand
|
import ai.openclaw.app.protocol.OpenClawDeviceCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawLocationCommand
|
import ai.openclaw.app.protocol.OpenClawLocationCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawMotionCommand
|
import ai.openclaw.app.protocol.OpenClawMotionCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawNotificationsCommand
|
import ai.openclaw.app.protocol.OpenClawNotificationsCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawScreenCommand
|
import ai.openclaw.app.protocol.OpenClawScreenCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawSmsCommand
|
import ai.openclaw.app.protocol.OpenClawSmsCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawSystemCommand
|
import ai.openclaw.app.protocol.OpenClawSystemCommand
|
||||||
|
|
||||||
class InvokeDispatcher(
|
class InvokeDispatcher(
|
||||||
private val canvas: CanvasController,
|
private val canvas: CanvasController,
|
||||||
@@ -145,7 +145,7 @@ class InvokeDispatcher(
|
|||||||
OpenClawSystemCommand.Notify.rawValue -> systemHandler.handleSystemNotify(paramsJson)
|
OpenClawSystemCommand.Notify.rawValue -> systemHandler.handleSystemNotify(paramsJson)
|
||||||
|
|
||||||
// Photos command
|
// Photos command
|
||||||
ai.openclaw.android.protocol.OpenClawPhotosCommand.Latest.rawValue -> photosHandler.handlePhotosLatest(
|
ai.openclaw.app.protocol.OpenClawPhotosCommand.Latest.rawValue -> photosHandler.handlePhotosLatest(
|
||||||
paramsJson,
|
paramsJson,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import kotlin.math.max
|
import kotlin.math.max
|
||||||
import kotlin.math.min
|
import kotlin.math.min
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
import android.location.LocationManager
|
import android.location.LocationManager
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import ai.openclaw.android.LocationMode
|
import ai.openclaw.app.LocationMode
|
||||||
import ai.openclaw.android.gateway.GatewaySession
|
import ai.openclaw.app.gateway.GatewaySession
|
||||||
import kotlinx.coroutines.TimeoutCancellationException
|
import kotlinx.coroutines.TimeoutCancellationException
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import kotlinx.serialization.json.JsonObject
|
import kotlinx.serialization.json.JsonObject
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
@@ -8,7 +8,7 @@ import android.hardware.SensorEventListener
|
|||||||
import android.hardware.SensorManager
|
import android.hardware.SensorManager
|
||||||
import android.os.SystemClock
|
import android.os.SystemClock
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import ai.openclaw.android.gateway.GatewaySession
|
import ai.openclaw.app.gateway.GatewaySession
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
import kotlinx.coroutines.suspendCancellableCoroutine
|
import kotlinx.coroutines.suspendCancellableCoroutine
|
||||||
import kotlinx.coroutines.withTimeoutOrNull
|
import kotlinx.coroutines.withTimeoutOrNull
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import ai.openclaw.android.gateway.parseInvokeErrorFromThrowable
|
import ai.openclaw.app.gateway.parseInvokeErrorFromThrowable
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import kotlinx.serialization.json.JsonElement
|
import kotlinx.serialization.json.JsonElement
|
||||||
import kotlinx.serialization.json.JsonNull
|
import kotlinx.serialization.json.JsonNull
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import ai.openclaw.android.gateway.GatewaySession
|
import ai.openclaw.app.gateway.GatewaySession
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import kotlinx.serialization.json.JsonArray
|
import kotlinx.serialization.json.JsonArray
|
||||||
import kotlinx.serialization.json.JsonObject
|
import kotlinx.serialization.json.JsonObject
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.content.ContentResolver
|
import android.content.ContentResolver
|
||||||
@@ -12,7 +12,7 @@ import android.os.Bundle
|
|||||||
import android.provider.MediaStore
|
import android.provider.MediaStore
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.core.graphics.scale
|
import androidx.core.graphics.scale
|
||||||
import ai.openclaw.android.gateway.GatewaySession
|
import ai.openclaw.app.gateway.GatewaySession
|
||||||
import java.io.ByteArrayOutputStream
|
import java.io.ByteArrayOutputStream
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
import kotlin.math.max
|
import kotlin.math.max
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import ai.openclaw.android.gateway.GatewaySession
|
import ai.openclaw.app.gateway.GatewaySession
|
||||||
|
|
||||||
class ScreenHandler(
|
class ScreenHandler(
|
||||||
private val screenRecorder: ScreenRecordManager,
|
private val screenRecorder: ScreenRecordManager,
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.hardware.display.DisplayManager
|
import android.hardware.display.DisplayManager
|
||||||
@@ -6,7 +6,7 @@ import android.media.MediaRecorder
|
|||||||
import android.media.projection.MediaProjectionManager
|
import android.media.projection.MediaProjectionManager
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.util.Base64
|
import android.util.Base64
|
||||||
import ai.openclaw.android.ScreenCaptureRequester
|
import ai.openclaw.app.ScreenCaptureRequester
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
@@ -18,13 +18,13 @@ class ScreenRecordManager(private val context: Context) {
|
|||||||
data class Payload(val payloadJson: String)
|
data class Payload(val payloadJson: String)
|
||||||
|
|
||||||
@Volatile private var screenCaptureRequester: ScreenCaptureRequester? = null
|
@Volatile private var screenCaptureRequester: ScreenCaptureRequester? = null
|
||||||
@Volatile private var permissionRequester: ai.openclaw.android.PermissionRequester? = null
|
@Volatile private var permissionRequester: ai.openclaw.app.PermissionRequester? = null
|
||||||
|
|
||||||
fun attachScreenCaptureRequester(requester: ScreenCaptureRequester) {
|
fun attachScreenCaptureRequester(requester: ScreenCaptureRequester) {
|
||||||
screenCaptureRequester = requester
|
screenCaptureRequester = requester
|
||||||
}
|
}
|
||||||
|
|
||||||
fun attachPermissionRequester(requester: ai.openclaw.android.PermissionRequester) {
|
fun attachPermissionRequester(requester: ai.openclaw.app.PermissionRequester) {
|
||||||
permissionRequester = requester
|
permissionRequester = requester
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import ai.openclaw.android.gateway.GatewaySession
|
import ai.openclaw.app.gateway.GatewaySession
|
||||||
|
|
||||||
class SmsHandler(
|
class SmsHandler(
|
||||||
private val sms: SmsManager,
|
private val sms: SmsManager,
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
@@ -11,7 +11,7 @@ import kotlinx.serialization.json.JsonObject
|
|||||||
import kotlinx.serialization.json.JsonPrimitive
|
import kotlinx.serialization.json.JsonPrimitive
|
||||||
import kotlinx.serialization.json.jsonObject
|
import kotlinx.serialization.json.jsonObject
|
||||||
import kotlinx.serialization.encodeToString
|
import kotlinx.serialization.encodeToString
|
||||||
import ai.openclaw.android.PermissionRequester
|
import ai.openclaw.app.PermissionRequester
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends SMS messages via the Android SMS API.
|
* Sends SMS messages via the Android SMS API.
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.app.NotificationChannel
|
import android.app.NotificationChannel
|
||||||
@@ -9,7 +9,7 @@ import android.os.Build
|
|||||||
import androidx.core.app.NotificationCompat
|
import androidx.core.app.NotificationCompat
|
||||||
import androidx.core.app.NotificationManagerCompat
|
import androidx.core.app.NotificationManagerCompat
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import ai.openclaw.android.gateway.GatewaySession
|
import ai.openclaw.app.gateway.GatewaySession
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import kotlinx.serialization.json.JsonObject
|
import kotlinx.serialization.json.JsonObject
|
||||||
import kotlinx.serialization.json.JsonPrimitive
|
import kotlinx.serialization.json.JsonPrimitive
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.protocol
|
package ai.openclaw.app.protocol
|
||||||
|
|
||||||
import kotlinx.serialization.json.JsonObject
|
import kotlinx.serialization.json.JsonObject
|
||||||
import kotlinx.serialization.json.JsonPrimitive
|
import kotlinx.serialization.json.JsonPrimitive
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.protocol
|
package ai.openclaw.app.protocol
|
||||||
|
|
||||||
enum class OpenClawCapability(val rawValue: String) {
|
enum class OpenClawCapability(val rawValue: String) {
|
||||||
Canvas("canvas"),
|
Canvas("canvas"),
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.tools
|
package ai.openclaw.app.tools
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.ui
|
package ai.openclaw.app.ui
|
||||||
|
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.ui
|
package ai.openclaw.app.ui
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
@@ -21,7 +21,7 @@ import androidx.compose.ui.platform.LocalContext
|
|||||||
import androidx.compose.ui.viewinterop.AndroidView
|
import androidx.compose.ui.viewinterop.AndroidView
|
||||||
import androidx.webkit.WebSettingsCompat
|
import androidx.webkit.WebSettingsCompat
|
||||||
import androidx.webkit.WebViewFeature
|
import androidx.webkit.WebViewFeature
|
||||||
import ai.openclaw.android.MainViewModel
|
import ai.openclaw.app.MainViewModel
|
||||||
|
|
||||||
@SuppressLint("SetJavaScriptEnabled")
|
@SuppressLint("SetJavaScriptEnabled")
|
||||||
@Composable
|
@Composable
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package ai.openclaw.android.ui
|
package ai.openclaw.app.ui
|
||||||
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import ai.openclaw.android.MainViewModel
|
import ai.openclaw.app.MainViewModel
|
||||||
import ai.openclaw.android.ui.chat.ChatSheetContent
|
import ai.openclaw.app.ui.chat.ChatSheetContent
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun ChatSheet(viewModel: MainViewModel) {
|
fun ChatSheet(viewModel: MainViewModel) {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.ui
|
package ai.openclaw.app.ui
|
||||||
|
|
||||||
import androidx.compose.animation.AnimatedVisibility
|
import androidx.compose.animation.AnimatedVisibility
|
||||||
import androidx.compose.foundation.BorderStroke
|
import androidx.compose.foundation.BorderStroke
|
||||||
@@ -46,7 +46,7 @@ import androidx.compose.ui.text.font.FontFamily
|
|||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
import androidx.compose.ui.text.input.KeyboardType
|
import androidx.compose.ui.text.input.KeyboardType
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import ai.openclaw.android.MainViewModel
|
import ai.openclaw.app.MainViewModel
|
||||||
|
|
||||||
private enum class ConnectInputMode {
|
private enum class ConnectInputMode {
|
||||||
SetupCode,
|
SetupCode,
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.ui
|
package ai.openclaw.app.ui
|
||||||
|
|
||||||
import androidx.core.net.toUri
|
import androidx.core.net.toUri
|
||||||
import java.util.Base64
|
import java.util.Base64
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.ui
|
package ai.openclaw.app.ui
|
||||||
|
|
||||||
import androidx.compose.ui.graphics.Brush
|
import androidx.compose.ui.graphics.Brush
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
@@ -7,7 +7,7 @@ import androidx.compose.ui.text.font.Font
|
|||||||
import androidx.compose.ui.text.font.FontFamily
|
import androidx.compose.ui.text.font.FontFamily
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import ai.openclaw.android.R
|
import ai.openclaw.app.R
|
||||||
|
|
||||||
internal val mobileBackgroundGradient =
|
internal val mobileBackgroundGradient =
|
||||||
Brush.verticalGradient(
|
Brush.verticalGradient(
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.ui
|
package ai.openclaw.app.ui
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
@@ -84,10 +84,10 @@ import androidx.core.net.toUri
|
|||||||
import androidx.lifecycle.Lifecycle
|
import androidx.lifecycle.Lifecycle
|
||||||
import androidx.lifecycle.LifecycleEventObserver
|
import androidx.lifecycle.LifecycleEventObserver
|
||||||
import androidx.lifecycle.compose.LocalLifecycleOwner
|
import androidx.lifecycle.compose.LocalLifecycleOwner
|
||||||
import ai.openclaw.android.LocationMode
|
import ai.openclaw.app.LocationMode
|
||||||
import ai.openclaw.android.MainViewModel
|
import ai.openclaw.app.MainViewModel
|
||||||
import ai.openclaw.android.R
|
import ai.openclaw.app.R
|
||||||
import ai.openclaw.android.node.DeviceNotificationListenerService
|
import ai.openclaw.app.node.DeviceNotificationListenerService
|
||||||
import com.journeyapps.barcodescanner.ScanContract
|
import com.journeyapps.barcodescanner.ScanContract
|
||||||
import com.journeyapps.barcodescanner.ScanOptions
|
import com.journeyapps.barcodescanner.ScanOptions
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.ui
|
package ai.openclaw.app.ui
|
||||||
|
|
||||||
import androidx.compose.foundation.isSystemInDarkTheme
|
import androidx.compose.foundation.isSystemInDarkTheme
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.ui
|
package ai.openclaw.app.ui
|
||||||
|
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.BorderStroke
|
import androidx.compose.foundation.BorderStroke
|
||||||
@@ -44,7 +44,7 @@ import androidx.compose.ui.graphics.vector.ImageVector
|
|||||||
import androidx.compose.ui.platform.LocalDensity
|
import androidx.compose.ui.platform.LocalDensity
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import ai.openclaw.android.MainViewModel
|
import ai.openclaw.app.MainViewModel
|
||||||
|
|
||||||
private enum class HomeTab(
|
private enum class HomeTab(
|
||||||
val label: String,
|
val label: String,
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package ai.openclaw.android.ui
|
package ai.openclaw.app.ui
|
||||||
|
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.collectAsState
|
import androidx.compose.runtime.collectAsState
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import ai.openclaw.android.MainViewModel
|
import ai.openclaw.app.MainViewModel
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun RootScreen(viewModel: MainViewModel) {
|
fun RootScreen(viewModel: MainViewModel) {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.ui
|
package ai.openclaw.app.ui
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
@@ -66,10 +66,10 @@ import androidx.core.net.toUri
|
|||||||
import androidx.lifecycle.Lifecycle
|
import androidx.lifecycle.Lifecycle
|
||||||
import androidx.lifecycle.LifecycleEventObserver
|
import androidx.lifecycle.LifecycleEventObserver
|
||||||
import androidx.lifecycle.compose.LocalLifecycleOwner
|
import androidx.lifecycle.compose.LocalLifecycleOwner
|
||||||
import ai.openclaw.android.BuildConfig
|
import ai.openclaw.app.BuildConfig
|
||||||
import ai.openclaw.android.LocationMode
|
import ai.openclaw.app.LocationMode
|
||||||
import ai.openclaw.android.MainViewModel
|
import ai.openclaw.app.MainViewModel
|
||||||
import ai.openclaw.android.node.DeviceNotificationListenerService
|
import ai.openclaw.app.node.DeviceNotificationListenerService
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun SettingsSheet(viewModel: MainViewModel) {
|
fun SettingsSheet(viewModel: MainViewModel) {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.ui
|
package ai.openclaw.app.ui
|
||||||
|
|
||||||
import androidx.compose.animation.core.LinearEasing
|
import androidx.compose.animation.core.LinearEasing
|
||||||
import androidx.compose.animation.core.RepeatMode
|
import androidx.compose.animation.core.RepeatMode
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.ui
|
package ai.openclaw.app.ui
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
@@ -66,9 +66,9 @@ import androidx.core.content.ContextCompat
|
|||||||
import androidx.lifecycle.Lifecycle
|
import androidx.lifecycle.Lifecycle
|
||||||
import androidx.lifecycle.LifecycleEventObserver
|
import androidx.lifecycle.LifecycleEventObserver
|
||||||
import androidx.lifecycle.compose.LocalLifecycleOwner
|
import androidx.lifecycle.compose.LocalLifecycleOwner
|
||||||
import ai.openclaw.android.MainViewModel
|
import ai.openclaw.app.MainViewModel
|
||||||
import ai.openclaw.android.voice.VoiceConversationEntry
|
import ai.openclaw.app.voice.VoiceConversationEntry
|
||||||
import ai.openclaw.android.voice.VoiceConversationRole
|
import ai.openclaw.app.voice.VoiceConversationRole
|
||||||
import kotlin.math.max
|
import kotlin.math.max
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.ui.chat
|
package ai.openclaw.app.ui.chat
|
||||||
|
|
||||||
import android.graphics.BitmapFactory
|
import android.graphics.BitmapFactory
|
||||||
import android.util.Base64
|
import android.util.Base64
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.ui.chat
|
package ai.openclaw.app.ui.chat
|
||||||
|
|
||||||
import androidx.compose.foundation.BorderStroke
|
import androidx.compose.foundation.BorderStroke
|
||||||
import androidx.compose.foundation.horizontalScroll
|
import androidx.compose.foundation.horizontalScroll
|
||||||
@@ -46,17 +46,17 @@ import androidx.compose.ui.text.font.FontWeight
|
|||||||
import androidx.compose.ui.text.style.TextOverflow
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import ai.openclaw.android.ui.mobileAccent
|
import ai.openclaw.app.ui.mobileAccent
|
||||||
import ai.openclaw.android.ui.mobileAccentSoft
|
import ai.openclaw.app.ui.mobileAccentSoft
|
||||||
import ai.openclaw.android.ui.mobileBorder
|
import ai.openclaw.app.ui.mobileBorder
|
||||||
import ai.openclaw.android.ui.mobileBorderStrong
|
import ai.openclaw.app.ui.mobileBorderStrong
|
||||||
import ai.openclaw.android.ui.mobileCallout
|
import ai.openclaw.app.ui.mobileCallout
|
||||||
import ai.openclaw.android.ui.mobileCaption1
|
import ai.openclaw.app.ui.mobileCaption1
|
||||||
import ai.openclaw.android.ui.mobileHeadline
|
import ai.openclaw.app.ui.mobileHeadline
|
||||||
import ai.openclaw.android.ui.mobileSurface
|
import ai.openclaw.app.ui.mobileSurface
|
||||||
import ai.openclaw.android.ui.mobileText
|
import ai.openclaw.app.ui.mobileText
|
||||||
import ai.openclaw.android.ui.mobileTextSecondary
|
import ai.openclaw.app.ui.mobileTextSecondary
|
||||||
import ai.openclaw.android.ui.mobileTextTertiary
|
import ai.openclaw.app.ui.mobileTextTertiary
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun ChatComposer(
|
fun ChatComposer(
|
||||||
@@ -148,7 +148,7 @@ fun ChatComposer(
|
|||||||
Text(
|
Text(
|
||||||
text = "Gateway is offline. Connect first in the Connect tab.",
|
text = "Gateway is offline. Connect first in the Connect tab.",
|
||||||
style = mobileCallout,
|
style = mobileCallout,
|
||||||
color = ai.openclaw.android.ui.mobileWarning,
|
color = ai.openclaw.app.ui.mobileWarning,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -346,7 +346,7 @@ private fun chatTextFieldColors() =
|
|||||||
@Composable
|
@Composable
|
||||||
private fun mobileBodyStyle() =
|
private fun mobileBodyStyle() =
|
||||||
MaterialTheme.typography.bodyMedium.copy(
|
MaterialTheme.typography.bodyMedium.copy(
|
||||||
fontFamily = ai.openclaw.android.ui.mobileFontFamily,
|
fontFamily = ai.openclaw.app.ui.mobileFontFamily,
|
||||||
fontWeight = FontWeight.Medium,
|
fontWeight = FontWeight.Medium,
|
||||||
fontSize = 15.sp,
|
fontSize = 15.sp,
|
||||||
lineHeight = 22.sp,
|
lineHeight = 22.sp,
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.ui.chat
|
package ai.openclaw.app.ui.chat
|
||||||
|
|
||||||
import androidx.compose.foundation.Image
|
import androidx.compose.foundation.Image
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
@@ -34,12 +34,12 @@ import androidx.compose.ui.text.style.TextDecoration
|
|||||||
import androidx.compose.ui.text.withStyle
|
import androidx.compose.ui.text.withStyle
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import ai.openclaw.android.ui.mobileAccent
|
import ai.openclaw.app.ui.mobileAccent
|
||||||
import ai.openclaw.android.ui.mobileCallout
|
import ai.openclaw.app.ui.mobileCallout
|
||||||
import ai.openclaw.android.ui.mobileCaption1
|
import ai.openclaw.app.ui.mobileCaption1
|
||||||
import ai.openclaw.android.ui.mobileCodeBg
|
import ai.openclaw.app.ui.mobileCodeBg
|
||||||
import ai.openclaw.android.ui.mobileCodeText
|
import ai.openclaw.app.ui.mobileCodeText
|
||||||
import ai.openclaw.android.ui.mobileTextSecondary
|
import ai.openclaw.app.ui.mobileTextSecondary
|
||||||
import org.commonmark.Extension
|
import org.commonmark.Extension
|
||||||
import org.commonmark.ext.autolink.AutolinkExtension
|
import org.commonmark.ext.autolink.AutolinkExtension
|
||||||
import org.commonmark.ext.gfm.strikethrough.Strikethrough
|
import org.commonmark.ext.gfm.strikethrough.Strikethrough
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.ui.chat
|
package ai.openclaw.app.ui.chat
|
||||||
|
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
@@ -15,13 +15,13 @@ import androidx.compose.runtime.LaunchedEffect
|
|||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import ai.openclaw.android.chat.ChatMessage
|
import ai.openclaw.app.chat.ChatMessage
|
||||||
import ai.openclaw.android.chat.ChatPendingToolCall
|
import ai.openclaw.app.chat.ChatPendingToolCall
|
||||||
import ai.openclaw.android.ui.mobileBorder
|
import ai.openclaw.app.ui.mobileBorder
|
||||||
import ai.openclaw.android.ui.mobileCallout
|
import ai.openclaw.app.ui.mobileCallout
|
||||||
import ai.openclaw.android.ui.mobileHeadline
|
import ai.openclaw.app.ui.mobileHeadline
|
||||||
import ai.openclaw.android.ui.mobileText
|
import ai.openclaw.app.ui.mobileText
|
||||||
import ai.openclaw.android.ui.mobileTextSecondary
|
import ai.openclaw.app.ui.mobileTextSecondary
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun ChatMessageListCard(
|
fun ChatMessageListCard(
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.ui.chat
|
package ai.openclaw.app.ui.chat
|
||||||
|
|
||||||
import androidx.compose.foundation.BorderStroke
|
import androidx.compose.foundation.BorderStroke
|
||||||
import androidx.compose.foundation.Image
|
import androidx.compose.foundation.Image
|
||||||
@@ -25,24 +25,24 @@ import androidx.compose.ui.text.font.FontFamily
|
|||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import ai.openclaw.android.chat.ChatMessage
|
import ai.openclaw.app.chat.ChatMessage
|
||||||
import ai.openclaw.android.chat.ChatMessageContent
|
import ai.openclaw.app.chat.ChatMessageContent
|
||||||
import ai.openclaw.android.chat.ChatPendingToolCall
|
import ai.openclaw.app.chat.ChatPendingToolCall
|
||||||
import ai.openclaw.android.tools.ToolDisplayRegistry
|
import ai.openclaw.app.tools.ToolDisplayRegistry
|
||||||
import ai.openclaw.android.ui.mobileAccent
|
import ai.openclaw.app.ui.mobileAccent
|
||||||
import ai.openclaw.android.ui.mobileAccentSoft
|
import ai.openclaw.app.ui.mobileAccentSoft
|
||||||
import ai.openclaw.android.ui.mobileBorder
|
import ai.openclaw.app.ui.mobileBorder
|
||||||
import ai.openclaw.android.ui.mobileBorderStrong
|
import ai.openclaw.app.ui.mobileBorderStrong
|
||||||
import ai.openclaw.android.ui.mobileCallout
|
import ai.openclaw.app.ui.mobileCallout
|
||||||
import ai.openclaw.android.ui.mobileCaption1
|
import ai.openclaw.app.ui.mobileCaption1
|
||||||
import ai.openclaw.android.ui.mobileCaption2
|
import ai.openclaw.app.ui.mobileCaption2
|
||||||
import ai.openclaw.android.ui.mobileCodeBg
|
import ai.openclaw.app.ui.mobileCodeBg
|
||||||
import ai.openclaw.android.ui.mobileCodeText
|
import ai.openclaw.app.ui.mobileCodeText
|
||||||
import ai.openclaw.android.ui.mobileHeadline
|
import ai.openclaw.app.ui.mobileHeadline
|
||||||
import ai.openclaw.android.ui.mobileText
|
import ai.openclaw.app.ui.mobileText
|
||||||
import ai.openclaw.android.ui.mobileTextSecondary
|
import ai.openclaw.app.ui.mobileTextSecondary
|
||||||
import ai.openclaw.android.ui.mobileWarning
|
import ai.openclaw.app.ui.mobileWarning
|
||||||
import ai.openclaw.android.ui.mobileWarningSoft
|
import ai.openclaw.app.ui.mobileWarningSoft
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
|
||||||
private data class ChatBubbleStyle(
|
private data class ChatBubbleStyle(
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.ui.chat
|
package ai.openclaw.app.ui.chat
|
||||||
|
|
||||||
import android.content.ContentResolver
|
import android.content.ContentResolver
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
@@ -32,22 +32,22 @@ import androidx.compose.ui.text.font.FontWeight
|
|||||||
import androidx.compose.ui.text.style.TextOverflow
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import ai.openclaw.android.MainViewModel
|
import ai.openclaw.app.MainViewModel
|
||||||
import ai.openclaw.android.chat.ChatSessionEntry
|
import ai.openclaw.app.chat.ChatSessionEntry
|
||||||
import ai.openclaw.android.chat.OutgoingAttachment
|
import ai.openclaw.app.chat.OutgoingAttachment
|
||||||
import ai.openclaw.android.ui.mobileAccent
|
import ai.openclaw.app.ui.mobileAccent
|
||||||
import ai.openclaw.android.ui.mobileBorder
|
import ai.openclaw.app.ui.mobileBorder
|
||||||
import ai.openclaw.android.ui.mobileBorderStrong
|
import ai.openclaw.app.ui.mobileBorderStrong
|
||||||
import ai.openclaw.android.ui.mobileCallout
|
import ai.openclaw.app.ui.mobileCallout
|
||||||
import ai.openclaw.android.ui.mobileCaption1
|
import ai.openclaw.app.ui.mobileCaption1
|
||||||
import ai.openclaw.android.ui.mobileCaption2
|
import ai.openclaw.app.ui.mobileCaption2
|
||||||
import ai.openclaw.android.ui.mobileDanger
|
import ai.openclaw.app.ui.mobileDanger
|
||||||
import ai.openclaw.android.ui.mobileSuccess
|
import ai.openclaw.app.ui.mobileSuccess
|
||||||
import ai.openclaw.android.ui.mobileSuccessSoft
|
import ai.openclaw.app.ui.mobileSuccessSoft
|
||||||
import ai.openclaw.android.ui.mobileText
|
import ai.openclaw.app.ui.mobileText
|
||||||
import ai.openclaw.android.ui.mobileTextSecondary
|
import ai.openclaw.app.ui.mobileTextSecondary
|
||||||
import ai.openclaw.android.ui.mobileWarning
|
import ai.openclaw.app.ui.mobileWarning
|
||||||
import ai.openclaw.android.ui.mobileWarningSoft
|
import ai.openclaw.app.ui.mobileWarningSoft
|
||||||
import java.io.ByteArrayOutputStream
|
import java.io.ByteArrayOutputStream
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package ai.openclaw.android.ui.chat
|
package ai.openclaw.app.ui.chat
|
||||||
|
|
||||||
import ai.openclaw.android.chat.ChatSessionEntry
|
import ai.openclaw.app.chat.ChatSessionEntry
|
||||||
|
|
||||||
private const val RECENT_WINDOW_MS = 24 * 60 * 60 * 1000L
|
private const val RECENT_WINDOW_MS = 24 * 60 * 60 * 1000L
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.voice
|
package ai.openclaw.app.voice
|
||||||
|
|
||||||
import android.media.AudioAttributes
|
import android.media.AudioAttributes
|
||||||
import android.media.AudioFormat
|
import android.media.AudioFormat
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.voice
|
package ai.openclaw.app.voice
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.voice
|
package ai.openclaw.app.voice
|
||||||
|
|
||||||
import android.media.MediaDataSource
|
import android.media.MediaDataSource
|
||||||
import kotlin.math.min
|
import kotlin.math.min
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.voice
|
package ai.openclaw.app.voice
|
||||||
|
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import kotlinx.serialization.json.JsonElement
|
import kotlinx.serialization.json.JsonElement
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.voice
|
package ai.openclaw.app.voice
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
@@ -21,9 +21,9 @@ import android.speech.tts.TextToSpeech
|
|||||||
import android.speech.tts.UtteranceProgressListener
|
import android.speech.tts.UtteranceProgressListener
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import ai.openclaw.android.gateway.GatewaySession
|
import ai.openclaw.app.gateway.GatewaySession
|
||||||
import ai.openclaw.android.isCanonicalMainSessionKey
|
import ai.openclaw.app.isCanonicalMainSessionKey
|
||||||
import ai.openclaw.android.normalizeMainKey
|
import ai.openclaw.app.normalizeMainKey
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.net.HttpURLConnection
|
import java.net.HttpURLConnection
|
||||||
import java.net.URL
|
import java.net.URL
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.voice
|
package ai.openclaw.app.voice
|
||||||
|
|
||||||
object VoiceWakeCommandExtractor {
|
object VoiceWakeCommandExtractor {
|
||||||
fun extractCommand(text: String, triggerWords: List<String>): String? {
|
fun extractCommand(text: String, triggerWords: List<String>): String? {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.voice
|
package ai.openclaw.app.voice
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android
|
package ai.openclaw.app
|
||||||
|
|
||||||
import android.app.Notification
|
import android.app.Notification
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android
|
package ai.openclaw.app
|
||||||
|
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertNull
|
import org.junit.Assert.assertNull
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.gateway
|
package ai.openclaw.app.gateway
|
||||||
|
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.gateway
|
package ai.openclaw.app.gateway
|
||||||
|
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.gateway
|
package ai.openclaw.app.gateway
|
||||||
|
|
||||||
import kotlinx.coroutines.CompletableDeferred
|
import kotlinx.coroutines.CompletableDeferred
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.gateway
|
package ai.openclaw.app.gateway
|
||||||
|
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.gateway
|
package ai.openclaw.app.gateway
|
||||||
|
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertFalse
|
import org.junit.Assert.assertFalse
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertFalse
|
import org.junit.Assert.assertFalse
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertNull
|
import org.junit.Assert.assertNull
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import ai.openclaw.android.gateway.GatewayEndpoint
|
import ai.openclaw.app.gateway.GatewayEndpoint
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
import org.junit.Assert.assertNull
|
import org.junit.Assert.assertNull
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
package ai.openclaw.android.node
|
package ai.openclaw.app.node
|
||||||
|
|
||||||
import ai.openclaw.android.protocol.OpenClawCalendarCommand
|
import ai.openclaw.app.protocol.OpenClawCalendarCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawCameraCommand
|
import ai.openclaw.app.protocol.OpenClawCameraCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawCapability
|
import ai.openclaw.app.protocol.OpenClawCapability
|
||||||
import ai.openclaw.android.protocol.OpenClawContactsCommand
|
import ai.openclaw.app.protocol.OpenClawContactsCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawDeviceCommand
|
import ai.openclaw.app.protocol.OpenClawDeviceCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawLocationCommand
|
import ai.openclaw.app.protocol.OpenClawLocationCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawMotionCommand
|
import ai.openclaw.app.protocol.OpenClawMotionCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawNotificationsCommand
|
import ai.openclaw.app.protocol.OpenClawNotificationsCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawPhotosCommand
|
import ai.openclaw.app.protocol.OpenClawPhotosCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawSmsCommand
|
import ai.openclaw.app.protocol.OpenClawSmsCommand
|
||||||
import ai.openclaw.android.protocol.OpenClawSystemCommand
|
import ai.openclaw.app.protocol.OpenClawSystemCommand
|
||||||
import org.junit.Assert.assertFalse
|
import org.junit.Assert.assertFalse
|
||||||
import org.junit.Assert.assertTrue
|
import org.junit.Assert.assertTrue
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user