From 204e44429e1e67a59b29b2004a84e9f32160365b Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Thu, 2 Jan 2020 14:24:10 +0100 Subject: [PATCH] follow OpenGApps and use API 21 Calender Sync for API 21+, API 19 Calendar Sync for API 19 --- CommonInstaller | 2 +- data/build-package.database | 7 ++++++- data/build-package.download | 18 +++++++++++++++--- data/build-package.update | 3 +-- 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/CommonInstaller b/CommonInstaller index 345b435..3851cb0 100644 --- a/CommonInstaller +++ b/CommonInstaller @@ -1332,7 +1332,7 @@ nanodroid_install_apk () { unset prefix unset source - for sdir in system/app system/priv-app gsync/common/app \ + for sdir in system/app system/priv-app \ gsync/${GSYNC_VER}/app gsync/${GSYNC_VER}/priv-app; do if [ -f "${INSTALLER}/${sdir}/${app}/${app}.apk.gz" ]; then source="${INSTALLER}/${sdir}/${app}/${app}.apk" diff --git a/data/build-package.database b/data/build-package.database index 4459da6..47b1a4f 100644 --- a/data/build-package.database +++ b/data/build-package.database @@ -150,17 +150,22 @@ file_database=( ${appsfolder[4]}/GsfProxy/GsfProxy.apk.gz ${appsfolder[4]}/Phonesky/Phonesky.apk.gz - ${appsfolder[5]}/common/app/GoogleCalendarSync/GoogleCalendarSync.apk.gz + ${appsfolder[5]}/K/app/GoogleCalendarSync/GoogleCalendarSync.apk.gz ${appsfolder[5]}/K/app/GoogleContactsSync/GoogleContactsSync.apk.gz ${appsfolder[5]}/K/priv-app/GoogleBackupTransport/GoogleBackupTransport.apk.gz + ${appsfolder[5]}/L/app/GoogleCalendarSync/GoogleCalendarSync.apk.gz ${appsfolder[5]}/L/app/GoogleContactsSync/GoogleContactsSync.apk.gz ${appsfolder[5]}/L/priv-app/GoogleBackupTransport/GoogleBackupTransport.apk.gz + ${appsfolder[5]}/M/app/GoogleCalendarSync/GoogleCalendarSync.apk.gz ${appsfolder[5]}/M/app/GoogleContactsSync/GoogleContactsSync.apk.gz ${appsfolder[5]}/M/priv-app/GoogleBackupTransport/GoogleBackupTransport.apk.gz + ${appsfolder[5]}/N/app/GoogleCalendarSync/GoogleCalendarSync.apk.gz ${appsfolder[5]}/N/app/GoogleContactsSync/GoogleContactsSync.apk.gz ${appsfolder[5]}/N/priv-app/GoogleBackupTransport/GoogleBackupTransport.apk.gz + ${appsfolder[5]}/O/app/GoogleCalendarSync/GoogleCalendarSync.apk.gz ${appsfolder[5]}/O/app/GoogleContactsSync/GoogleContactsSync.apk.gz ${appsfolder[5]}/O/priv-app/GoogleBackupTransport/GoogleBackupTransport.apk.gz + ${appsfolder[5]}/P/app/GoogleCalendarSync/GoogleCalendarSync.apk.gz ${appsfolder[5]}/P/app/GoogleContactsSync/GoogleContactsSync.apk.gz ${appsfolder[5]}/P/priv-app/GoogleBackupTransport/GoogleBackupTransport.apk.gz diff --git a/data/build-package.download b/data/build-package.download index c838b82..460010b 100644 --- a/data/build-package.download +++ b/data/build-package.download @@ -266,12 +266,24 @@ grab_apk_from_gitlab () { grab_apk_from_ogapps () { case "${1}" in "com.google.android.syncadapters.calendar" ) - local apk_url="https://gitlab.opengapps.org/opengapps/all/raw/master/${2}/${1}/15/nodpi/2015080710.apk" - local api_letter=common + case "${4}" in + 19 ) local api_letter=K ;; + 21 ) local api_letter=L ;; + 23 ) local api_letter=M ;; + 24 ) local api_letter=N ;; + 26 ) local api_letter=O ;; + 28 ) local api_letter=P ;; + esac + + if [ "${4}" -eq 19 ]; then + local apk_url="https://gitlab.opengapps.org/opengapps/all/raw/master/${2}/${1}/15/nodpi/2015080710.apk" + else + local apk_url="https://gitlab.opengapps.org/opengapps/all/raw/master/${2}/${1}/21/nodpi/2016184095.apk" + fi ;; * ) - apk_url="https://gitlab.opengapps.org/opengapps/all/raw/master/${2}/${1}/${4}/nodpi/${4}.apk" + local apk_url="https://gitlab.opengapps.org/opengapps/all/raw/master/${2}/${1}/${4}/nodpi/${4}.apk" case "${4}" in 19 ) local api_letter=K ;; 21 ) local api_letter=L ;; diff --git a/data/build-package.update b/data/build-package.update index 270a3e3..60e5d42 100644 --- a/data/build-package.update +++ b/data/build-package.update @@ -78,11 +78,10 @@ update_microg () { grab_gsync () { # KK LL M N O P for API in 19 21 23 24 26 28; do + grab_apk_from_ogapps ${og_CALSYNC[@]} ${API} grab_apk_from_ogapps ${og_CONSYNC[@]} ${API} grab_apk_from_ogapps ${og_BTRANSP[@]} ${API} done - - grab_apk_from_ogapps ${og_CALSYNC[@]} } update_gsync () {