Repo Created
This commit is contained in:
parent
eb305e2886
commit
a8c22c65db
4784 changed files with 329907 additions and 2 deletions
47
play-services-oss-licenses/build.gradle
Normal file
47
play-services-oss-licenses/build.gradle
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'signing'
|
||||
|
||||
android {
|
||||
namespace "com.google.android.gms.oss.licenses"
|
||||
|
||||
compileSdkVersion androidCompileSdk
|
||||
buildToolsVersion "$androidBuildVersionTools"
|
||||
|
||||
buildFeatures {
|
||||
aidl = true
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
versionName version
|
||||
minSdkVersion androidMinSdk
|
||||
targetSdkVersion androidTargetSdk
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
disable 'MissingTranslation'
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
}
|
||||
}
|
||||
|
||||
apply from: '../gradle/publish-android.gradle'
|
||||
|
||||
description = 'microG implementation of play-services-oss-licenses'
|
||||
|
||||
dependencies {
|
||||
// Dependencies from play-services-oss-licenses:17.0.0
|
||||
api "androidx.loader:loader:1.0.0"
|
||||
api project(':play-services-base')
|
||||
api project(':play-services-basement')
|
||||
api project(':play-services-tasks')
|
||||
implementation "androidx.appcompat:appcompat:1.0.0"
|
||||
}
|
||||
50
play-services-oss-licenses/core/build.gradle
Normal file
50
play-services-oss-licenses/core/build.gradle
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'signing'
|
||||
|
||||
dependencies {
|
||||
api project(':play-services-base-core')
|
||||
api project(':play-services-oss-licenses')
|
||||
}
|
||||
|
||||
android {
|
||||
namespace "org.microg.gms.oss.licenses.core"
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
apply from: '../../gradle/publish-android.gradle'
|
||||
|
||||
description = 'microG service implementation for play-services-oss-licenses'
|
||||
17
play-services-oss-licenses/core/src/main/AndroidManifest.xml
Normal file
17
play-services-oss-licenses/core/src/main/AndroidManifest.xml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ SPDX-FileCopyrightText: 2022 microG Project Team
|
||||
~ SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<application>
|
||||
<service
|
||||
android:name=".OssLicensesService"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.gms.oss.licenses.service.START" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
</application>
|
||||
</manifest>
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package org.microg.gms.oss.licenses.core
|
||||
|
||||
import android.content.Context
|
||||
import com.google.android.gms.common.api.CommonStatusCodes.SUCCESS
|
||||
import com.google.android.gms.common.internal.GetServiceRequest
|
||||
import com.google.android.gms.common.internal.IGmsCallbacks
|
||||
import com.google.android.gms.oss.licenses.IOSSLicenseService
|
||||
import com.google.android.gms.oss.licenses.License
|
||||
import org.microg.gms.BaseService
|
||||
import org.microg.gms.common.GmsService
|
||||
|
||||
private const val TAG = "OssLicensesService"
|
||||
|
||||
class OssLicensesService : BaseService(TAG, GmsService.OSS_LICENSES) {
|
||||
override fun handleServiceRequest(callback: IGmsCallbacks, request: GetServiceRequest, service: GmsService?) {
|
||||
callback.onPostInitComplete(SUCCESS, OssLicensesServiceImpl(), null)
|
||||
}
|
||||
}
|
||||
|
||||
class OssLicensesServiceImpl : IOSSLicenseService.Stub() {
|
||||
|
||||
override fun getListLayoutPackage(packageName: String?): String? {
|
||||
// Use fallback resources provided by package itself
|
||||
return packageName
|
||||
}
|
||||
|
||||
override fun getLicenseLayoutPackage(packageName: String?): String? {
|
||||
// Use fallback resources provided by package itself
|
||||
return packageName
|
||||
}
|
||||
|
||||
override fun getLicenseDetail(libraryName: String?): String? {
|
||||
// Use license provided by package itself
|
||||
return null
|
||||
}
|
||||
|
||||
override fun getLicenseList(list: MutableList<License>?): List<License> {
|
||||
// Just sort it
|
||||
val newList = arrayListOf<License>()
|
||||
newList.addAll(list.orEmpty())
|
||||
newList.sortBy { it.name }
|
||||
return newList
|
||||
}
|
||||
|
||||
}
|
||||
14
play-services-oss-licenses/src/main/AndroidManifest.xml
Normal file
14
play-services-oss-licenses/src/main/AndroidManifest.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ SPDX-FileCopyrightText: 2022 microG Project Team
|
||||
~ SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<application>
|
||||
<activity
|
||||
android:name="com.google.android.gms.oss.licenses.OssLicensesMenuActivity"
|
||||
android:label="@string/oss_license_title" />
|
||||
<activity android:name="com.google.android.gms.oss.licenses.OssLicensesActivity" />
|
||||
</application>
|
||||
</manifest>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.google.android.gms.oss.licenses;
|
||||
|
||||
import com.google.android.gms.oss.licenses.License;
|
||||
|
||||
interface IOSSLicenseService {
|
||||
String getListLayoutPackage(String packageName) = 1;
|
||||
String getLicenseLayoutPackage(String packageName) = 2;
|
||||
String getLicenseDetail(String license) = 3;
|
||||
List<License> getLicenseList(in List<License> list) = 4;
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
package com.google.android.gms.oss.licenses;
|
||||
|
||||
import com.google.android.gms.oss.licenses.License;
|
||||
|
||||
parcelable License;
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.oss.licenses;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class License implements Parcelable, Comparable<License> {
|
||||
public static final Creator<License> CREATOR = new Creator<License>() {
|
||||
@Override
|
||||
public License createFromParcel(Parcel source) {
|
||||
return new License(source);
|
||||
}
|
||||
|
||||
@Override
|
||||
public License[] newArray(int size) {
|
||||
return new License[size];
|
||||
}
|
||||
};
|
||||
|
||||
private final String name;
|
||||
private final long offset;
|
||||
private final int length;
|
||||
private final String path;
|
||||
|
||||
public License(String name, long offset, int length, String path) {
|
||||
this.name = name;
|
||||
this.offset = offset;
|
||||
this.length = length;
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public License(Parcel parcel) {
|
||||
this.name = parcel.readString();
|
||||
this.offset = parcel.readLong();
|
||||
this.length = parcel.readInt();
|
||||
this.path = parcel.readString();
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public long getOffset() {
|
||||
return offset;
|
||||
}
|
||||
|
||||
public int getLength() {
|
||||
return length;
|
||||
}
|
||||
|
||||
public String getPath() {
|
||||
return path;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(License other) {
|
||||
return name.compareToIgnoreCase(other.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeString(name);
|
||||
dest.writeLong(offset);
|
||||
dest.writeInt(length);
|
||||
dest.writeString(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
* Notice: Portions of this file are reproduced from work created and shared by Google and used
|
||||
* according to terms described in the Creative Commons 4.0 Attribution License.
|
||||
* See https://developers.google.com/readme/policies for details.
|
||||
*/
|
||||
|
||||
package com.google.android.gms.oss.licenses;
|
||||
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.gms.tasks.Tasks;
|
||||
|
||||
import org.microg.gms.common.PublicApi;
|
||||
import org.microg.gms.oss.licenses.LicenseUtil;
|
||||
|
||||
/**
|
||||
* An Activity used to display the actual content of a license in res/raw/third_party_licenses generated by oss
|
||||
* licenses gradle plugin. This activity is invoked by list items from {@link OssLicensesMenuActivity}.
|
||||
*/
|
||||
@PublicApi
|
||||
public class OssLicensesActivity extends AppCompatActivity {
|
||||
private static final String SCROLL_POSITION_EXTRA = "scroll_pos";
|
||||
private License license;
|
||||
private TextView textView;
|
||||
private ScrollView scrollView;
|
||||
private int restoredScrollPosition;
|
||||
private boolean destroyed;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
destroyed = false;
|
||||
license = getIntent().getParcelableExtra("license");
|
||||
if (getSupportActionBar() != null) {
|
||||
getSupportActionBar().setTitle(this.license.toString());
|
||||
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setLogo(null);
|
||||
}
|
||||
OssLicensesServiceImpl service = new OssLicensesServiceImpl(this);
|
||||
Task<String> licenseDetailTask = service.getLicenseDetail(license);
|
||||
Task<String> licenseLayoutPackageTask = service.getLicenseLayoutPackage(getPackageName());
|
||||
Tasks.whenAll(licenseDetailTask, licenseLayoutPackageTask).addOnCompleteListener((nil) -> {
|
||||
if (destroyed || isFinishing()) return;
|
||||
|
||||
// Layout
|
||||
String layoutPackage = getPackageName();
|
||||
if (licenseLayoutPackageTask.isSuccessful()) {
|
||||
layoutPackage = licenseLayoutPackageTask.getResult();
|
||||
}
|
||||
Resources resources;
|
||||
try {
|
||||
resources = getPackageManager().getResourcesForApplication(layoutPackage);
|
||||
} catch (Exception e) {
|
||||
layoutPackage = getPackageName();
|
||||
resources = getResources();
|
||||
}
|
||||
setContentView(getLayoutInflater().inflate(resources.getXml(resources.getIdentifier("libraries_social_licenses_license_activity", "layout", layoutPackage)), null, false));
|
||||
textView = findViewById(resources.getIdentifier("license_activity_textview", "id", layoutPackage));
|
||||
scrollView = findViewById(resources.getIdentifier("license_activity_scrollview", "id", layoutPackage));
|
||||
|
||||
// Text
|
||||
String licenseText = null;
|
||||
if (licenseDetailTask.isSuccessful()) {
|
||||
licenseText = licenseDetailTask.getResult();
|
||||
}
|
||||
if (licenseText == null) {
|
||||
try {
|
||||
licenseText = LicenseUtil.getLicenseText(this, license);
|
||||
} catch (Exception e) {
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
if (licenseText == null) {
|
||||
textView.setText(R.string.license_content_error);
|
||||
} else {
|
||||
textView.setText(licenseText);
|
||||
}
|
||||
|
||||
// Restore scroll position
|
||||
if (restoredScrollPosition != 0) {
|
||||
scrollView.post(() -> scrollView.scrollTo(0, textView.getLayout().getLineTop(textView.getLayout().getLineForOffset(restoredScrollPosition))));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
destroyed = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
||||
if (item.getItemId() == android.R.id.home) {
|
||||
finish();
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onRestoreInstanceState(@NonNull Bundle savedInstanceState) {
|
||||
super.onRestoreInstanceState(savedInstanceState);
|
||||
restoredScrollPosition = savedInstanceState.getInt(SCROLL_POSITION_EXTRA);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSaveInstanceState(@NonNull Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
if (textView != null && scrollView != null) {
|
||||
outState.putInt(SCROLL_POSITION_EXTRA, textView.getLayout().getLineStart(textView.getLayout().getLineForVertical(scrollView.getScrollY())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,210 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
* Notice: Portions of this file are reproduced from work created and shared by Google and used
|
||||
* according to terms described in the Creative Commons 4.0 Attribution License.
|
||||
* See https://developers.google.com/readme/policies for details.
|
||||
*/
|
||||
|
||||
package com.google.android.gms.oss.licenses;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.loader.app.LoaderManager;
|
||||
import androidx.loader.content.AsyncTaskLoader;
|
||||
import androidx.loader.content.Loader;
|
||||
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.gms.tasks.Tasks;
|
||||
|
||||
import org.microg.gms.common.PublicApi;
|
||||
import org.microg.gms.oss.licenses.LicenseUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* An Activity used to display a list of all third party licenses in res/raw/third_party_license_metadata generated by
|
||||
* oss licenses gradle plugin. Click on each item of the list would invoke {@link OssLicensesActivity} to show the
|
||||
* actual content of the license.
|
||||
*/
|
||||
@PublicApi
|
||||
public class OssLicensesMenuActivity extends AppCompatActivity implements LoaderManager.LoaderCallbacks<List<License>> {
|
||||
private static final String TAG = "OssLicensesMenuActivity";
|
||||
private static final String EXTRA_TITLE = "title";
|
||||
private static final int LOADER_ID = 54321;
|
||||
private static String TITLE;
|
||||
|
||||
private ListView listView;
|
||||
private boolean destroyed;
|
||||
private ArrayAdapter<License> licensesAdapter;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
destroyed = false;
|
||||
if (TITLE == null) {
|
||||
Intent intent = getIntent();
|
||||
if (intent != null && intent.hasExtra(EXTRA_TITLE)) {
|
||||
TITLE = intent.getStringExtra(EXTRA_TITLE);
|
||||
Log.w(TAG, "The intent based title is deprecated. Use OssLicensesMenuActivity.setActivityTitle(title) instead.");
|
||||
}
|
||||
}
|
||||
if (TITLE != null) {
|
||||
setTitle(TITLE);
|
||||
}
|
||||
if (getSupportActionBar() != null) {
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
|
||||
if (LicenseUtil.hasLicenses(this)) {
|
||||
OssLicensesServiceImpl service = new OssLicensesServiceImpl(this);
|
||||
service.getListLayoutPackage(getPackageName()).addOnCompleteListener((layoutPackageTask) -> {
|
||||
if (destroyed || isFinishing()) return;
|
||||
|
||||
// Layout
|
||||
String layoutPackage = getPackageName();
|
||||
if (layoutPackageTask.isSuccessful()) {
|
||||
layoutPackage = layoutPackageTask.getResult();
|
||||
}
|
||||
Resources resources;
|
||||
try {
|
||||
resources = getPackageManager().getResourcesForApplication(layoutPackage);
|
||||
} catch (Exception e) {
|
||||
layoutPackage = getPackageName();
|
||||
resources = getResources();
|
||||
}
|
||||
setContentView(getLayoutInflater().inflate(resources.getXml(resources.getIdentifier("libraries_social_licenses_license_menu_activity", "layout", layoutPackage)), null, false));
|
||||
licensesAdapter = new LicensesAdapter(this, getLayoutInflater(), resources, layoutPackage);
|
||||
listView = findViewById(resources.getIdentifier("license_list", "id", layoutPackage));
|
||||
listView.setAdapter(licensesAdapter);
|
||||
listView.setOnItemClickListener((parent, view, position, id) -> {
|
||||
License license = (License) parent.getItemAtPosition(position);
|
||||
Intent intent = new Intent(this, OssLicensesActivity.class);
|
||||
intent.putExtra("license", license);
|
||||
startActivity(intent);
|
||||
});
|
||||
});
|
||||
LoaderManager.getInstance(this).initLoader(LOADER_ID, null, this);
|
||||
} else {
|
||||
setContentView(R.layout.license_menu_activity_no_licenses);
|
||||
}
|
||||
}
|
||||
|
||||
private static class LicensesAdapter extends ArrayAdapter<License> {
|
||||
private final LayoutInflater layoutInflater;
|
||||
private final Resources resources;
|
||||
private final String layoutPackage;
|
||||
|
||||
public LicensesAdapter(@NonNull Context context, @NonNull LayoutInflater layoutInflater, @NonNull Resources resources, @NonNull String layoutPackage) {
|
||||
super(context, 0);
|
||||
this.layoutInflater = layoutInflater;
|
||||
this.resources = resources;
|
||||
this.layoutPackage = layoutPackage;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public View getView(int position, @Nullable View view, @NonNull ViewGroup parent) {
|
||||
if (view == null) {
|
||||
view = layoutInflater.inflate(resources.getXml(resources.getIdentifier("libraries_social_licenses_license", "layout", layoutPackage)), null, false);
|
||||
}
|
||||
TextView textView = view.findViewById(resources.getIdentifier("license", "id", layoutPackage));
|
||||
textView.setText(getItem(position).toString());
|
||||
return view;
|
||||
}
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Loader<List<License>> onCreateLoader(int id, @Nullable Bundle args) {
|
||||
return new AsyncTaskLoader<List<License>>(getApplicationContext()) {
|
||||
private List<License> storedData;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public List<License> loadInBackground() {
|
||||
List<License> licenses = LicenseUtil.getLicensesFromMetadata(getContext());
|
||||
try {
|
||||
OssLicensesServiceImpl service = new OssLicensesServiceImpl(getContext());
|
||||
Task<List<License>> licensesTask = service.getLicenseList(licenses);
|
||||
return Tasks.await(licensesTask);
|
||||
} catch (Exception e) {
|
||||
Log.w(TAG, "Error getting license list from service.", e);
|
||||
}
|
||||
return licenses;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deliverResult(@Nullable List<License> data) {
|
||||
this.storedData = data;
|
||||
super.deliverResult(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStartLoading() {
|
||||
if (storedData != null) {
|
||||
deliverResult(storedData);
|
||||
} else {
|
||||
forceLoad();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStopLoading() {
|
||||
cancelLoad();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
destroyed = true;
|
||||
LoaderManager.getInstance(this).destroyLoader(LOADER_ID);
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFinished(@NonNull Loader<List<License>> loader, List<License> data) {
|
||||
licensesAdapter.clear();
|
||||
licensesAdapter.addAll(data);
|
||||
licensesAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoaderReset(@NonNull Loader<List<License>> loader) {
|
||||
licensesAdapter.clear();
|
||||
licensesAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
||||
if (item.getItemId() == android.R.id.home) {
|
||||
finish();
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the title for {@link OssLicensesMenuActivity}.
|
||||
*
|
||||
* @param title the title for this activity
|
||||
*/
|
||||
public static void setActivityTitle(String title) {
|
||||
OssLicensesMenuActivity.TITLE = title;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.oss.licenses;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.RemoteException;
|
||||
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.GoogleApi;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
|
||||
import org.microg.gms.common.api.PendingGoogleApiCall;
|
||||
import org.microg.gms.oss.licenses.OssLicenseServiceApiClient;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class OssLicensesServiceImpl extends GoogleApi<Api.ApiOptions.NoOptions> {
|
||||
private static final Api<Api.ApiOptions.NoOptions> API = new Api<>((options, context, looper, clientSettings, callbacks, connectionFailedListener) -> new OssLicenseServiceApiClient(context, callbacks, connectionFailedListener));
|
||||
|
||||
public OssLicensesServiceImpl(Context context) {
|
||||
super(context, API, Api.ApiOptions.NO_OPTIONS);
|
||||
}
|
||||
|
||||
public Task<String> getLicenseLayoutPackage(String packageName) {
|
||||
return scheduleTask((PendingGoogleApiCall<String, OssLicenseServiceApiClient>) (client, completionSource) -> {
|
||||
String result;
|
||||
try {
|
||||
result = client.getLicenseLayoutPackage(packageName);
|
||||
} catch (RemoteException e) {
|
||||
completionSource.setException(e);
|
||||
return;
|
||||
}
|
||||
completionSource.setResult(result);
|
||||
});
|
||||
}
|
||||
|
||||
public Task<String> getListLayoutPackage(String packageName) {
|
||||
return scheduleTask((PendingGoogleApiCall<String, OssLicenseServiceApiClient>) (client, completionSource) -> {
|
||||
String result;
|
||||
try {
|
||||
result = client.getListLayoutPackage(packageName);
|
||||
} catch (RemoteException e) {
|
||||
completionSource.setException(e);
|
||||
return;
|
||||
}
|
||||
completionSource.setResult(result);
|
||||
});
|
||||
}
|
||||
|
||||
public Task<String> getLicenseDetail(License license) {
|
||||
return scheduleTask((PendingGoogleApiCall<String, OssLicenseServiceApiClient>) (client, completionSource) -> {
|
||||
String result;
|
||||
try {
|
||||
result = client.getLicenseDetail(license);
|
||||
} catch (RemoteException e) {
|
||||
completionSource.setException(e);
|
||||
return;
|
||||
}
|
||||
completionSource.setResult(result);
|
||||
});
|
||||
}
|
||||
|
||||
public Task<List<License>> getLicenseList(List<License> licenses) {
|
||||
return scheduleTask((PendingGoogleApiCall<List<License>, OssLicenseServiceApiClient>) (client, completionSource) -> {
|
||||
List<License> result;
|
||||
try {
|
||||
result = client.getLicenseList(licenses);
|
||||
} catch (RemoteException e) {
|
||||
completionSource.setException(e);
|
||||
return;
|
||||
}
|
||||
completionSource.setResult(result);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package org.microg.gms.oss.licenses;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
|
||||
import com.google.android.gms.oss.licenses.License;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
|
||||
public class LicenseUtil {
|
||||
public static boolean hasLicenses(Context context) {
|
||||
Resources resources = context.getApplicationContext().getResources();
|
||||
try (InputStream is = resources.openRawResource(resources.getIdentifier("third_party_license_metadata", "raw", context.getPackageName()))) {
|
||||
if (is == null || is.available() <= 0) return false;
|
||||
} catch (IOException e) {
|
||||
return false;
|
||||
}
|
||||
try (InputStream is = resources.openRawResource(resources.getIdentifier("third_party_licenses", "raw", context.getPackageName()))) {
|
||||
if (is == null || is.available() <= 0) return false;
|
||||
} catch (IOException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static List<License> getLicensesFromMetadata(Context context) {
|
||||
Resources resources = context.getApplicationContext().getResources();
|
||||
InputStream is = resources.openRawResource(resources.getIdentifier("third_party_license_metadata", "raw", context.getPackageName()));
|
||||
String metadata = readStringAndClose(is, Integer.MAX_VALUE);
|
||||
String[] lines = metadata.split("\n");
|
||||
List<License> licenses = new ArrayList<>(lines.length);
|
||||
for (String line : lines) {
|
||||
int spaceIndex = line.indexOf(' ');
|
||||
String[] position = line.substring(0, spaceIndex).split(":");
|
||||
if (spaceIndex <= 0 || position.length != 2) {
|
||||
throw new IllegalStateException("Invalid license meta-data line:\n" + line);
|
||||
}
|
||||
licenses.add(new License(line.substring(spaceIndex + 1), Long.parseLong(position[0]), Integer.parseInt(position[1]), ""));
|
||||
}
|
||||
return licenses;
|
||||
}
|
||||
|
||||
public static String getLicenseText(Context context, License license) {
|
||||
if (license.getPath().isEmpty()) {
|
||||
Resources resources = context.getApplicationContext().getResources();
|
||||
InputStream is = resources.openRawResource(resources.getIdentifier("third_party_licenses", "raw", context.getPackageName()));
|
||||
try {
|
||||
if (is.skip(license.getOffset()) != license.getOffset()) {
|
||||
throw new RuntimeException("Failed to read license");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("Failed to read license", e);
|
||||
}
|
||||
return readStringAndClose(is, license.getLength());
|
||||
} else {
|
||||
try (JarFile jar = new JarFile(license.getPath())) {
|
||||
JarEntry entry = jar.getJarEntry("res/raw/third_party_licenses");
|
||||
if (entry == null) {
|
||||
throw new RuntimeException(license.getPath() + " does not contain res/raw/third_party_licenses");
|
||||
} else {
|
||||
InputStream is = jar.getInputStream(entry);
|
||||
if (is.skip(license.getOffset()) != license.getOffset()) {
|
||||
throw new RuntimeException("Failed to read license");
|
||||
}
|
||||
return readStringAndClose(is, license.getLength());
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("Failed to read license", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static String readStringAndClose(InputStream is, int bytesToRead) {
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
try {
|
||||
byte[] bytes = new byte[1024];
|
||||
int read;
|
||||
while (bytesToRead > 0 && (read = is.read(bytes, 0, Math.min(bytes.length, bytesToRead))) != -1) {
|
||||
bos.write(bytes, 0, read);
|
||||
bytesToRead -= read;
|
||||
}
|
||||
is.close();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("Failed to read license or metadata", e);
|
||||
}
|
||||
try {
|
||||
return bos.toString("UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
throw new RuntimeException("Unsupported encoding UTF8. This should always be supported.", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package org.microg.gms.oss.licenses;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.IBinder;
|
||||
import android.os.RemoteException;
|
||||
|
||||
import com.google.android.gms.oss.licenses.IOSSLicenseService;
|
||||
import com.google.android.gms.oss.licenses.License;
|
||||
|
||||
import org.microg.gms.common.GmsClient;
|
||||
import org.microg.gms.common.GmsService;
|
||||
import com.google.android.gms.common.api.internal.ConnectionCallbacks;
|
||||
import com.google.android.gms.common.api.internal.OnConnectionFailedListener;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class OssLicenseServiceApiClient extends GmsClient<IOSSLicenseService> {
|
||||
public OssLicenseServiceApiClient(Context context, ConnectionCallbacks callbacks, OnConnectionFailedListener connectionFailedListener) {
|
||||
super(context, callbacks, connectionFailedListener, GmsService.OSS_LICENSES.ACTION);
|
||||
serviceId = GmsService.OSS_LICENSES.SERVICE_ID;
|
||||
}
|
||||
|
||||
public String getLicenseLayoutPackage(String packageName) throws RemoteException {
|
||||
return getServiceInterface().getLicenseLayoutPackage(packageName);
|
||||
}
|
||||
|
||||
public String getListLayoutPackage(String packageName) throws RemoteException {
|
||||
return getServiceInterface().getListLayoutPackage(packageName);
|
||||
}
|
||||
|
||||
public String getLicenseDetail(License license) throws RemoteException {
|
||||
return getServiceInterface().getLicenseDetail(license.toString());
|
||||
}
|
||||
|
||||
public List<License> getLicenseList(List<License> licenses) throws RemoteException {
|
||||
return getServiceInterface().getLicenseList(licenses);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IOSSLicenseService interfaceFromBinder(IBinder binder) {
|
||||
return IOSSLicenseService.Stub.asInterface(binder);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ SPDX-FileCopyrightText: 2022 microG Project Team
|
||||
~ SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/license"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginVertical="8dp"
|
||||
android:ellipsize="marquee"
|
||||
android:fadingEdge="horizontal"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:attr/textAppearanceMediumInverse"
|
||||
android:textColor="?android:attr/textColorPrimary" />
|
||||
</FrameLayout>
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ SPDX-FileCopyrightText: 2022 microG Project Team
|
||||
~ SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/license_activity_scrollview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/license_activity_textview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:autoLink="web"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:typeface="monospace" />
|
||||
</ScrollView>
|
||||
</FrameLayout>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ SPDX-FileCopyrightText: 2022 microG Project Team
|
||||
~ SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ListView
|
||||
android:id="@+id/license_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:drawSelectorOnTop="false"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:scrollbarAlwaysDrawVerticalTrack="true"
|
||||
android:scrollbarStyle="outsideOverlay" />
|
||||
</FrameLayout>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ SPDX-FileCopyrightText: 2022 microG Project Team
|
||||
~ SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/no_licenses_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:padding="16dp"
|
||||
android:text="@string/no_licenses_available" />
|
||||
</FrameLayout>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">حدث خطأ أثناء جلب الترخيص.</string>
|
||||
<string name="no_licenses_available">هذا التطبيق لا يحتوي على أي تراخيص مفتوحة المصدر.</string>
|
||||
<string name="oss_license_title">تراخيص مفتوحة المصدر</string>
|
||||
<string name="license_is_loading">معلومات الترخيص قيد التحميل.</string>
|
||||
<string name="license_list_is_loading">قائمة الترخيص قيد التحميل.</string>
|
||||
<string name="preferences_license_summary">تفاصيل الترخيص للبرمجيات مفتوحة المصدر</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">Prodúxose un error al dir en cata de la llicencia.</string>
|
||||
<string name="oss_license_title">Llicencies de códigu abiertu</string>
|
||||
<string name="preferences_license_summary">Detalles de la llicencia pal software de códigu abiertu</string>
|
||||
<string name="no_licenses_available">Esta aplicación nun tien nenguna llicencia de códigu abiertu.</string>
|
||||
<string name="license_list_is_loading">La llista de llicencies ta cargando.</string>
|
||||
<string name="license_is_loading">La información de la llicencia ta cargando.</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">Lisenziya alınarkən xəta baş verdi.</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_list_is_loading">Загрузка спісу ліцэнзій.</string>
|
||||
<string name="preferences_license_summary">Падрабязнасці аб ліцэнзіях для ПЗ з адкрытым зыходным кодам</string>
|
||||
<string name="license_content_error">Адбылася памылка пры атрыманні ліцэнзіі.</string>
|
||||
<string name="no_licenses_available">У гэтага прыкладання няма ліцэнзій з адчыненым зыходным кодам.</string>
|
||||
<string name="oss_license_title">Ліцэнзіі з адкрытым зыходным кодам</string>
|
||||
<string name="license_is_loading">Загрузка інфармацыі аб ліцэнзіі.</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="oss_license_title">Licence open source</string>
|
||||
<string name="license_is_loading">Načítání informací o licencích.</string>
|
||||
<string name="preferences_license_summary">Podrobnosti o licencích pro open-source software</string>
|
||||
<string name="no_licenses_available">Aplikace nemá žádné licence open source.</string>
|
||||
<string name="license_content_error">Při načítání licence došlo k chybě.</string>
|
||||
<string name="license_list_is_loading">Načítání seznamu licencí.</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">Beim Abrufen der Lizenz ist ein Fehler aufgetreten.</string>
|
||||
<string name="oss_license_title">Open-Source-Lizenzen</string>
|
||||
<string name="no_licenses_available">Diese App hat keine Open-Source-Lizenzen.</string>
|
||||
<string name="license_is_loading">Lizenzinformationen werden geladen.</string>
|
||||
<string name="license_list_is_loading">Lizenzliste wird geladen.</string>
|
||||
<string name="preferences_license_summary">Lizenzdetails für Open-Source-Software</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">Se ha producido un error al obtener la licencia.</string>
|
||||
<string name="oss_license_title">Licencias de código abierto</string>
|
||||
<string name="license_is_loading">La información de la licencia se está cargando.</string>
|
||||
<string name="no_licenses_available">Esta aplicación no tiene ninguna licencia de código abierto.</string>
|
||||
<string name="license_list_is_loading">La lista de licencias se está cargando.</string>
|
||||
<string name="preferences_license_summary">Detalles de la licencia del software de código abierto</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">هنگام گرفتن پروانه خطایی رخ داده است.</string>
|
||||
<string name="license_list_is_loading">فهرست پروانهها در حال بارگذاری است.</string>
|
||||
<string name="no_licenses_available">این برنامه هیچ پروانه متن باز ندارد.</string>
|
||||
<string name="oss_license_title">پروانه های متن باز</string>
|
||||
<string name="preferences_license_summary">جزئیات پروانه برای برنامه متن باز</string>
|
||||
<string name="license_is_loading">درباره پروانه در حال بارگذاری است.</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">Nagkaroon ng error habang kinukuha ang lisensya.</string>
|
||||
<string name="no_licenses_available">Ang app na ito ay walang mga open source na lisensya.</string>
|
||||
<string name="oss_license_title">Mga open source na lisensya</string>
|
||||
<string name="license_is_loading">Naglo-load ang impormasyon ng lisensya.</string>
|
||||
<string name="license_list_is_loading">Naglo-load ang listahan ng lisensya.</string>
|
||||
<string name="preferences_license_summary">Mga detalye ng lisensya para sa open source software</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">Une erreur s\'est produite en récupérant la licence.</string>
|
||||
<string name="no_licenses_available">Cette appli n\'a pas de licences libres.</string>
|
||||
<string name="oss_license_title">Licences libres</string>
|
||||
<string name="license_is_loading">Info sur les licences en cours de chargement.</string>
|
||||
<string name="license_list_is_loading">Liste des licences en cours de chargement.</string>
|
||||
<string name="preferences_license_summary">Détails des licences pour les logiciels libres</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">Tharla earráid agus an ceadúnas á fháil.</string>
|
||||
<string name="no_licenses_available">Níl aon cheadúnais foinse oscailte ag an aip seo.</string>
|
||||
<string name="oss_license_title">Ceadúnais foinse oscailte</string>
|
||||
<string name="license_is_loading">Tá faisnéis ceadúnais á luchtú.</string>
|
||||
<string name="license_list_is_loading">Tá liosta ceadúnas á lódáil.</string>
|
||||
<string name="preferences_license_summary">Sonraí ceadúnais le haghaidh bogearraí foinse oscailte</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">Terjadi kesalahan saat mengambil lisensi.</string>
|
||||
<string name="no_licenses_available">Aplikasi ini tidak memiliki lisensi sumber terbuka.</string>
|
||||
<string name="oss_license_title">Lisensi sumber terbuka</string>
|
||||
<string name="license_is_loading">Informasi lisensi sedang dimuat.</string>
|
||||
<string name="license_list_is_loading">Daftar lisensi sedang dimuat.</string>
|
||||
<string name="preferences_license_summary">Rincian lisensi untuk perangkat lunak sumber terbuka</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">Villa kom upp við að sækja notkunarleyfið.</string>
|
||||
<string name="no_licenses_available">Þetta forrit er ekki með nein opin notkunarleyfi.</string>
|
||||
<string name="oss_license_title">Opin notkunarleyfi</string>
|
||||
<string name="license_list_is_loading">Listi yfir notkunarleyfi er að hlaðast inn.</string>
|
||||
<string name="license_is_loading">Upplýsingar um notkunarleyfi eru að hlaðast inn.</string>
|
||||
<string name="preferences_license_summary">Nánar um notkunarleyfi fyrir opinn hugbúnað</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">Si è verificato un errore durante il recupero della licenza.</string>
|
||||
<string name="no_licenses_available">Questa applicazione non ha licenze open source.</string>
|
||||
<string name="oss_license_title">Licenze open source</string>
|
||||
<string name="license_is_loading">Caricamento delle informazioni della licenza in corso.</string>
|
||||
<string name="license_list_is_loading">Caricamento della lista delle licenze in corso.</string>
|
||||
<string name="preferences_license_summary">Dettagli delle licenze per il software open source</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">ライセンスを取得中にエラーが発生しました。</string>
|
||||
<string name="oss_license_title">オープンソースライセンス</string>
|
||||
<string name="license_is_loading">ライセンス情報を読み込み中。</string>
|
||||
<string name="license_list_is_loading">ライセンス一覧を読み込み中。</string>
|
||||
<string name="preferences_license_summary">オープンソースソフトウェアライセンスの詳細</string>
|
||||
<string name="no_licenses_available">このアプリにはオープンソースライセンスがありません。</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">라이선스를 불러오는 중 오류가 발생했습니다.</string>
|
||||
<string name="no_licenses_available">이 앱은 오픈 소스 라이선스가 없습니다.</string>
|
||||
<string name="oss_license_title">오픈 소스 라이선스</string>
|
||||
<string name="license_is_loading">라이선스 정보를 불러오는 중입니다.</string>
|
||||
<string name="license_list_is_loading">라이선스 목록을 불러오는 중입니다.</string>
|
||||
<string name="preferences_license_summary">오픈 소스 소프트웨어 라이선스 세부 정보</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">Iegūstot licenci, radās kļūda.</string>
|
||||
<string name="oss_license_title">Atvērtā pirmkoda licences</string>
|
||||
<string name="license_list_is_loading">Notiek licenču saraksta ielāde.</string>
|
||||
<string name="preferences_license_summary">Informācija par atklātā pirmkoda programmatūras licencēm</string>
|
||||
<string name="license_is_loading">Notiek licences informācijas ielāde.</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">ലൈസൻസ് ലഭ്യമാക്കുമ്പോൾ ഒരു പിശക് സംഭവിച്ചു.</string>
|
||||
<string name="no_licenses_available">ഈ ആപ്പിന് ഓപ്പൺ സോഴ്സ് ലൈസൻസുകളൊന്നുമില്ല.</string>
|
||||
<string name="oss_license_title">ഓപ്പൺ സോഴ്സ് ലൈസൻസുകൾ</string>
|
||||
<string name="license_is_loading">ലൈസൻസ് വിവരങ്ങൾ ലോഡ് ചെയ്യുന്നു.</string>
|
||||
<string name="license_list_is_loading">ലൈസൻസ് ലിസ്റ്റ് ലോഡ് ചെയ്യുന്നു.</string>
|
||||
<string name="preferences_license_summary">ഓപ്പൺ സോഴ്സ് സോഫ്റ്റ്വെയറിനുള്ള ലൈസൻസ് വിശദാംശങ്ങൾ</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">En feil oppsto under innhentingen av lisensen.</string>
|
||||
<string name="no_licenses_available">Denne appen har ingen åpne kildekodelisenser.</string>
|
||||
<string name="oss_license_title">Åpne kildekode-lisenser</string>
|
||||
<string name="license_is_loading">Lisensinformasjon lastes inn.</string>
|
||||
<string name="license_list_is_loading">Lisensinformasjon lastes inn.</string>
|
||||
<string name="preferences_license_summary">Lisensinformasjon for programvare med åpen kildekode</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="oss_license_title">Open source licenties</string>
|
||||
<string name="license_is_loading">Licentie info wordt geladen.</string>
|
||||
<string name="license_list_is_loading">Licentielijst wordt geladen.</string>
|
||||
<string name="preferences_license_summary">Licentie details voor open source software</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">Wystąpił błąd podczas pobierania licencji.</string>
|
||||
<string name="oss_license_title">Licencje otwartoźródłowe</string>
|
||||
<string name="preferences_license_summary">Szczegóły licencji dla oprogramowania otwartoźródłowego</string>
|
||||
<string name="no_licenses_available">Ta aplikacja nie zawiera licencji otwartoźródłowych.</string>
|
||||
<string name="license_list_is_loading">Lista licencji jest wczytywana.</string>
|
||||
<string name="license_is_loading">Informacja o licencji jest wczytywana.</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_is_loading">As informações da licença estão carregando.</string>
|
||||
<string name="license_list_is_loading">A lista de licenças está carregando.</string>
|
||||
<string name="preferences_license_summary">Detalhes de licença de software de código aberto</string>
|
||||
<string name="license_content_error">Um erro ocorreu ao buscar a licença.</string>
|
||||
<string name="no_licenses_available">Este app não tem nenhuma licença de código aberto.</string>
|
||||
<string name="oss_license_title">Licenças de código aberto</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">Ocorreu um erro ao buscar a licença.</string>
|
||||
<string name="no_licenses_available">Esta app não tem nenhuma licença de código aberto.</string>
|
||||
<string name="oss_license_title">Licenças de código aberto</string>
|
||||
<string name="license_is_loading">As informações da licença estão a carregar.</string>
|
||||
<string name="license_list_is_loading">A lista de licenças está a carregar.</string>
|
||||
<string name="preferences_license_summary">Detalhes de licença de software de código aberto</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">A apărut o eroare la preluarea licenței.</string>
|
||||
<string name="oss_license_title">Licențe open source</string>
|
||||
<string name="preferences_license_summary">Detalii de licență pentru software open source</string>
|
||||
<string name="no_licenses_available">Această aplicație nu are licențe open source.</string>
|
||||
<string name="license_list_is_loading">Se încarcă lista de licențe.</string>
|
||||
<string name="license_is_loading">Se încarcă informații despre licență.</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">Произошла ошибка при получении лицензии.</string>
|
||||
<string name="no_licenses_available">У этого приложения нету лицензий с открытым исходным кодом.</string>
|
||||
<string name="oss_license_title">Лицензии с открытым исходным кодом</string>
|
||||
<string name="license_is_loading">Загрузка информации о лицензии.</string>
|
||||
<string name="license_list_is_loading">Загрузка списка лицензий.</string>
|
||||
<string name="preferences_license_summary">Подробности о лицензиях для ПО с открытым исходным кодом</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">Дошло је до грешке при добављању лиценце.</string>
|
||||
<string name="oss_license_title">Лиценце отвореног кода</string>
|
||||
<string name="preferences_license_summary">Детаљи лиценце за софтвер отвореног кода</string>
|
||||
<string name="no_licenses_available">Ова апликација нема ниједну лиценцу отвореног кода.</string>
|
||||
<string name="license_list_is_loading">Листа лиценци се учитава.</string>
|
||||
<string name="license_is_loading">Информације о лиценци се учитавају.</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">Ett fel inträffade vid hämtning av licensen.</string>
|
||||
<string name="oss_license_title">Öppen-källkodslicenser</string>
|
||||
<string name="preferences_license_summary">Licensinformation för öppen-källkodsprogram</string>
|
||||
<string name="no_licenses_available">Denna app har inga öppen-källkodslicenser.</string>
|
||||
<string name="license_list_is_loading">Licenslista läses in.</string>
|
||||
<string name="license_is_loading">Licensinformation läses in.</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">உரிமத்தைப் பெறும்போது பிழை ஏற்பட்டது.</string>
|
||||
<string name="no_licenses_available">இந்தப் பயன்பாட்டில் திறந்த மூல உரிமங்கள் இல்லை.</string>
|
||||
<string name="oss_license_title">திறந்த மூல உரிமங்கள்</string>
|
||||
<string name="license_is_loading">உரிமத் செய்தி ஏற்றப்படுகிறது.</string>
|
||||
<string name="license_list_is_loading">உரிம பட்டியல் ஏற்றப்படுகிறது.</string>
|
||||
<string name="preferences_license_summary">திறந்த மூல மென்பொருளுக்கான உரிம விவரங்கள்</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="no_licenses_available">แอปนี้ไม่มีใบอนุญาตโอเพนซอร์สใดๆ</string>
|
||||
<string name="license_list_is_loading">กำลังโหลดรายการใบอนุญาต</string>
|
||||
<string name="preferences_license_summary">รายละเอียดใบอนุญาตสำหรับซอฟต์แวร์โอเพ่นซอร์ส</string>
|
||||
<string name="license_content_error">เกิดข้อผิดพลาดขณะดึงใบอนุญาต</string>
|
||||
<string name="oss_license_title">ใบอนุญาตโอเพ่นซอร์ส</string>
|
||||
<string name="license_is_loading">กำลังโหลดข้อมูลใบอนุญาต</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">Lisansı yüklemeye çalışırken bir sorunla karşılaşıldı.</string>
|
||||
<string name="no_licenses_available">Bu uygulamanın herhangi bir açık kaynak lisansı yok.</string>
|
||||
<string name="oss_license_title">Açık kaynak lisansları</string>
|
||||
<string name="license_list_is_loading">Lisans listesi yükleniyor.</string>
|
||||
<string name="preferences_license_summary">Açık kaynak yazılım için lisans bilgileri</string>
|
||||
<string name="license_is_loading">Lisans bilgisi yükleniyor.</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">ئىجازەتنامىگە ئېرىشىۋاتقاندا خاتالىق كۆرۈلدى.</string>
|
||||
<string name="no_licenses_available">بۇ ئەپنىڭ ئوچۇق كودلۇق ئىجازەتنامىسى يوق.</string>
|
||||
<string name="oss_license_title">ئوچۇق كودلۇق ئىجازەتنامە</string>
|
||||
<string name="license_is_loading">ئىجازەتنامە ئۇچۇرى يۈكلىنىۋاتىدۇ.</string>
|
||||
<string name="license_list_is_loading">ئىجازەتنامە تىزىمى يۈكلىنىۋاتىدۇ.</string>
|
||||
<string name="preferences_license_summary">ئوچۇق كودلۇق يۇمشاق دېتالنىڭ ئىجازەت تەپسىلاتى</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">Під час отримання ліцензії сталася помилка.</string>
|
||||
<string name="oss_license_title">Ліцензії з відкритим кодом</string>
|
||||
<string name="preferences_license_summary">Ліцензійні дані для відкритого програмного забезпечення</string>
|
||||
<string name="no_licenses_available">Цей застосунок не має ніяких ліцензій з відкритим кодом.</string>
|
||||
<string name="license_list_is_loading">Список ліцензій завантажується.</string>
|
||||
<string name="license_is_loading">Інформація про ліцензію завантажується.</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="oss_license_title">Giấy phép mã nguồn mở</string>
|
||||
<string name="license_is_loading">Đang tải thông tin giấy phép.</string>
|
||||
<string name="license_list_is_loading">Danh sách giấy phép đang được tải.</string>
|
||||
<string name="license_content_error">Đã xảy ra lỗi khi lấy giấy phép.</string>
|
||||
<string name="no_licenses_available">Ứng dụng này không có bất kỳ giấy phép nguồn mở nào.</string>
|
||||
<string name="preferences_license_summary">Chi tiết giấy phép cho phần mềm mã nguồn mở</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="oss_license_title">开源许可证</string>
|
||||
<string name="license_is_loading">正在加载许可证信息。</string>
|
||||
<string name="license_list_is_loading">正在加载许可证列表。</string>
|
||||
<string name="preferences_license_summary">开源软件的许可证详细信息</string>
|
||||
<string name="license_content_error">获取许可证时出错。</string>
|
||||
<string name="no_licenses_available">此应用没有任何开源许可证。</string>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license_content_error">獲取授權時發生錯誤。</string>
|
||||
<string name="no_licenses_available">此應用程式沒有任何開源授權。</string>
|
||||
<string name="oss_license_title">開源授權</string>
|
||||
<string name="license_is_loading">正在載入授權資訊。</string>
|
||||
<string name="license_list_is_loading">正在載入授權列表。</string>
|
||||
<string name="preferences_license_summary">開源軟體的授權詳細資訊</string>
|
||||
</resources>
|
||||
15
play-services-oss-licenses/src/main/res/values/strings.xml
Normal file
15
play-services-oss-licenses/src/main/res/values/strings.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ SPDX-FileCopyrightText: 2022 microG Project Team
|
||||
~ SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string name="license_content_error">An error has occurred when fetching the license.</string>
|
||||
<string name="no_licenses_available">This app does not have any open source licenses.</string>
|
||||
<string name="oss_license_title">Open source licenses</string>
|
||||
<!-- The following strings are not used by the library code but must be kept for compatibility,
|
||||
since they may be used by apps that depend on it. -->
|
||||
<string name="license_is_loading">License info is loading.</string>
|
||||
<string name="license_list_is_loading">License list is loading.</string>
|
||||
<string name="preferences_license_summary">License details for open source software</string>
|
||||
</resources>
|
||||
Loading…
Add table
Add a link
Reference in a new issue