generated from dellevin/template
首次提交
This commit is contained in:
1
premium-api/.gitignore
vendored
Normal file
1
premium-api/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
22
premium-api/build.gradle.kts
Normal file
22
premium-api/build.gradle.kts
Normal file
@@ -0,0 +1,22 @@
|
||||
plugins {
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.fan.edgex.premium.api"
|
||||
compileSdk = Configs.compileSdk
|
||||
|
||||
defaultConfig {
|
||||
minSdk = Configs.minSdk
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = Configs.javaVersion
|
||||
targetCompatibility = Configs.javaVersion
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = Configs.jvmTarget
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.fan.edgex.premium
|
||||
|
||||
import android.content.Context
|
||||
|
||||
interface IPremiumPlugin {
|
||||
val apiVersion: Int
|
||||
|
||||
/**
|
||||
* Verifies that this DEX was issued by the server for the given device.
|
||||
* The DEX implementation holds the RSA public key and performs the actual crypto.
|
||||
* Called from system_server after the DEX is loaded; returning false disables the plugin.
|
||||
*
|
||||
* @param dexPath absolute path to the installed DEX file (used to compute its hash)
|
||||
* @param devicePubkeyHex hex X.509 encoding of the device's Keystore EC public key
|
||||
* @param sigBytes raw RSA/SHA-256 signature over sha256hex(dex)+"|"+devicePubkeyHex
|
||||
* @param localDebug true only for a debug host that already verified local_debug metadata
|
||||
*/
|
||||
fun verifyInstallation(
|
||||
dexPath: String,
|
||||
devicePubkeyHex: String,
|
||||
sigBytes: ByteArray,
|
||||
localDebug: Boolean,
|
||||
): Boolean
|
||||
|
||||
fun onEdgeLightingShow(
|
||||
context: Context,
|
||||
effect: String,
|
||||
color: Int,
|
||||
durationMs: Int,
|
||||
widthDp: Int,
|
||||
alpha: Float,
|
||||
): Boolean
|
||||
|
||||
fun onEdgeLightingDismiss()
|
||||
|
||||
fun onScreenOff()
|
||||
}
|
||||
Reference in New Issue
Block a user