Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ed1a0ca authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Apply /e/OS patch

Introduce /e/OS location url endpoint

Move to SwitchPreference

Introduce ContentProviderAuthData

which allows to use an auth token coming from
AppLounge for the Licensing feature.

2397: Fake location from AdvancedPrivacy ContentProvider.

feat:2397: use permission for whitelist app for Fakelocation.

Fix checkbox color in self check page

Retheme the app so that it matches our Settings app

Remove notification to configure location service

Add local Java KeyStore to ease development

Fix NPE

Use beancondb by default without contribution

Git ignore keystores

fix:2397: Fake also the last location

Authorize both fallbacks

In some areas it seems like beacon.db struggles to
fetch any location.

feat:8489: Quickly return fake location.

feat:8489: Review fix, improve naming
parent b9b7c06c
Loading
Loading
Loading
Loading

.aiexclude

0 → 100644
+3 −0
Original line number Diff line number Diff line
# Protect the local API keys from being upload by Android Studio 
# to feed Gemini for AI
*.properties
+9 −4
Original line number Diff line number Diff line
@@ -4,10 +4,15 @@ bin/
build/
.gradle/
.idea/
user.gradle
local.properties
.directory

.settings
.classpath
bin/
.project
.classpath
.output/
.settings/
play-services-location/core/provider/.cxx/
play-services-location/core/provider/src/main/cpp/
play-services-location/core/provider/src/main/java/
credentials.properties
*keystore

.gitlab-ci.yml

0 → 100644
+81 −0
Original line number Diff line number Diff line
image: "registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:latest"

stages:
- build
- publish

variables:
  GIT_SUBMODULE_STRATEGY: recursive

before_script:
- if [ -d "/srv/userscripts" ]; then cp -R userscripts/* /srv/userscripts ; fi
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- export GRADLE_USER_HOME=$(pwd)/.gradle
- chmod +x ./gradlew

.default_before_script: &default_before_script
  - echo sdk.dir $ANDROID_HOME > local.properties
  - echo mapbox.key $MAPBOX_KEY >> local.properties
  - echo mapbox.enabled true >> local.properties
  - echo stadia.key $STADIA_KEY >> local.properties
  - echo modules.hms false >> local.properties
  - echo key=$LOCATION_TOTP_SECRET_PROD >> credentials.properties
  - echo url=$LOCATION_ENDPOINT_URL >> credentials.properties
  - echo "${KEYSTORE}" | base64 -d > play-services-core/e.keystore
  - export TERM=dumb
  - export JAVA_OPTS="-XX:+HeapDumpOnOutOfMemoryError -Xmx4096m"

cache:
  key: ${CI_PROJECT_ID}
  paths:
  - .gradle/

build:
  stage: build
  rules:
    - if: $CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"
    - when: always
  before_script:
  - *default_before_script
  - echo modules.nearby false >> local.properties
  script:
  - ./gradlew hideSecretFromPropertiesFile -PpropertiesFileName=credentials.properties -Ppackage=com.google.android.gms
  - ./gradlew assembleDebug
  - ./gradlew assembleRelease
  artifacts:
    paths:
    - play-services-core/build/outputs/apk/
    - vending-app/build/outputs/apk/

build-nearby:
  extends: build
  stage: build
  rules:
    - if: $CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"
    - when: always
  before_script:
  - *default_before_script
  - echo modules.nearby true >> local.properties
  script:
  - ./gradlew hideSecretFromPropertiesFile -PpropertiesFileName=credentials.properties -Ppackage=com.google.android.gms
  - ./gradlew assembleDebug
  - ./gradlew assembleRelease

publish:
  stage: publish
  rules:
    - if: $CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"
      when: manual
  script:
    - |
      curl --fail --output "/dev/null" --silent --show-error \
           --header 'Content-Type: application/json' --header "PRIVATE-TOKEN: ${PUBLICATION_TOKEN}" \
           --data "{\"ref\":\"${CI_COMMIT_SHA}\",\"name\":\"${CI_COMMIT_TAG}\",\"tag_name\":\"${CI_COMMIT_TAG}\",\"description\":\"${CI_COMMIT_TITLE}\",\"assets\":{\"links\":[{\"name\":\"GmsCore-test.apk\",\"url\":\"https://gitlab.e.foundation/api/v4/projects/149/jobs/artifacts/${CI_COMMIT_TAG}/raw/play-services-core/build/outputs/apk/mapboxDefault/releaseTest/play-services-core-withMapbox-withNearby-releaseTest.apk?job=build-nearby\",\"link_type\":\"package\"},{\"name\":\"GmsCore-dev.apk\",\"url\":\"https://gitlab.e.foundation/api/v4/projects/149/jobs/artifacts/${CI_COMMIT_TAG}/raw/play-services-core/build/outputs/apk/mapboxDefault/releaseDev/play-services-core-mapbox-default-releaseDev.apk?job=build-nearby\",\"link_type\":\"package\"},{\"name\":\"GmsCore-stable.apk\",\"url\":\"https://gitlab.e.foundation/api/v4/projects/149/jobs/artifacts/${CI_COMMIT_TAG}/raw/play-services-core/build/outputs/apk/mapboxDefault/releaseStable/play-services-core-mapbox-default-releaseStable.apk?job=build-nearby\",\"link_type\":\"package\"}]}}" \
           --request POST https://gitlab.e.foundation/api/v4/projects/149/releases
+5 −1
Original line number Diff line number Diff line
@@ -19,6 +19,10 @@ LOCAL_MODULE := GmsCore
LOCAL_MODULE_TAGS := optional
LOCAL_PACKAGE_NAME := GmsCore

LOCAL_PRIVATE_PLATFORM_APIS := true

LOCAL_STATIC_JAVA_LIBRARIES += org.lineageos.platform.sdk

gmscore_root  := $(LOCAL_PATH)
gmscore_dir   := play-services-core
gmscore_out   := $(TARGET_COMMON_OUT_ROOT)/obj/APPS/$(LOCAL_MODULE)_intermediates
+9 −2
Original line number Diff line number Diff line
@@ -36,7 +36,11 @@ buildscript {

    ext.androidBuildVersionTools = '34.0.0'

    ext.androidMinSdk = 19
    ext.hiddenSecretVersion = '0.2.1'

    ext.appLoungeAuthDataVersion = '1.0.0'

    ext.androidMinSdk = 21
    ext.androidTargetSdk = 29
    ext.androidCompileSdk = 34

@@ -57,12 +61,15 @@ buildscript {
    repositories {
        mavenCentral()
        google()
        maven { url 'https://gitlab.e.foundation/api/v4/groups/9/-/packages/maven'}
        maven { url 'https://plugins.gradle.org/m2/' }
    }

    dependencies {
        classpath "com.android.tools.build:gradle:$androidBuildGradleVersion"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
        classpath "com.squareup.wire:wire-gradle-plugin:$wireVersion"
        classpath "com.klaxit.hiddensecrets:HiddenSecretsPlugin:$hiddenSecretVersion"
    }
}

@@ -119,7 +126,7 @@ subprojects {
    repositories {
        mavenCentral()
        google()
        maven { url 'https://gitlab.e.foundation/api/v4/groups/9/-/packages/maven'}
        if (hasModule("hms", false)) maven {url 'https://developer.huawei.com/repo/'}
    }
}
Loading