feat: compose Android app and verify native calendar and reminders
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<application
|
||||
android:label="河畔Everyday"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
android:icon="@drawable/ic_hepan_launcher">
|
||||
<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" android:exported="false" />
|
||||
<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver" android:exported="false">
|
||||
<intent-filter>
|
||||
|
||||
@@ -111,9 +111,9 @@ class CalendarBridge(private val activity: Activity, messenger: BinaryMessenger)
|
||||
}
|
||||
val id = args["eventId"] as? String
|
||||
if (id != null && ownership(id, key, calendarId)) {
|
||||
val count = resolver.update(ContentUris.withAppendedId(Events.CONTENT_URI,id.toLong()), values,
|
||||
"${Events.CUSTOM_APP_PACKAGE}=? AND ${Events.CUSTOM_APP_URI}=? AND ${Events.CALENDAR_ID}=?",
|
||||
arrayOf(owner, marker(key), calendarId))
|
||||
val count = resolver.update(Events.CONTENT_URI, values,
|
||||
"${Events._ID}=? AND ${Events.CUSTOM_APP_PACKAGE}=? AND ${Events.CUSTOM_APP_URI}=? AND ${Events.CALENDAR_ID}=? AND ${Events.DELETED}=0",
|
||||
arrayOf(id, owner, marker(key), calendarId))
|
||||
check(count==1) { "日程已被修改" }
|
||||
return id
|
||||
}
|
||||
@@ -121,7 +121,7 @@ class CalendarBridge(private val activity: Activity, messenger: BinaryMessenger)
|
||||
}
|
||||
private fun delete(id: String, key: String) {
|
||||
if (!ownership(id,key)) return
|
||||
resolver.delete(ContentUris.withAppendedId(Events.CONTENT_URI,id.toLong()),
|
||||
"${Events.CUSTOM_APP_PACKAGE}=? AND ${Events.CUSTOM_APP_URI}=?", arrayOf(owner,marker(key)))
|
||||
resolver.delete(Events.CONTENT_URI,
|
||||
"${Events._ID}=? AND ${Events.CUSTOM_APP_PACKAGE}=? AND ${Events.CUSTOM_APP_URI}=?", arrayOf(id,owner,marker(key)))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="108dp" android:height="108dp" android:viewportWidth="108" android:viewportHeight="108">
|
||||
<path android:fillColor="#348F91" android:pathData="M0,0h108v108h-108z" />
|
||||
<path android:fillColor="#FFFFFF" android:pathData="M28,29h52v43h-52z" />
|
||||
<path android:fillColor="#348F91" android:pathData="M32,41h44v27h-44z" />
|
||||
<path android:strokeColor="#FFFFFF" android:strokeWidth="4" android:strokeLineCap="round" android:pathData="M40,25v12M68,25v12M36,79c12,-9 24,9 36,0" />
|
||||
<path android:fillColor="#FFFFFF" android:pathData="M40,49h8v8h-8zM60,49h8v8h-8z" />
|
||||
</vector>
|
||||
Reference in New Issue
Block a user