feat: 更新 .gitignore,新增 release 文件夹监控;在 SetDetailsActivity 中添加文件路径存储到共享首选项的功能;在 StickerProvider 中添加获取文件类型和插入数据的功能;在 MainFragment 中进行代码清洁。
This commit is contained in:
parent
6fa059636a
commit
908c7a72a7
4
.gitignore
vendored
4
.gitignore
vendored
@ -16,6 +16,6 @@ local.properties
|
||||
/app/release/app-release.apk
|
||||
/app/release/baselineProfiles/0/app-release.dm
|
||||
/app/release/baselineProfiles/1/app-release.dm
|
||||
/info/info.txt
|
||||
/info/key_emoticon_test.jks
|
||||
/app/release/output-metadata.json
|
||||
|
||||
/app/release/*
|
||||
|
||||
@ -49,7 +49,6 @@ class OnItemClickListenerImpl(private val mcontext: Context) : OnItemClickListen
|
||||
startActivity(mcontext, intent, null)
|
||||
Log.d("onClick", "item has been click!")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
interface OnItemClickListener {
|
||||
|
||||
@ -141,8 +141,11 @@ class SetDetailsActivity : AppCompatActivity(), DownloadListener {
|
||||
} else if (listFile.getName().endsWith(".webp")) {
|
||||
data.add(listFile)
|
||||
} else {
|
||||
// 获取一个私有共享 preferences 对象
|
||||
val sp = this.getSharedPreferences("", Context.MODE_PRIVATE)
|
||||
// 使用 edit() 方法编辑 preferences
|
||||
sp.edit().putString(identifierName, listFile.absolutePath).apply()
|
||||
// 将修改后的 preferences 返回给调用者
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -140,7 +140,9 @@ class StickerProvider : ContentProvider() {
|
||||
/**
|
||||
* TODO no impl
|
||||
*/
|
||||
// This method returns a string representing the type of a given URI
|
||||
override fun getType(uri: Uri): String? {
|
||||
// If the URI matches the AppVal.STICKERS_CODE, return a formatted string containing the author and stickers
|
||||
if (uriMatcher.match(uri) == AppVal.STICKERS_CODE) {
|
||||
return String.format(
|
||||
context.getString(R.string.type_sticker),
|
||||
@ -148,6 +150,7 @@ class StickerProvider : ContentProvider() {
|
||||
AppVal.STICKERS
|
||||
)
|
||||
}
|
||||
// Otherwise, return null
|
||||
return null
|
||||
}
|
||||
|
||||
@ -183,7 +186,9 @@ class StickerProvider : ContentProvider() {
|
||||
return filePath!!.substring(0, filePath.lastIndexOf("contents.json"))
|
||||
}
|
||||
|
||||
// This function is used to insert a new row of data into the database with the given URI and ContentValues.
|
||||
override fun insert(uri: Uri, values: ContentValues?): Uri? {
|
||||
// This function returns the URI of the inserted row or null if the insertion failed.
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
5
info/info.txt
Normal file
5
info/info.txt
Normal file
@ -0,0 +1,5 @@
|
||||
应用名:Color Sticker
|
||||
包名:com.stickify.stickers.app
|
||||
|
||||
别名:key_emoticon
|
||||
密码: key123
|
||||
BIN
info/key_emoticon.jks
Normal file
BIN
info/key_emoticon.jks
Normal file
Binary file not shown.
BIN
info/key_emoticon_test.jks
Normal file
BIN
info/key_emoticon_test.jks
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user