Skip to content

Commit

Permalink
Move profile provider to play-services-core-package
Browse files Browse the repository at this point in the history
  • Loading branch information
fynngodau committed Oct 12, 2023
1 parent ae1aa56 commit 0019cdb
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 9 deletions.
9 changes: 1 addition & 8 deletions play-services-base/core/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,12 @@
~ SPDX-FileCopyrightText: 2020, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application>
<provider
android:name="org.microg.gms.settings.SettingsProvider"
android:authorities="${applicationId}.microg.settings"
android:exported="false" />

<provider
android:name="org.microg.gms.profile.ProfileProvider"
android:authorities="${applicationId}.microg.profile"
android:exported="true"
tools:ignore="ExportedContentProvider" />
</application>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ object ProfileManager {
}
}.getOrDefault(false)

internal fun getActiveProfileData(context: Context): Map<String, String> =
fun getActiveProfileData(context: Context): Map<String, String> =
getProfileData(context, getProfile(context), getRealData())

private fun getProfileData(context: Context, profile: String, realData: Map<String, String>): Map<String, String> {
Expand Down
1 change: 1 addition & 0 deletions play-services-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ dependencies {
implementation project(':play-services-core-proto')

implementation project(':play-services-core:microg-ui-tools') // deprecated
implementation project(':play-services-core-package')
implementation project(':play-services-api')

implementation project(':play-services-appinvite')
Expand Down
43 changes: 43 additions & 0 deletions play-services-core/package/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* SPDX-FileCopyrightText: 2023 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

dependencies {
implementation project(':play-services-base-core')
}

android {
namespace "org.microg.gms.core.pkg"

compileSdkVersion androidCompileSdk
buildToolsVersion "$androidBuildVersionTools"

defaultConfig {
versionName version
minSdkVersion androidMinSdk
targetSdkVersion androidTargetSdk
}

sourceSets {
main {
java.srcDirs = ['src/main/kotlin']
}
}

lintOptions {
disable 'MissingTranslation'
}

compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}

kotlinOptions {
jvmTarget = 1.8
}
}
15 changes: 15 additions & 0 deletions play-services-core/package/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ SPDX-FileCopyrightText: 2023 microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<application>
<provider
android:name="org.microg.gms.profile.ProfileProvider"
android:authorities="${applicationId}.microg.profile"
android:exported="true"
tools:ignore="ExportedContentProvider" />
</application>
</manifest>
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,4 @@ sublude ':firebase-auth:core'

include ':play-services-core:microg-ui-tools' // Legacy
include ':play-services-core'
sublude ':play-services-core:package'

0 comments on commit 0019cdb

Please sign in to comment.