fix: 首次提交

This commit is contained in:
xiaoyan159@6800H 2024-12-09 11:25:23 +08:00
parent d0c01071e9
commit 2c2109a5f3
4741 changed files with 290641 additions and 0 deletions

3
Filter/build.gradle Normal file
View File

@ -0,0 +1,3 @@
apply plugin: 'java'
apply plugin: 'application'
mainClassName = 'java.MainRun'

View File

@ -0,0 +1,138 @@
package com.siren.filter;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* 过滤product特殊属性
* Created by Siren on 2022/3/27.
*/
public class FilterAttribute {
//需要被取代的标签
private final static String TABLET = "product=\"tablet\"";
private final static String DEVICE = "product=\"device\"";
private final static String NOSDCARD = "product=\"nosdcard\"";
private final static String EMULATOR = "product=\"emulator\"";
private final static String TV = "product=\"tv\"";
/**
* 执行过滤任务
*/
public static void filter(String path) {
File folder = new File(path);
if (!folder.exists()) {
System.out.println(folder.getPath() + "路径不存在");
return;
}
filterFile(folder);
}
/**
* 匹配需要被移除的属性
*/
private static boolean matchAttribute(String content) {
String regex = ".*(" + TABLET + ")|(" + DEVICE + ")|(" + NOSDCARD + ")|(" + EMULATOR + ")|(" + TV + ").*";
Matcher matcher = Pattern.compile(regex).matcher(content);
return matcher.find();
}
private static void filterFile(File folder) {
File[] files = folder.listFiles();
for (File file : files) {
if (file.isDirectory()) {
filterFile(file);
} else if (file.getName().endsWith(".xml")) {
String content = readFileToStr(file);
List<String> filterList = getFieldListByRegex(content, "string");
for (String s : filterList) {
content = content.replace(s, "");
}
if (filterList.size() > 0) {
writeToFile(file, content);
ShellUtils.ignoreFile(file.getPath());//忽略文件
System.out.println("Modified file" + file.getPath());
}
}
}
}
/**
* 获取string标签字段并返回list
*/
private static List<String> getFieldListByRegex(String xml, String label) {
List<String> filterList = new ArrayList<>();
String regex = "<" + label + "([\\s\\S]*?)</" + label + ">";
Matcher matcher = Pattern.compile(regex).matcher(xml);
while (matcher.find()) {
int start = matcher.start();
int end = matcher.end();
String content = xml.substring(start, end);
if (matchAttribute(content)) {
filterList.add(content);
}
}
return filterList;
}
/**
* 获取文件转String
*/
private static String readFileToStr(File file) {
StringBuffer buffer;
try {
FileInputStream is = new FileInputStream(file);
buffer = streamToStr(is);
} catch (Exception e) {
e.printStackTrace();
return "";
}
return buffer.toString();
}
/**
* inputStream to string
*/
private static StringBuffer streamToStr(InputStream is) throws Exception {
InputStreamReader reader = new InputStreamReader(is);
BufferedReader bufferedReader = new BufferedReader(reader);
StringBuffer buffer = new StringBuffer("");
String str;
while ((str = bufferedReader.readLine()) != null) {
buffer.append(str);
buffer.append("\n");
}
return buffer;
}
/**
* write content
*/
private static void writeToFile(File file, String content) {
BufferedWriter writer = null;
try {
writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file, false)));
writer.write(content);
writer.flush();
} catch (Exception e) {
e.printStackTrace();
} finally {
if (writer != null) try {
writer.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}

View File

@ -0,0 +1,73 @@
package com.siren.filter;
import java.io.File;
/**
* 过滤多语言
* Created by Siren on 2022/3/27.
*/
public class FilterMultiLang {
//需要被取代的标签
private static String[] TAGS = new String[]{
"af", "am", "ar", "as", "az",
"be", "bg", "bn", "bs", "ca",
"cs", "da", "el", "en", "es",
"et", "eu", "fa", "fi", "fr",
"gl", "gu", "hi", "hr", "hu",
"hy", "in", "is", "it", "iw",
"ja", "ka", "kk", "km", "kn",
"ko", "ky", "lo", "lt", "lv",
"mk", "ml", "mn", "mr", "ms",
"my", "nb", "ne", "nl", "or",
"pa", "pl", "pt", "ro", "rm",
"ro", "ru", "si", "sk", "sl",
"sq", "sr", "sv", "sw", "ta",
"te", "th", "tl", "tr", "uk",
"ur", "uz", "vi", "zu", "de",
"zh-rHK", "zh-rTW", "b+sr+Latn"
};
/**
* 执行过滤任务
*/
public static void filter(String path) {
File folder = new File(path);
if (!folder.exists()) {
System.out.println(folder.getPath() + "路径不存在");
return;
}
filterFolder(folder);
}
private static void filterFolder(File folder) {
File[] files = folder.listFiles();
for (File file : files) {
if (file.isDirectory() && isMultiLang(file.getName())) {
deleteFile(file);
System.out.println("Delete folder" + file.getPath());
}
}
}
private static boolean isMultiLang(String name) {
for (String tag : TAGS) {
if (name.endsWith("-" + tag) || name.contains("-" + tag + "-")) {
return true;
}
}
return false;
}
private static void deleteFile(File dirFile) {
if (dirFile.isFile()) {
dirFile.delete();
ShellUtils.ignoreFile(dirFile.getPath());//忽略文件
} else {
for (File file : dirFile.listFiles()) {
deleteFile(file);
}
dirFile.delete();
}
}
}

View File

@ -0,0 +1,34 @@
package com.siren.filter;
import java.io.File;
/**
* 主程序
* Created by Siren on 2022/4/7.
*/
public class Main {
/**
* 执行过滤任务
*/
public static void main(String[] args) {
String[] arr = new String[]{
"res",
"res-export",
"res-product",
"SettingsLib/res",
"WifiTrackerLib/res",
"SettingsLib/HelpUtils/res",
"SettingsLib/RestrictedLockUtils/res",
"SettingsLib/SearchWidget/res"
};
for (String name : arr) {
String path = System.getProperty("user.dir") + File.separator + name;
// 可选项清除多余的国际化语言可提高编译效率
FilterMultiLang.filter(path);
// 必选项清除string里面的product属性如tabletdevice等因为AS无法识别该属性会编译不通过
FilterAttribute.filter(path);
}
}
}

View File

@ -0,0 +1,37 @@
package com.siren.filter;
import java.io.File;
/**
* shell脚本工具
* Created by Siren on 2022/4/7.
*/
public class ShellUtils {
/**
* 忽略文件
*/
public static void ignoreFile(String path) {
String rootPath = System.getProperty("user.dir") + File.separator;
execGit("git update-index --assume-unchanged " + (isWindows() ?
path.substring(rootPath.length()).replace("\\", "\\\\") :
path.substring(rootPath.length())));
}
public static boolean isWindows() {
return System.getProperties().getProperty("os.name").toUpperCase().contains("WINDOWS");
}
/**
* 执行git指令
*/
private static void execGit(String cmd) {
try {
Process process = Runtime.getRuntime().exec(cmd);
process.waitFor();
} catch (Exception e) {
e.printStackTrace();
}
}
}

View File

@ -0,0 +1,33 @@
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "frameworks_base_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["frameworks_base_license"],
}
android_library {
name: "SettingsLibActionBarShadow",
use_resource_processor: true,
defaults: [
"SettingsLintDefaults",
],
srcs: ["src/**/*.java"],
static_libs: [
"androidx.annotation_annotation",
"androidx.lifecycle_lifecycle-runtime",
"androidx.recyclerview_recyclerview",
],
sdk_version: "system_current",
min_sdk_version: "28",
apex_available: [
"//apex_available:platform",
"com.android.adservices",
"com.android.extservices",
"com.android.permission",
],
}

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2018 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.settingslib.widget.actionbarshadow">
</manifest>

View File

@ -0,0 +1,54 @@
/**
* Include this gradle file if you are building against this as a standalone gradle library project,
* as opposed to building it as part of the git-tree. This is typically the file you want to include
* if you create a new project in Android Studio.
*
* For example, you can include the following in your settings.gradle file:
* include ':setupcompat'
* project(':setupcompat').projectDir = new File(PATH_TO_THIS_DIRECTORY)
*
* And then you can include the :setupcompat project as one of your dependencies
* dependencies {
* implementation project(path: ':setupcompat')
* }
*/
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
}
android {
// Not specifying compileSdkVersion here so clients can specify it; must be at least Q
namespace = "com.android.settingslib.widget.actionbarshadow"
compileSdk 34
defaultConfig {
minSdkVersion 31
targetSdkVersion 34
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.flags'
}
}
sourceSets.main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
// res.srcDirs = ['main/res']
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}
dependencies {
// implementation "androidx.annotation:annotation:1.0.0"
implementation libs.androidx.annotation.annotation
implementation libs.lifecycle.runtime
implementation libs.recyclerview
}

View File

@ -0,0 +1,128 @@
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.settingslib.widget;
import static androidx.lifecycle.Lifecycle.Event.ON_START;
import static androidx.lifecycle.Lifecycle.Event.ON_STOP;
import android.app.ActionBar;
import android.app.Activity;
import android.view.View;
import androidx.annotation.VisibleForTesting;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleObserver;
import androidx.lifecycle.OnLifecycleEvent;
/**
* UI controller that adds a shadow appear/disappear animation to action bar scroll.
*/
public class ActionBarShadowController implements LifecycleObserver {
@VisibleForTesting
static final float ELEVATION_HIGH = 8;
@VisibleForTesting
static final float ELEVATION_LOW = 0;
@VisibleForTesting
ScrollChangeWatcher mScrollChangeWatcher;
private View mScrollView;
private boolean mIsScrollWatcherAttached;
/**
* Wire up the animation to to an {@link Activity}. Shadow will be applied to activity's
* action bar.
*/
public static ActionBarShadowController attachToView(
Activity activity, Lifecycle lifecycle, View scrollView) {
return new ActionBarShadowController(activity, lifecycle, scrollView);
}
/**
* Wire up the animation to to a {@link View}. Shadow will be applied to the view.
*/
public static ActionBarShadowController attachToView(
View anchorView, Lifecycle lifecycle, View scrollView) {
return new ActionBarShadowController(anchorView, lifecycle, scrollView);
}
private ActionBarShadowController(Activity activity, Lifecycle lifecycle, View scrollView) {
mScrollChangeWatcher = new ActionBarShadowController.ScrollChangeWatcher(activity);
mScrollView = scrollView;
attachScrollWatcher();
lifecycle.addObserver(this);
}
private ActionBarShadowController(View anchorView, Lifecycle lifecycle, View scrollView) {
mScrollChangeWatcher = new ActionBarShadowController.ScrollChangeWatcher(anchorView);
mScrollView = scrollView;
attachScrollWatcher();
lifecycle.addObserver(this);
}
@OnLifecycleEvent(ON_START)
private void attachScrollWatcher() {
if (!mIsScrollWatcherAttached) {
mIsScrollWatcherAttached = true;
mScrollView.setOnScrollChangeListener(mScrollChangeWatcher);
mScrollChangeWatcher.updateDropShadow(mScrollView);
}
}
@OnLifecycleEvent(ON_STOP)
private void detachScrollWatcher() {
mScrollView.setOnScrollChangeListener(null);
mIsScrollWatcherAttached = false;
}
/**
* Update the drop shadow as the scrollable entity is scrolled.
*/
final class ScrollChangeWatcher implements View.OnScrollChangeListener {
private final Activity mActivity;
private final View mAnchorView;
ScrollChangeWatcher(Activity activity) {
mActivity = activity;
mAnchorView = null;
}
ScrollChangeWatcher(View anchorView) {
mAnchorView = anchorView;
mActivity = null;
}
@Override
public void onScrollChange(View view, int scrollX, int scrollY, int oldScrollX,
int oldScrollY) {
updateDropShadow(view);
}
public void updateDropShadow(View view) {
final boolean shouldShowShadow = view.canScrollVertically(-1);
if (mAnchorView != null) {
mAnchorView.setElevation(shouldShowShadow ? ELEVATION_HIGH : ELEVATION_LOW);
} else if (mActivity != null) { // activity can become null when running monkey
final ActionBar actionBar = mActivity.getActionBar();
if (actionBar != null) {
actionBar.setElevation(shouldShowShadow ? ELEVATION_HIGH : ELEVATION_LOW);
}
}
}
}
}

View File

@ -0,0 +1,27 @@
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "frameworks_base_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["frameworks_base_license"],
}
android_library {
name: "SettingsLibActionButtonsPreference",
use_resource_processor: true,
defaults: [
"SettingsLintDefaults",
],
srcs: ["src/**/*.java"],
resource_dirs: ["res"],
static_libs: [
"androidx.preference_preference",
"SettingsLibUtils",
],
sdk_version: "system_current",
min_sdk_version: "21",
}

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2018 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.settingslib.widget.preference.actionbuttons">
<uses-sdk android:minSdkVersion="21" />
</manifest>

View File

@ -0,0 +1,53 @@
/**
* Include this gradle file if you are building against this as a standalone gradle library project,
* as opposed to building it as part of the git-tree. This is typically the file you want to include
* if you create a new project in Android Studio.
*
* For example, you can include the following in your settings.gradle file:
* include ':setupcompat'
* project(':setupcompat').projectDir = new File(PATH_TO_THIS_DIRECTORY)
*
* And then you can include the :setupcompat project as one of your dependencies
* dependencies {
* implementation project(path: ':setupcompat')
* }
*/
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
}
android {
// Not specifying compileSdkVersion here so clients can specify it; must be at least Q
namespace = "com.android.settingslib.widget.preference.actionbuttons"
compileSdk 34
defaultConfig {
minSdkVersion 31
targetSdkVersion 34
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.flags'
}
}
sourceSets.main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}
dependencies {
// implementation "androidx.annotation:annotation:1.0.0"
implementation files('../../libs/preference-1.3.0-alpha01.aar')
implementation project(':SettingsLib:Utils')
}

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2021 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:targetApi="28"
android:shape="rectangle">
<solid android:color="?androidprv:attr/colorSurface" />
<corners
android:topLeftRadius="?android:attr/dialogCornerRadius"
android:topRightRadius="0dp"
android:bottomLeftRadius="?android:attr/dialogCornerRadius"
android:bottomRightRadius="0dp"
/>
</shape>

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2021 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:targetApi="28"
android:shape="rectangle">
<solid android:color="?androidprv:attr/colorSurface" />
<corners
android:topLeftRadius="0dp"
android:topRightRadius="?android:attr/dialogCornerRadius"
android:bottomLeftRadius="0dp"
android:bottomRightRadius="?android:attr/dialogCornerRadius"
/>
</shape>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2021 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:attr/colorControlHighlight">
<item android:drawable="@drawable/half_rounded_left_bk"/>
</ripple>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2021 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:attr/colorControlHighlight">
<item android:drawable="@drawable/half_rounded_right_bk"/>
</ripple>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2021 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:targetApi="28"
android:shape="rectangle">
<solid android:color="?androidprv:attr/colorSurface" />
<corners
android:radius="?android:attr/dialogCornerRadius"
/>
</shape>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2021 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:attr/colorControlHighlight">
<item android:drawable="@drawable/rounded_bk"/>
</ripple>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2021 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
android:shape="rectangle">
<solid android:color="?androidprv:attr/colorSurface" />
<corners
android:radius="0dp"
/>
</shape>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2021 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:attr/colorControlHighlight">
<item android:drawable="@drawable/square_bk"/>
</ripple>

View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2021 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:paddingHorizontal="8dp"
android:orientation="horizontal">
<Button
android:id="@+id/button1"
style="@style/SettingsLibActionButton"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
<View
android:id="@+id/divider1"
android:layout_width="1dp"
android:layout_height="match_parent"
android:paddingHorizontal="4dp"
android:visibility="gone"
android:background="?android:colorBackground" />
<Button
android:id="@+id/button2"
style="@style/SettingsLibActionButton"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
<View
android:id="@+id/divider2"
android:layout_width="1dp"
android:layout_height="match_parent"
android:paddingHorizontal="4dp"
android:visibility="gone"
android:background="?android:colorBackground" />
<Button
android:id="@+id/button3"
style="@style/SettingsLibActionButton"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
<View
android:id="@+id/divider3"
android:layout_width="1dp"
android:layout_height="match_parent"
android:paddingHorizontal="4dp"
android:visibility="gone"
android:background="?android:colorBackground" />
<Button
android:id="@+id/button4"
style="@style/SettingsLibActionButton"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
</LinearLayout>

View File

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2022 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:paddingHorizontal="8dp"
android:orientation="horizontal">
<Button
android:id="@+id/button1"
style="@style/SettingsLibActionButton"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:lineBreakWordStyle="phrase"
android:hyphenationFrequency="normalFast"/>
<View
android:id="@+id/divider1"
android:layout_width="1dp"
android:layout_height="match_parent"
android:paddingHorizontal="4dp"
android:visibility="gone"
android:background="?android:colorBackground" />
<Button
android:id="@+id/button2"
style="@style/SettingsLibActionButton"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:lineBreakWordStyle="phrase"
android:hyphenationFrequency="normalFast"/>
<View
android:id="@+id/divider2"
android:layout_width="1dp"
android:layout_height="match_parent"
android:paddingHorizontal="4dp"
android:visibility="gone"
android:background="?android:colorBackground" />
<Button
android:id="@+id/button3"
style="@style/SettingsLibActionButton"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:lineBreakWordStyle="phrase"
android:hyphenationFrequency="normalFast"/>
<View
android:id="@+id/divider3"
android:layout_width="1dp"
android:layout_height="match_parent"
android:paddingHorizontal="4dp"
android:visibility="gone"
android:background="?android:colorBackground" />
<Button
android:id="@+id/button4"
style="@style/SettingsLibActionButton"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:lineBreakWordStyle="phrase"
android:hyphenationFrequency="normalFast"/>
</LinearLayout>

View File

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2018 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="8dp"
android:orientation="horizontal">
<Button
android:id="@+id/button1"
style="@style/SettingsLibActionButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<Button
android:id="@+id/button2"
style="@style/SettingsLibActionButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<Button
android:id="@+id/button3"
style="@style/SettingsLibActionButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<Button
android:id="@+id/button4"
style="@style/SettingsLibActionButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2021 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Do not translate. -->
<integer-array name="background_style1">
<item>@drawable/rounded_ripple</item>
</integer-array>
<!-- Do not translate. -->
<integer-array name="background_style2">
<item>@drawable/left_rounded_ripple</item>
<item>@drawable/right_rounded_ripple</item>
</integer-array>
<!-- Do not translate. -->
<integer-array name="background_style3">
<item>@drawable/left_rounded_ripple</item>
<item>@drawable/square_ripple</item>
<item>@drawable/right_rounded_ripple</item>
</integer-array>
<!-- Do not translate. -->
<integer-array name="background_style4">
<item>@drawable/left_rounded_ripple</item>
<item>@drawable/square_ripple</item>
<item>@drawable/square_ripple</item>
<item>@drawable/right_rounded_ripple</item>
</integer-array>
</resources>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2018 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources
xmlns:tools="http://schemas.android.com/tools"
tools:targetApi="28">
<style name="SettingsLibActionButton" parent="android:Widget.DeviceDefault.Button.Borderless.Colored">
<item name="android:drawablePadding">4dp</item>
<item name="android:drawableTint">@*android:color/btn_colored_borderless_text_material</item>
<item name="android:paddingTop">20dp</item>
<item name="android:paddingBottom">20dp</item>
</style>
</resources>

View File

@ -0,0 +1,547 @@
/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.settingslib.widget;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import androidx.annotation.DrawableRes;
import androidx.annotation.StringRes;
import androidx.preference.Preference;
import androidx.preference.PreferenceViewHolder;
import com.android.settingslib.utils.BuildCompatUtils;
import java.util.ArrayList;
import java.util.List;
import com.android.settingslib.widget.preference.actionbuttons.R;
/**
* This preference provides a four buttons layout with Settings style.
* It looks like below
*
* ---------------------------------------
* - button1 | button2 | button3 | button4 -
* ---------------------------------------
*
* User can set title / icon / click listener for each button.
*
* By default, four buttons are visible.
* However, there are two cases which button should be invisible(View.GONE).
*
* 1. User sets invisible for button. ex: ActionButtonPreference.setButton1Visible(false)
* 2. User doesn't set any title or icon for button.
*/
public class ActionButtonsPreference extends Preference {
private static final String TAG = "ActionButtonPreference";
private static final boolean mIsAtLeastS = BuildCompatUtils.isAtLeastS();
private static final int SINGLE_BUTTON_STYLE = 1;
private static final int TWO_BUTTONS_STYLE = 2;
private static final int THREE_BUTTONS_STYLE = 3;
private static final int FOUR_BUTTONS_STYLE = 4;
private final ButtonInfo mButton1Info = new ButtonInfo();
private final ButtonInfo mButton2Info = new ButtonInfo();
private final ButtonInfo mButton3Info = new ButtonInfo();
private final ButtonInfo mButton4Info = new ButtonInfo();
private final List<ButtonInfo> mVisibleButtonInfos = new ArrayList<>(4);
private final List<Drawable> mBtnBackgroundStyle1 = new ArrayList<>(1);
private final List<Drawable> mBtnBackgroundStyle2 = new ArrayList<>(2);
private final List<Drawable> mBtnBackgroundStyle3 = new ArrayList<>(3);
private final List<Drawable> mBtnBackgroundStyle4 = new ArrayList<>(4);
private View mDivider1;
private View mDivider2;
private View mDivider3;
public ActionButtonsPreference(Context context, AttributeSet attrs,
int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
init();
}
public ActionButtonsPreference(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init();
}
public ActionButtonsPreference(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}
public ActionButtonsPreference(Context context) {
super(context);
init();
}
private void init() {
setLayoutResource(R.layout.settingslib_action_buttons);
setSelectable(false);
final Resources res = getContext().getResources();
fetchDrawableArray(mBtnBackgroundStyle1, res.obtainTypedArray(R.array.background_style1));
fetchDrawableArray(mBtnBackgroundStyle2, res.obtainTypedArray(R.array.background_style2));
fetchDrawableArray(mBtnBackgroundStyle3, res.obtainTypedArray(R.array.background_style3));
fetchDrawableArray(mBtnBackgroundStyle4, res.obtainTypedArray(R.array.background_style4));
}
private void fetchDrawableArray(List<Drawable> drawableList, TypedArray typedArray) {
for (int i = 0; i < typedArray.length(); i++) {
drawableList.add(
getContext().getDrawable(typedArray.getResourceId(i, 0 /* defValue */)));
}
}
@Override
public void onBindViewHolder(PreferenceViewHolder holder) {
super.onBindViewHolder(holder);
holder.setDividerAllowedAbove(!mIsAtLeastS);
holder.setDividerAllowedBelow(!mIsAtLeastS);
mButton1Info.mButton = (Button) holder.findViewById(R.id.button1);
mButton2Info.mButton = (Button) holder.findViewById(R.id.button2);
mButton3Info.mButton = (Button) holder.findViewById(R.id.button3);
mButton4Info.mButton = (Button) holder.findViewById(R.id.button4);
mDivider1 = holder.findViewById(R.id.divider1);
mDivider2 = holder.findViewById(R.id.divider2);
mDivider3 = holder.findViewById(R.id.divider3);
mButton1Info.setUpButton();
mButton2Info.setUpButton();
mButton3Info.setUpButton();
mButton4Info.setUpButton();
// Clear info list to avoid duplicate setup.
if (!mVisibleButtonInfos.isEmpty()) {
mVisibleButtonInfos.clear();
}
updateLayout();
}
@Override
protected void notifyChanged() {
super.notifyChanged();
// Update buttons background and layout when notified and visible button list exist.
if (!mVisibleButtonInfos.isEmpty()) {
mVisibleButtonInfos.clear();
updateLayout();
}
}
private void updateLayout() {
// Add visible button into list only when platform version is newer than S.
if (mButton1Info.isVisible() && mIsAtLeastS) {
mVisibleButtonInfos.add(mButton1Info);
}
if (mButton2Info.isVisible() && mIsAtLeastS) {
mVisibleButtonInfos.add(mButton2Info);
}
if (mButton3Info.isVisible() && mIsAtLeastS) {
mVisibleButtonInfos.add(mButton3Info);
}
if (mButton4Info.isVisible() && mIsAtLeastS) {
mVisibleButtonInfos.add(mButton4Info);
}
final boolean isRtl = getContext().getResources().getConfiguration()
.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL;
switch (mVisibleButtonInfos.size()) {
case SINGLE_BUTTON_STYLE :
if (isRtl) {
setupRtlBackgrounds(mVisibleButtonInfos, mBtnBackgroundStyle1);
} else {
setupBackgrounds(mVisibleButtonInfos, mBtnBackgroundStyle1);
}
break;
case TWO_BUTTONS_STYLE :
if (isRtl) {
setupRtlBackgrounds(mVisibleButtonInfos, mBtnBackgroundStyle2);
} else {
setupBackgrounds(mVisibleButtonInfos, mBtnBackgroundStyle2);
}
break;
case THREE_BUTTONS_STYLE :
if (isRtl) {
setupRtlBackgrounds(mVisibleButtonInfos, mBtnBackgroundStyle3);
} else {
setupBackgrounds(mVisibleButtonInfos, mBtnBackgroundStyle3);
}
break;
case FOUR_BUTTONS_STYLE :
if (isRtl) {
setupRtlBackgrounds(mVisibleButtonInfos, mBtnBackgroundStyle4);
} else {
setupBackgrounds(mVisibleButtonInfos, mBtnBackgroundStyle4);
}
break;
default:
Log.e(TAG, "No visible buttons info, skip background settings.");
break;
}
setupDivider1();
setupDivider2();
setupDivider3();
}
private void setupBackgrounds(
List<ButtonInfo> buttonInfoList, List<Drawable> buttonBackgroundStyles) {
for (int i = 0; i < buttonBackgroundStyles.size(); i++) {
buttonInfoList.get(i).mButton.setBackground(buttonBackgroundStyles.get(i));
}
}
private void setupRtlBackgrounds(
List<ButtonInfo> buttonInfoList, List<Drawable> buttonBackgroundStyles) {
for (int i = buttonBackgroundStyles.size() - 1; i >= 0; i--) {
buttonInfoList.get(buttonBackgroundStyles.size() - 1 - i)
.mButton.setBackground(buttonBackgroundStyles.get(i));
}
}
/**
* Set the visibility state of button1.
*/
public ActionButtonsPreference setButton1Visible(boolean isVisible) {
if (isVisible != mButton1Info.mIsVisible) {
mButton1Info.mIsVisible = isVisible;
notifyChanged();
}
return this;
}
/**
* Sets the text to be displayed in button1.
*/
public ActionButtonsPreference setButton1Text(@StringRes int textResId) {
final String newText = getContext().getString(textResId);
if (!TextUtils.equals(newText, mButton1Info.mText)) {
mButton1Info.mText = newText;
notifyChanged();
}
return this;
}
/**
* Sets the drawable to be displayed above of text in button1.
*/
public ActionButtonsPreference setButton1Icon(@DrawableRes int iconResId) {
if (iconResId == 0) {
return this;
}
final Drawable icon;
try {
icon = getContext().getDrawable(iconResId);
mButton1Info.mIcon = icon;
notifyChanged();
} catch (Resources.NotFoundException exception) {
Log.e(TAG, "Resource does not exist: " + iconResId);
}
return this;
}
/**
* Set the enabled state of button1.
*/
public ActionButtonsPreference setButton1Enabled(boolean isEnabled) {
if (isEnabled != mButton1Info.mIsEnabled) {
mButton1Info.mIsEnabled = isEnabled;
notifyChanged();
}
return this;
}
/**
* Register a callback to be invoked when button1 is clicked.
*/
public ActionButtonsPreference setButton1OnClickListener(
View.OnClickListener listener) {
if (listener != mButton1Info.mListener) {
mButton1Info.mListener = listener;
notifyChanged();
}
return this;
}
/**
* Set the visibility state of button2.
*/
public ActionButtonsPreference setButton2Visible(boolean isVisible) {
if (isVisible != mButton2Info.mIsVisible) {
mButton2Info.mIsVisible = isVisible;
notifyChanged();
}
return this;
}
/**
* Sets the text to be displayed in button2.
*/
public ActionButtonsPreference setButton2Text(@StringRes int textResId) {
final String newText = getContext().getString(textResId);
if (!TextUtils.equals(newText, mButton2Info.mText)) {
mButton2Info.mText = newText;
notifyChanged();
}
return this;
}
/**
* Sets the drawable to be displayed above of text in button2.
*/
public ActionButtonsPreference setButton2Icon(@DrawableRes int iconResId) {
if (iconResId == 0) {
return this;
}
final Drawable icon;
try {
icon = getContext().getDrawable(iconResId);
mButton2Info.mIcon = icon;
notifyChanged();
} catch (Resources.NotFoundException exception) {
Log.e(TAG, "Resource does not exist: " + iconResId);
}
return this;
}
/**
* Set the enabled state of button2.
*/
public ActionButtonsPreference setButton2Enabled(boolean isEnabled) {
if (isEnabled != mButton2Info.mIsEnabled) {
mButton2Info.mIsEnabled = isEnabled;
notifyChanged();
}
return this;
}
/**
* Register a callback to be invoked when button2 is clicked.
*/
public ActionButtonsPreference setButton2OnClickListener(
View.OnClickListener listener) {
if (listener != mButton2Info.mListener) {
mButton2Info.mListener = listener;
notifyChanged();
}
return this;
}
/**
* Set the visibility state of button3.
*/
public ActionButtonsPreference setButton3Visible(boolean isVisible) {
if (isVisible != mButton3Info.mIsVisible) {
mButton3Info.mIsVisible = isVisible;
notifyChanged();
}
return this;
}
/**
* Sets the text to be displayed in button3.
*/
public ActionButtonsPreference setButton3Text(@StringRes int textResId) {
final String newText = getContext().getString(textResId);
if (!TextUtils.equals(newText, mButton3Info.mText)) {
mButton3Info.mText = newText;
notifyChanged();
}
return this;
}
/**
* Sets the drawable to be displayed above of text in button3.
*/
public ActionButtonsPreference setButton3Icon(@DrawableRes int iconResId) {
if (iconResId == 0) {
return this;
}
final Drawable icon;
try {
icon = getContext().getDrawable(iconResId);
mButton3Info.mIcon = icon;
notifyChanged();
} catch (Resources.NotFoundException exception) {
Log.e(TAG, "Resource does not exist: " + iconResId);
}
return this;
}
/**
* Set the enabled state of button3.
*/
public ActionButtonsPreference setButton3Enabled(boolean isEnabled) {
if (isEnabled != mButton3Info.mIsEnabled) {
mButton3Info.mIsEnabled = isEnabled;
notifyChanged();
}
return this;
}
/**
* Register a callback to be invoked when button3 is clicked.
*/
public ActionButtonsPreference setButton3OnClickListener(
View.OnClickListener listener) {
if (listener != mButton3Info.mListener) {
mButton3Info.mListener = listener;
notifyChanged();
}
return this;
}
/**
* Set the visibility state of button4.
*/
public ActionButtonsPreference setButton4Visible(boolean isVisible) {
if (isVisible != mButton4Info.mIsVisible) {
mButton4Info.mIsVisible = isVisible;
notifyChanged();
}
return this;
}
/**
* Sets the text to be displayed in button4.
*/
public ActionButtonsPreference setButton4Text(@StringRes int textResId) {
final String newText = getContext().getString(textResId);
if (!TextUtils.equals(newText, mButton4Info.mText)) {
mButton4Info.mText = newText;
notifyChanged();
}
return this;
}
/**
* Sets the drawable to be displayed above of text in button4.
*/
public ActionButtonsPreference setButton4Icon(@DrawableRes int iconResId) {
if (iconResId == 0) {
return this;
}
final Drawable icon;
try {
icon = getContext().getDrawable(iconResId);
mButton4Info.mIcon = icon;
notifyChanged();
} catch (Resources.NotFoundException exception) {
Log.e(TAG, "Resource does not exist: " + iconResId);
}
return this;
}
/**
* Set the enabled state of button4.
*/
public ActionButtonsPreference setButton4Enabled(boolean isEnabled) {
if (isEnabled != mButton4Info.mIsEnabled) {
mButton4Info.mIsEnabled = isEnabled;
notifyChanged();
}
return this;
}
/**
* Register a callback to be invoked when button4 is clicked.
*/
public ActionButtonsPreference setButton4OnClickListener(
View.OnClickListener listener) {
if (listener != mButton4Info.mListener) {
mButton4Info.mListener = listener;
notifyChanged();
}
return this;
}
private void setupDivider1() {
// Display divider1 only if button1 and button2 is visible
if (mDivider1 != null && mButton1Info.isVisible() && mButton2Info.isVisible()) {
mDivider1.setVisibility(View.VISIBLE);
}
}
private void setupDivider2() {
// Display divider2 only if button3 is visible and button2 or button3 is visible
if (mDivider2 != null && mButton3Info.isVisible()
&& (mButton1Info.isVisible() || mButton2Info.isVisible())) {
mDivider2.setVisibility(View.VISIBLE);
}
}
private void setupDivider3() {
// Display divider3 only if button4 is visible and 2 visible buttons at least
if (mDivider3 != null && mVisibleButtonInfos.size() > 1 && mButton4Info.isVisible()) {
mDivider3.setVisibility(View.VISIBLE);
}
}
static class ButtonInfo {
private Button mButton;
private CharSequence mText;
private Drawable mIcon;
private View.OnClickListener mListener;
private boolean mIsEnabled = true;
private boolean mIsVisible = true;
void setUpButton() {
mButton.setText(mText);
mButton.setOnClickListener(mListener);
mButton.setEnabled(mIsEnabled);
mButton.setCompoundDrawablesWithIntrinsicBounds(
null /* left */, mIcon /* top */, null /* right */, null /* bottom */);
if (shouldBeVisible()) {
mButton.setVisibility(View.VISIBLE);
} else {
mButton.setVisibility(View.GONE);
}
}
boolean isVisible() {
return mButton.getVisibility() == View.VISIBLE;
}
/**
* By default, four buttons are visible.
* However, there are two cases which button should be invisible.
*
* 1. User set invisible for this button. ex: mIsVisible = false.
* 2. User didn't set any title or icon.
*/
private boolean shouldBeVisible() {
return mIsVisible && (!TextUtils.isEmpty(mText) || mIcon != null);
}
}
}

View File

@ -0,0 +1,39 @@
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "frameworks_base_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["frameworks_base_license"],
}
android_library {
name: "SettingsLibActivityEmbedding",
use_resource_processor: true,
defaults: [
"SettingsLintDefaults",
],
srcs: ["src/**/*.java"],
static_libs: [
"androidx.annotation_annotation",
"androidx.core_core",
"androidx.window_window",
"SettingsLibUtils",
],
sdk_version: "system_current",
min_sdk_version: "21",
// TODO(b/228508619) Remove the optional uses after fixing upstream
optional_uses_libs: [
"org.apache.http.legacy",
"androidx.window.extensions",
"androidx.window.sidecar",
],
apex_available: [
"//apex_available:platform",
"com.android.permission",
"com.android.healthfitness",
],
}

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2021 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.settingslib.widget.activityembedding">
<uses-sdk android:minSdkVersion="21" />
<application>
<uses-library android:name="org.apache.http.legacy" android:required="false" />
<uses-library android:name="androidx.window.extensions" android:required="false" />
<uses-library android:name="androidx.window.sidecar" android:required="false" />
</application>
</manifest>

View File

@ -0,0 +1,4 @@
# Default reviewers for this and subdirectories.
sunnyshao@google.com
# Emergency approvers in case the above are not available

View File

@ -0,0 +1,111 @@
/*
* Copyright (C) 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.settingslib.activityembedding;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import androidx.core.os.BuildCompat;
import androidx.window.embedding.ActivityEmbeddingController;
import com.android.settingslib.utils.BuildCompatUtils;
/**
* An util class collecting all common methods for the embedding activity features.
*/
public final class ActivityEmbeddingUtils {
private static final String ACTION_SETTINGS_EMBED_DEEP_LINK_ACTIVITY =
"android.settings.SETTINGS_EMBED_DEEP_LINK_ACTIVITY";
private static final String PACKAGE_NAME_SETTINGS = "com.android.settings";
private static final String TAG = "ActivityEmbeddingUtils";
/**
* Whether the embedding activity feature is enabled.
*
* <p>This returns false if the Android version is below S or if the embedding activity is not
* enabled (unsupported devices).
*/
public static boolean isEmbeddingActivityEnabled(Context context) {
final boolean isEmbeddingActivityEnabled = getEmbeddingActivityComponent(context) != null;
Log.d(TAG, "isEmbeddingActivityEnabled : " + isEmbeddingActivityEnabled);
return isEmbeddingActivityEnabled;
}
/**
* Returns a base Intent to the embedding activity (without the extras).
*
* <p>This returns null if the Android version is below S or if the embedding activity is not
* enabled (unsupported devices).
*/
public static Intent buildEmbeddingActivityBaseIntent(Context context) {
ComponentName embeddingActivityComponentName = getEmbeddingActivityComponent(context);
if (embeddingActivityComponentName == null) {
return null;
}
return new Intent(ACTION_SETTINGS_EMBED_DEEP_LINK_ACTIVITY)
.setComponent(embeddingActivityComponentName);
}
/**
* Returns the ComponentName associated with the embedding activity.
*
* <p>This returns null if the Android version is below S or if the embedding activity is not
* enabled (unsupported devices).
*/
private static ComponentName getEmbeddingActivityComponent(Context context) {
if (!BuildCompatUtils.isAtLeastSV2()) {
return null;
}
final Intent intent = new Intent(ACTION_SETTINGS_EMBED_DEEP_LINK_ACTIVITY);
intent.setPackage(PACKAGE_NAME_SETTINGS);
return intent.resolveActivity(context.getPackageManager());
}
/**
* Whether the current activity is embedded in the Settings app or not.
*
* @param activity Activity that needs the check
*/
public static boolean isActivityEmbedded(Activity activity) {
return ActivityEmbeddingController.getInstance(activity).isActivityEmbedded(activity);
}
/**
* Whether the current activity should hide the navigate up button.
*
* @param activity Activity that needs the check
* @param isSecondLayerPage indicates if the activity(page) is shown in the 2nd layer of
* Settings app
*/
public static boolean shouldHideNavigateUpButton(Activity activity, boolean isSecondLayerPage) {
if (!BuildCompat.isAtLeastT()) {
return false;
}
if (!isSecondLayerPage) {
return false;
}
return isActivityEmbedded(activity);
}
private ActivityEmbeddingUtils() {
}
}

View File

@ -0,0 +1,29 @@
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "frameworks_base_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["frameworks_base_license"],
}
android_library {
name: "SettingsLibAdaptiveIcon",
use_resource_processor: true,
defaults: [
"SettingsLintDefaults",
],
srcs: ["src/**/*.java"],
resource_dirs: ["res"],
static_libs: [
"androidx.annotation_annotation",
"SettingsLibTile",
],
min_sdk_version: "21",
lint: {
baseline_filename: "lint-baseline.xml",
},
}

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2019 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.settingslib.widget.adaptiveicon">
<uses-sdk android:minSdkVersion="21" />
</manifest>

View File

@ -0,0 +1,52 @@
/**
* Include this gradle file if you are building against this as a standalone gradle library project,
* as opposed to building it as part of the git-tree. This is typically the file you want to include
* if you create a new project in Android Studio.
*
* For example, you can include the following in your settings.gradle file:
* include ':setupcompat'
* project(':setupcompat').projectDir = new File(PATH_TO_THIS_DIRECTORY)
*
* And then you can include the :setupcompat project as one of your dependencies
* dependencies {
* implementation project(path: ':setupcompat')
* }
*/
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
}
android {
// Not specifying compileSdkVersion here so clients can specify it; must be at least Q
namespace = "com.android.settingslib.widget.adaptiveicon"
compileSdk 34
defaultConfig {
minSdkVersion 31
targetSdkVersion 34
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.flags'
}
}
sourceSets.main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}
dependencies {
implementation libs.androidx.annotation.annotation
implementation project(':SettingsLib:Tile')
}

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 8.4.0-alpha01" type="baseline" client="" dependencies="true" name="" variant="all" version="8.4.0-alpha01">
<issue
id="NewApi"
message="Call requires API level 23 (current min is 21): `android.content.res.Resources#getColor`"
errorLine1=" .getColor(colorRes, null /* theme */);"
errorLine2=" ~~~~~~~~">
<location
file="frameworks/base/packages/SettingsLib/AdaptiveIcon/src/com/android/settingslib/widget/AdaptiveIcon.java"
line="79"
column="34"/>
</issue>
<issue
id="NewApi"
message="Call requires API level 23 (current min is 21): `android.content.Context#getColor`"
errorLine1=" setBackgroundColor(context.getColor(R.color.homepage_generic_icon_background));"
errorLine2=" ~~~~~~~~">
<location
file="frameworks/base/packages/SettingsLib/AdaptiveIcon/src/com/android/settingslib/widget/AdaptiveIcon.java"
line="91"
column="36"/>
</issue>
<issue
id="NewApi"
message="Class requires API level 23 (current min is 21): `android.graphics.drawable.DrawableWrapper`"
errorLine1="public class AdaptiveOutlineDrawable extends DrawableWrapper {"
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="frameworks/base/packages/SettingsLib/AdaptiveIcon/src/com/android/settingslib/widget/AdaptiveOutlineDrawable.java"
line="45"
column="46"/>
</issue>
<issue
id="NewApi"
message="Call requires API level 23 (current min is 21): `new android.graphics.drawable.DrawableWrapper`"
errorLine1=" super(new AdaptiveIconShapeDrawable(resources));"
errorLine2=" ~~~~~">
<location
file="frameworks/base/packages/SettingsLib/AdaptiveIcon/src/com/android/settingslib/widget/AdaptiveOutlineDrawable.java"
line="67"
column="9"/>
</issue>
<issue
id="NewApi"
message="Call requires API level 23 (current min is 21): `new android.graphics.drawable.DrawableWrapper`"
errorLine1=" super(new AdaptiveIconShapeDrawable(resources));"
errorLine2=" ~~~~~">
<location
file="frameworks/base/packages/SettingsLib/AdaptiveIcon/src/com/android/settingslib/widget/AdaptiveOutlineDrawable.java"
line="74"
column="9"/>
</issue>
<issue
id="NewApi"
message="Call requires API level 23 (current min is 21): `android.graphics.drawable.DrawableWrapper#getDrawable`"
errorLine1=" getDrawable().setTint(Color.WHITE);"
errorLine2=" ~~~~~~~~~~~">
<location
file="frameworks/base/packages/SettingsLib/AdaptiveIcon/src/com/android/settingslib/widget/AdaptiveOutlineDrawable.java"
line="82"
column="9"/>
</issue>
<issue
id="NewApi"
message="Call requires API level 23 (current min is 21): `android.content.res.Resources#getColor`"
errorLine1=" return resources.getColor(resId, /* theme */ null);"
errorLine2=" ~~~~~~~~">
<location
file="frameworks/base/packages/SettingsLib/AdaptiveIcon/src/com/android/settingslib/widget/AdaptiveOutlineDrawable.java"
line="107"
column="26"/>
</issue>
</issues>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2020 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<color name="advanced_outline_color">#FFFFFFFF</color> <!-- icon outline color -->
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2019 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<color name="homepage_generic_icon_background">#1A73E8</color>
<color name="bt_outline_color">#1f000000</color> <!-- icon outline color -->
<color name="advanced_outline_color">#BDC1C6</color> <!-- icon outline color -->
<color name="advanced_icon_color">#3C4043</color>
</resources>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2019 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<!-- Dashboard foreground image inset (from background edge to foreground edge) -->
<dimen name="dashboard_tile_foreground_image_inset">6dp</dimen>
<!-- Advanced dashboard foreground image inset (from background edge to foreground edge) -->
<dimen name="advanced_dashboard_tile_foreground_image_inset">9dp</dimen>
<!-- Stroke size of adaptive outline -->
<dimen name="adaptive_outline_stroke">1dp</dimen>
</resources>

View File

@ -0,0 +1,134 @@
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.settingslib.widget;
import static androidx.annotation.VisibleForTesting.NONE;
import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_ICON_BACKGROUND_ARGB;
import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_ICON_BACKGROUND_HINT;
import android.content.Context;
import android.content.pm.PackageManager;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
import android.os.Bundle;
import android.util.Log;
import androidx.annotation.VisibleForTesting;
import com.android.settingslib.drawer.Tile;
import com.android.settingslib.widget.adaptiveicon.R;
/**
* Adaptive icon that can set background color
*/
public class AdaptiveIcon extends LayerDrawable {
private static final String TAG = "AdaptiveHomepageIcon";
@VisibleForTesting(otherwise = NONE)
int mBackgroundColor = -1;
private AdaptiveConstantState mAdaptiveConstantState;
public AdaptiveIcon(Context context, Drawable foreground) {
this(context, foreground, R.dimen.dashboard_tile_foreground_image_inset);
}
public AdaptiveIcon(Context context, Drawable foreground, int insetResId) {
super(new Drawable[]{
new AdaptiveIconShapeDrawable(context.getResources()),
foreground
});
final int insetPx = context.getResources().getDimensionPixelSize(insetResId);
setLayerInset(1 /* index */, insetPx, insetPx, insetPx, insetPx);
mAdaptiveConstantState = new AdaptiveConstantState(context, foreground);
}
/**
* According {@code tile} metaData to set background color
*/
public void setBackgroundColor(Context context, Tile tile) {
final Bundle metaData = tile.getMetaData();
try {
if (metaData != null) {
// Load from bg.argb first
int bgColor = metaData.getInt(META_DATA_PREFERENCE_ICON_BACKGROUND_ARGB,
0 /* default */);
// Not found, load from bg.hint
if (bgColor == 0) {
final int colorRes = metaData.getInt(META_DATA_PREFERENCE_ICON_BACKGROUND_HINT,
0 /* default */);
if (colorRes != 0) {
bgColor = context.getPackageManager()
.getResourcesForApplication(tile.getPackageName())
.getColor(colorRes, null /* theme */);
}
}
// If found anything, use it.
if (bgColor != 0) {
setBackgroundColor(bgColor);
return;
}
}
} catch (PackageManager.NameNotFoundException e) {
Log.e(TAG, "Failed to set background color for " + tile.getPackageName());
}
setBackgroundColor(context.getColor(R.color.homepage_generic_icon_background));
}
/**
* Set background color by {@code color}
*/
public void setBackgroundColor(int color) {
mBackgroundColor = color;
getDrawable(0).setColorFilter(color, PorterDuff.Mode.SRC_ATOP);
Log.d(TAG, "Setting background color " + mBackgroundColor);
mAdaptiveConstantState.mColor = color;
}
@Override
public ConstantState getConstantState() {
return mAdaptiveConstantState;
}
@VisibleForTesting
static class AdaptiveConstantState extends ConstantState {
Context mContext;
Drawable mDrawable;
int mColor;
AdaptiveConstantState(Context context, Drawable drawable) {
this.mContext = context;
this.mDrawable = drawable;
}
@Override
public Drawable newDrawable() {
final AdaptiveIcon
icon = new AdaptiveIcon(mContext, mDrawable);
icon.setBackgroundColor(mColor);
return icon;
}
@Override
public int getChangingConfigurations() {
return 0;
}
}
}

View File

@ -0,0 +1,59 @@
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.settingslib.widget;
import android.content.res.Resources;
import android.content.res.Resources.Theme;
import android.graphics.Path;
import android.graphics.drawable.AdaptiveIconDrawable;
import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.shapes.PathShape;
import android.util.AttributeSet;
import android.util.PathParser;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import java.io.IOException;
/**
* Draws a filled {@link ShapeDrawable} using the path from {@link AdaptiveIconDrawable}.
*/
public class AdaptiveIconShapeDrawable extends ShapeDrawable {
public AdaptiveIconShapeDrawable() {
super();
}
public AdaptiveIconShapeDrawable(Resources resources) {
super();
init(resources);
}
@Override
public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Theme theme)
throws XmlPullParserException, IOException {
super.inflate(r, parser, attrs, theme);
init(r);
}
private void init(Resources resources) {
final float pathSize = AdaptiveIconDrawable.MASK_SIZE;
final Path path = new Path(PathParser.createPathFromPathData(
resources.getString(com.android.internal.R.string.config_icon_mask)));
setShape(new PathShape(path, pathSize, pathSize));
}
}

View File

@ -0,0 +1,166 @@
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.settingslib.widget;
import android.annotation.ColorInt;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Rect;
import android.graphics.drawable.AdaptiveIconDrawable;
import android.graphics.drawable.DrawableWrapper;
import android.os.RemoteException;
import android.util.PathParser;
import android.view.IWindowManager;
import android.view.WindowManagerGlobal;
import androidx.annotation.IntDef;
import androidx.annotation.VisibleForTesting;
import com.android.settingslib.widget.adaptiveicon.R;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/**
* Adaptive outline drawable with white plain background color and black outline
*/
public class AdaptiveOutlineDrawable extends DrawableWrapper {
private static final float ADVANCED_ICON_CENTER = 50f;
private static final float ADVANCED_ICON_RADIUS = 48f;
public static final int ICON_TYPE_DEFAULT = 0;
public static final int ICON_TYPE_ADVANCED = 1;
@Retention(RetentionPolicy.SOURCE)
@IntDef({ICON_TYPE_DEFAULT, ICON_TYPE_ADVANCED})
public @interface AdaptiveOutlineIconType {
}
@VisibleForTesting
Paint mOutlinePaint;
private Path mPath;
private int mInsetPx;
private int mStrokeWidth;
private Bitmap mBitmap;
private int mType;
public AdaptiveOutlineDrawable(Resources resources, Bitmap bitmap) {
super(new AdaptiveIconShapeDrawable(resources));
init(resources, bitmap, ICON_TYPE_DEFAULT);
}
public AdaptiveOutlineDrawable(Resources resources, Bitmap bitmap,
@AdaptiveOutlineIconType int type) {
super(new AdaptiveIconShapeDrawable(resources));
init(resources, bitmap, type);
}
private void init(Resources resources, Bitmap bitmap,
@AdaptiveOutlineIconType int type) {
mType = type;
getDrawable().setTint(Color.WHITE);
mPath = new Path(PathParser.createPathFromPathData(
resources.getString(com.android.internal.R.string.config_icon_mask)));
mStrokeWidth = resources.getDimensionPixelSize(R.dimen.adaptive_outline_stroke);
mOutlinePaint = new Paint();
mOutlinePaint.setColor(getColor(resources, type));
mOutlinePaint.setStyle(Paint.Style.STROKE);
mOutlinePaint.setStrokeWidth(mStrokeWidth);
mOutlinePaint.setAntiAlias(true);
mInsetPx = getDimensionPixelSize(resources, type);
mBitmap = bitmap;
}
private @ColorInt int getColor(Resources resources, @AdaptiveOutlineIconType int type) {
int resId;
switch (type) {
case ICON_TYPE_ADVANCED:
resId = R.color.advanced_outline_color;
break;
case ICON_TYPE_DEFAULT:
default:
resId = R.color.bt_outline_color;
break;
}
return resources.getColor(resId, /* theme */ null);
}
private int getDimensionPixelSize(Resources resources, @AdaptiveOutlineIconType int type) {
int resId;
switch (type) {
case ICON_TYPE_ADVANCED:
resId = R.dimen.advanced_dashboard_tile_foreground_image_inset;
break;
case ICON_TYPE_DEFAULT:
default:
resId = R.dimen.dashboard_tile_foreground_image_inset;
break;
}
return resources.getDimensionPixelSize(resId);
}
@Override
public void draw(Canvas canvas) {
super.draw(canvas);
final Rect bounds = getBounds();
final float pathSize = AdaptiveIconDrawable.MASK_SIZE;
final float scaleX = (bounds.right - bounds.left) / pathSize;
final float scaleY = (bounds.bottom - bounds.top) / pathSize;
final int count = canvas.save();
canvas.scale(scaleX, scaleY);
// Draw outline
if (mType == ICON_TYPE_DEFAULT) {
canvas.drawPath(mPath, mOutlinePaint);
} else {
canvas.drawCircle(ADVANCED_ICON_CENTER, ADVANCED_ICON_CENTER, ADVANCED_ICON_RADIUS,
mOutlinePaint);
}
canvas.restoreToCount(count);
// Draw the foreground icon
canvas.drawBitmap(mBitmap, bounds.left + mInsetPx, bounds.top + mInsetPx, null);
}
private static int getDefaultDisplayDensity(int displayId) {
try {
final IWindowManager wm = WindowManagerGlobal.getWindowManagerService();
return wm.getInitialDisplayDensity(displayId);
} catch (RemoteException exc) {
return -1;
}
}
@Override
public int getIntrinsicHeight() {
return mBitmap.getHeight() + 2 * mInsetPx;
}
@Override
public int getIntrinsicWidth() {
return mBitmap.getWidth() + 2 * mInsetPx;
}
}

111
SettingsLib/Android.bp Normal file
View File

@ -0,0 +1,111 @@
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "frameworks_base_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["frameworks_base_license"],
}
android_library {
name: "SettingsLib",
defaults: [
"SettingsLintDefaults",
],
static_libs: [
"androidx.localbroadcastmanager_localbroadcastmanager",
"androidx.room_room-runtime",
"androidx.sqlite_sqlite",
"zxing-core",
"guava",
"WifiTrackerLibRes",
"iconloader",
"setupdesign",
"SettingsLibActionBarShadow",
"SettingsLibActionButtonsPreference",
"SettingsLibAdaptiveIcon",
"SettingsLibAppPreference",
"SettingsLibBannerMessagePreference",
"SettingsLibBarChartPreference",
"SettingsLibButtonPreference",
"SettingsLibCollapsingToolbarBaseActivity",
"SettingsLibDeviceStateRotationLock",
"SettingsLibDisplayUtils",
"SettingsLibEmergencyNumber",
"SettingsLibEntityHeaderWidgets",
"SettingsLibFooterPreference",
"SettingsLibHelpUtils",
"SettingsLibIllustrationPreference",
"SettingsLibLayoutPreference",
"SettingsLibMainSwitchPreference",
"SettingsLibProfileSelector",
"SettingsLibProgressBar",
"SettingsLibRestrictedLockUtils",
"SettingsLibSearchWidget",
"SettingsLibSelectorWithWidgetPreference",
"SettingsLibSettingsSpinner",
"SettingsLibSettingsTransition",
"SettingsLibTopIntroPreference",
"SettingsLibTwoTargetPreference",
"SettingsLibUsageProgressBarPreference",
"SettingsLibUtils",
"settingslib_media_flags_lib",
"settingslib_flags_lib",
],
plugins: ["androidx.room_room-compiler-plugin"],
use_resource_processor: true,
resource_dirs: ["res"],
srcs: [
"src/**/*.java",
"src/**/*.kt",
],
}
// defaults for lint option
java_defaults {
name: "SettingsLintDefaults",
lint: {
extra_check_modules: [
"SettingsLibLintChecker",
],
},
}
// NOTE: Keep this module in sync with ./common.mk
java_defaults {
name: "SettingsLibDefaults",
static_libs: [
"SettingsLib",
],
}
aconfig_declarations {
name: "settingslib_media_flags",
package: "com.android.settingslib.media.flags",
srcs: [
"aconfig/settingslib_media_flag_declarations.aconfig",
],
}
java_aconfig_library {
name: "settingslib_media_flags_lib",
aconfig_declarations: "settingslib_media_flags",
}
aconfig_declarations {
name: "settingslib_flags",
package: "com.android.settingslib.flags",
srcs: [
"aconfig/settingslib.aconfig",
],
}
java_aconfig_library {
name: "settingslib_flags_lib",
aconfig_declarations: "settingslib_flags",
}

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.settingslib">
<uses-permission android:name="android.permission.READ_DEVICE_CONFIG" />
<application>
<activity
android:name="com.android.settingslib.users.AvatarPickerActivity"
android:theme="@style/SudThemeGlifV2.DayNight"/>
</application>
</manifest>

View File

@ -0,0 +1,32 @@
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "frameworks_base_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["frameworks_base_license"],
}
android_library {
name: "SettingsLibAppPreference",
use_resource_processor: true,
defaults: [
"SettingsLintDefaults",
],
srcs: ["src/**/*.java"],
resource_dirs: ["res"],
static_libs: [
"androidx.annotation_annotation",
"androidx.preference_preference",
"SettingsLibSettingsTheme",
],
sdk_version: "system_current",
min_sdk_version: "21",
apex_available: [
"//apex_available:platform",
"com.android.permission",
"com.android.healthfitness",
],
}

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2018 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.settingslib.widget.preference.app">
<uses-sdk android:minSdkVersion="21" />
</manifest>

View File

@ -0,0 +1,53 @@
/**
* Include this gradle file if you are building against this as a standalone gradle library project,
* as opposed to building it as part of the git-tree. This is typically the file you want to include
* if you create a new project in Android Studio.
*
* For example, you can include the following in your settings.gradle file:
* include ':setupcompat'
* project(':setupcompat').projectDir = new File(PATH_TO_THIS_DIRECTORY)
*
* And then you can include the :setupcompat project as one of your dependencies
* dependencies {
* implementation project(path: ':setupcompat')
* }
*/
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
}
android {
// Not specifying compileSdkVersion here so clients can specify it; must be at least Q
namespace = "com.android.settingslib.widget.preference.app"
compileSdk 34
defaultConfig {
minSdkVersion 31
targetSdkVersion 34
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.flags'
}
}
sourceSets.main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}
dependencies {
implementation libs.androidx.annotation.annotation
implementation files('../../libs/preference-1.3.0-alpha01.aar')
implementation project(':SettingsLib:SettingsTheme')
}

View File

@ -0,0 +1,100 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2022 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:gravity="center_vertical"
android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
<LinearLayout
android:id="@+id/icon_frame"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="start|center_vertical"
android:minWidth="@dimen/secondary_app_icon_size"
android:orientation="horizontal"
android:paddingEnd="16dp"
android:paddingTop="4dp"
android:paddingBottom="4dp">
<ImageView
android:id="@android:id/icon"
android:layout_width="@dimen/secondary_app_icon_size"
android:layout_height="@dimen/secondary_app_icon_size"/>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:paddingTop="16dp"
android:paddingBottom="16dp">
<TextView
android:id="@android:id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:maxLines="2"
android:hyphenationFrequency="normalFast"
android:lineBreakWordStyle="phrase"
android:textAppearance="?android:attr/textAppearanceListItem"/>
<TextView
android:id="@android:id/summary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textDirection="locale"
android:hyphenationFrequency="normalFast"
android:lineBreakWordStyle="phrase"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorSecondary"/>
<TextView
android:id="@+id/appendix"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorSecondary"
android:visibility="gone"/>
<ProgressBar
android:id="@android:id/progress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="4dp"
android:layout_marginTop="4dp"
android:max="100"
android:visibility="gone"/>
</LinearLayout>
<LinearLayout
android:id="@android:id/widget_frame"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical|end"
android:minWidth="@dimen/two_target_min_width"
android:orientation="vertical"/>
</LinearLayout>

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2022 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:paddingBottom="16dp"
android:paddingTop="8dp"
android:clickable="false">
<TextView
android:id="@+id/apps_top_intro_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textDirection="locale"
android:clickable="false"
android:longClickable="false"
android:hyphenationFrequency="normalFast"
android:lineBreakWordStyle="phrase"
android:textAppearance="@style/TextAppearance.TopIntroText" />
</LinearLayout>

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2022 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="24dp"
android:paddingBottom="16dp"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:gravity="center_horizontal"
android:orientation="vertical">
<ImageView
android:id="@android:id/icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:scaleType="fitCenter"
android:antialias="true"/>
<TextView
android:id="@android:id/title"
style="@style/TextAppearance.EntityHeaderTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="false"
android:gravity="center"
android:ellipsize="marquee"
android:textDirection="locale"
android:layout_marginTop="8dp"/>
<TextView
android:id="@+id/install_type"
style="@style/TextAppearance.EntityHeaderSummary"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@string/install_type_instant"/>
<TextView
android:id="@android:id/summary"
style="@style/TextAppearance.EntityHeaderSummary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:singleLine="false"
android:textAlignment="center"/>
<TextView
android:id="@+id/second_summary"
style="@style/TextAppearance.EntityHeaderSummary"
android:singleLine="false"
android:maxLines="4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</RelativeLayout>

View File

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2018 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:gravity="center_vertical"
android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
<LinearLayout
android:id="@+id/icon_frame"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="start|center_vertical"
android:minWidth="@dimen/secondary_app_icon_size"
android:orientation="horizontal"
android:paddingEnd="16dp"
android:paddingTop="4dp"
android:paddingBottom="4dp">
<ImageView
android:id="@android:id/icon"
android:layout_width="@dimen/secondary_app_icon_size"
android:layout_height="@dimen/secondary_app_icon_size"/>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:paddingTop="16dp"
android:paddingBottom="16dp">
<TextView
android:id="@android:id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:maxLines="2"
android:textAppearance="?android:attr/textAppearanceListItem"/>
<TextView
android:id="@android:id/summary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textDirection="locale"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorSecondary"/>
<TextView
android:id="@+id/appendix"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorSecondary"
android:visibility="gone"/>
<ProgressBar
android:id="@android:id/progress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:max="100"
android:visibility="gone"/>
</LinearLayout>
<LinearLayout
android:id="@android:id/widget_frame"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical|end"
android:minWidth="@dimen/two_target_min_width"
android:orientation="vertical"/>
</LinearLayout>

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2022 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:paddingBottom="16dp"
android:paddingTop="8dp"
android:clickable="false">
<TextView
android:id="@+id/apps_top_intro_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textDirection="locale"
android:clickable="false"
android:longClickable="false"
android:textAppearance="@style/TextAppearance.TopIntroText" />
</LinearLayout>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Kitsprogram"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"በቅጽበት መተግበሪያ"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"تطبيق فوري"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"তাৎক্ষণিক এপ্‌"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Ani tətbiq"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Instant aplikacija"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Імгненная праграма"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Мигновено приложение"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"ইনস্ট্যান্ট অ্যাপ"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Instant aplikacija"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Aplicació instantània"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Okamžitá aplikace"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Instant-app"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Instant App"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Instant Εφαρμογή"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Instant app"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Instant app"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Instant app"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Instant app"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Instant app"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"App instantánea"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Aplicación instantánea"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Installimata avatav rakendus"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Zuzeneko aplikazioa"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"برنامه فوری"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Pikasovellus"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Application instantanée"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Appli instantanée"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Aplicación instantánea"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"ઝટપટ ઍપ્લિકેશન"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"इंस्टैंट ऐप्लिकेशन"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Instant aplikacija"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Azonnali alkalmazás"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Ակնթարթային հավելված"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Aplikasi instan"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Skyndiforrit"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"App istantanea"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"אפליקציה ללא התקנה"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Instant App"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"მყისიერი აპი"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Лездік қолданба"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"កម្មវិធីប្រើភ្លាមៗ"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"ತತ್‌ಕ್ಷಣ ಆ್ಯಪ್"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"인스턴트 앱"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Ыкчам ачылуучу колдонмо"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"ອິນສະແຕນແອັບ"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Akimirksniu įkeliama programėlė"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Tūlītējā lietotne"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"Инстант апликација"</string>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="install_type_instant" msgid="7217305006127216917">"ഇൻസ്‌റ്റന്റ് ആപ്പ്"</string>
</resources>

Some files were not shown because too many files have changed in this diff Show More