DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5699924) into stage-aosp-master

Bug: 134405016
Change-Id: I298dd1232c7e304b5d2cd9fda59006d08026698a
This commit is contained in:
Xin Li
2019-07-01 21:00:04 +00:00
4234 changed files with 268546 additions and 122390 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
.idea/
*.iml

View File

@@ -1,48 +1,65 @@
java_library { java_library {
name: "settings-logtags", name: "settings-logtags",
srcs: ["src/**/*.logtags"], srcs: ["src/**/*.logtags"],
} }
// Build the Settings APK // Build the Settings APK
android_app { android_library {
name: "Settings", name: "Settings-core",
defaults: ["SettingsLibDefaults"],
platform_apis: true, platform_apis: true,
certificate: "platform", defaults: [
product_specific: true, "SettingsLibDefaults",
privileged: true, "SettingsLib-search-defaults",
required: ["privapp_whitelist_com.android.settings"], ],
srcs: ["src/**/*.java"], srcs: ["src/**/*.java"],
static_libs: [ static_libs: [
"androidx-constraintlayout_constraintlayout",
"androidx.slice_slice-builders", "androidx.slice_slice-builders",
"androidx.slice_slice-core", "androidx.slice_slice-core",
"androidx.slice_slice-view", "androidx.slice_slice-view",
"androidx.core_core", "androidx.core_core",
"androidx.legacy_legacy-support-v4",
"androidx.legacy_legacy-support-v13",
"androidx.appcompat_appcompat", "androidx.appcompat_appcompat",
"androidx.cardview_cardview", "androidx.cardview_cardview",
"androidx.preference_preference", "androidx.preference_preference",
"androidx.recyclerview_recyclerview", "androidx.recyclerview_recyclerview",
"androidx.legacy_legacy-preference-v14", "com.google.android.material_material",
"setupcompat",
"setupdesign",
"androidx-constraintlayout_constraintlayout-solver",
"androidx.lifecycle_lifecycle-runtime", "androidx.lifecycle_lifecycle-runtime",
"androidx.lifecycle_lifecycle-extensions", "androidx.lifecycle_lifecycle-extensions",
"guava", "guava",
"jsr305", "jsr305",
"settings-contextual-card-protos-lite",
"settings-log-bridge-protos-lite",
"contextualcards",
"settings-logtags", "settings-logtags",
"setup-wizard-lib-gingerbread-compat", "zxing-core-1.7",
], ],
libs: [ libs: [
"telephony-common", "telephony-common",
"ims-common", "ims-common",
], ],
}
android_app {
name: "Settings",
platform_apis: true,
certificate: "platform",
product_specific: true,
privileged: true,
required: ["privapp_whitelist_com.android.settings"],
static_libs: ["Settings-core"],
resource_dirs: [],
optimize: { optimize: {
proguard_flags_files: ["proguard.flags"], proguard_flags_files: ["proguard.flags"],
}, },
} }
android_library_import {
name: "contextualcards",
aars: ["libs/contextualcards.aar"],
}

File diff suppressed because it is too large Load Diff

8
OWNERS
View File

@@ -6,13 +6,17 @@ asapperstein@google.com
asargent@google.com asargent@google.com
dehboxturtle@google.com dehboxturtle@google.com
dhnishi@google.com dhnishi@google.com
dling@google.com edgarwang@google.com
emilychuang@google.com
jackqdyulei@google.com jackqdyulei@google.com
lindatseng@google.com
mfritze@google.com mfritze@google.com
rafftsai@google.com
tmfang@google.com
zhfan@google.com zhfan@google.com
# Emergency approvers in case the above are not available # Emergency approvers in case the above are not available
miket@google.com miket@google.com
# Exempt resource files (because they are in a flat directory and too hard to manage via OWNERS) # Exempt resource files (because they are in a flat directory and too hard to manage via OWNERS)
per-file *.xml=* per-file *.xml=*

File diff suppressed because it is too large Load Diff

BIN
libs/contextualcards.aar Executable file

Binary file not shown.

View File

@@ -1,8 +1,12 @@
# This is a configuration file for ProGuard. # This is a configuration file for ProGuard.
# http://proguard.sourceforge.net/index.html#manual/usage.html # http://proguard.sourceforge.net/index.html#manual/usage.html
# Some tests use thenThrow from Mockito which require information on
# checked exceptions.
-keepattributes Exceptions
# Keep all Fragments in this package, which are used by reflection. # Keep all Fragments in this package, which are used by reflection.
-keep public class com.android.settings.** extends android.app.Fragment -keep public class com.android.settings.** extends androidx.fragment.app.Fragment
# Keep all preference controllers needed by slice and DashboardFragment. # Keep all preference controllers needed by slice and DashboardFragment.
-keep class * extends com.android.settings.core.BasePreferenceController { -keep class * extends com.android.settings.core.BasePreferenceController {
@@ -52,3 +56,13 @@
public static ** SUMMARY_PROVIDER_FACTORY; public static ** SUMMARY_PROVIDER_FACTORY;
} }
-keep class androidx.core.app.CoreComponentFactory -keep class androidx.core.app.CoreComponentFactory
# Keep classes that implements CustomSliceable, which are used by reflection.
-keepclasseswithmembers class * implements com.android.settings.slices.CustomSliceable {
public <init>(android.content.Context);
}
# Keep classes that extends SliceBackgroundWorker, which are used by reflection.
-keepclasseswithmembers class * extends com.android.settings.slices.SliceBackgroundWorker {
public <init>(android.content.Context, android.net.Uri);
}

17
protos/Android.bp Normal file
View File

@@ -0,0 +1,17 @@
java_library_static {
name: "settings-contextual-card-protos-lite",
host_supported: true,
proto: {
type: "lite",
},
srcs: ["contextual_card_list.proto"],
}
java_library_static {
name: "settings-log-bridge-protos-lite",
host_supported: true,
proto: {
type: "lite",
},
srcs: ["settings_log_bridge.proto"],
}

View File

@@ -0,0 +1,33 @@
syntax = "proto2";
package com.android.settings.intelligence;
option java_outer_classname = "ContextualCardProto";
message ContextualCardList {
repeated ContextualCard card = 1;
}
message ContextualCard {
/**
* The category of a card: this is a hint for how a card should be collected,
* ranked, and presented
*/
enum Category {
DEFAULT = 0;
SUGGESTION = 1;
POSSIBLE = 2;
IMPORTANT = 3;
DEFERRED_SETUP = 5;
}
/** Slice uri of the contextual card */
optional string sliceUri = 1;
/** Name of the card. It should be identical in every app */
optional string cardName = 3;
optional Category card_category = 4;
optional double card_score = 5;
}

View File

@@ -0,0 +1,37 @@
syntax = "proto2";
package com.android.settings.intelligence;
option java_outer_classname = "LogProto";
message SettingsLog {
/**
* Where this SettingsUIChange event comes from. For example, if
* it's a PAGE_VISIBLE event, where the page is opened from.
*/
optional int32 attribution = 1;
/**
* What the UI action is.
*/
optional int32 action = 2;
/**
* Where the action is happening
*/
optional int32 page_id = 3;
/**
* What preference changed in this event.
*/
optional string changed_preference_key = 4;
/**
* The new value of the changed preference.
*/
optional int32 changed_preference_int_value = 5;
/**
* The timestamp of a log event
*/
optional string timestamp = 6;
}

View File

@@ -0,0 +1,24 @@
<?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
-->
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false"
android:zAdjustment="top">
<alpha android:fromAlpha="0.0" android:toAlpha="1.0"
android:interpolator="@android:interpolator/linear_out_slow_in"
android:duration="350"/>
</set>

View File

@@ -0,0 +1,24 @@
<?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
-->
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false"
android:zAdjustment="top">
<alpha android:fromAlpha="1.0" android:toAlpha="0.0"
android:interpolator="@android:interpolator/linear_out_slow_in"
android:duration="350" />
</set>

View File

@@ -22,7 +22,7 @@
android:duration="300" android:duration="300"
android:propertyName="fillColor" android:propertyName="fillColor"
android:valueFrom="#000000" android:valueFrom="#000000"
android:valueTo="#EA4335" android:valueTo="#4285F4"
android:valueType="intType" android:valueType="intType"
android:interpolator="@android:interpolator/linear_out_slow_in" /> android:interpolator="@android:interpolator/linear_out_slow_in" />
<objectAnimator <objectAnimator
@@ -37,7 +37,7 @@
<objectAnimator <objectAnimator
android:duration="300" android:duration="300"
android:propertyName="fillColor" android:propertyName="fillColor"
android:valueFrom="#EA4335" android:valueFrom="#4285F4"
android:valueTo="#000000" android:valueTo="#000000"
android:valueType="intType" android:valueType="intType"
android:interpolator="@android:interpolator/fast_out_slow_in" /> android:interpolator="@android:interpolator/fast_out_slow_in" />

View File

@@ -22,7 +22,7 @@
android:duration="300" android:duration="300"
android:propertyName="fillColor" android:propertyName="fillColor"
android:valueFrom="#000000" android:valueFrom="#000000"
android:valueTo="#FBBC04" android:valueTo="#4285F4"
android:valueType="intType" android:valueType="intType"
android:interpolator="@android:interpolator/linear_out_slow_in" /> android:interpolator="@android:interpolator/linear_out_slow_in" />
<objectAnimator <objectAnimator
@@ -37,7 +37,7 @@
<objectAnimator <objectAnimator
android:duration="300" android:duration="300"
android:propertyName="fillColor" android:propertyName="fillColor"
android:valueFrom="#FBBC04" android:valueFrom="#4285F4"
android:valueTo="#000000" android:valueTo="#000000"
android:valueType="intType" android:valueType="intType"
android:interpolator="@android:interpolator/fast_out_slow_in" /> android:interpolator="@android:interpolator/fast_out_slow_in" />

View File

@@ -22,7 +22,7 @@
android:duration="300" android:duration="300"
android:propertyName="fillColor" android:propertyName="fillColor"
android:valueFrom="#000000" android:valueFrom="#000000"
android:valueTo="#34A853" android:valueTo="#4285F4"
android:valueType="intType" android:valueType="intType"
android:interpolator="@android:interpolator/linear_out_slow_in" /> android:interpolator="@android:interpolator/linear_out_slow_in" />
<objectAnimator <objectAnimator
@@ -37,7 +37,7 @@
<objectAnimator <objectAnimator
android:duration="300" android:duration="300"
android:propertyName="fillColor" android:propertyName="fillColor"
android:valueFrom="#34A853" android:valueFrom="#4285F4"
android:valueTo="#000000" android:valueTo="#000000"
android:valueType="intType" android:valueType="intType"
android:interpolator="@android:interpolator/fast_out_slow_in" /> android:interpolator="@android:interpolator/fast_out_slow_in" />

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.
-->
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="500">
<!-- Fade in: alpha from 0 to 100% -->
<alpha
android:fromAlpha="0"
android:toAlpha="1"
android:interpolator="@android:anim/decelerate_interpolator"/>
</set>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
Copyright (C) 2017 The Android Open Source Project Copyright (C) 2018 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@@ -15,6 +15,8 @@
limitations under the License. limitations under the License.
--> -->
<PreferenceScreen <layoutAnimation
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/home_app" /> android:animation="@anim/item_animation_fade_in"
android:delay="15%"
android:animationOrder="normal"/>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 The Android Open Source Project <!--
Copyright (C) 2018 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@@ -15,9 +16,10 @@
--> -->
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
<item android:state_pressed="true" android:state_checked="true"
android:drawable="@drawable/appwidget_item_bg_pressed" /> android:color="?android:attr/colorAccent" />
<item
<item android:drawable="@drawable/appwidget_item_bg_normal" /> android:state_checked="false"
</selector> android:color="?android:attr/textColorPrimary" />
</selector>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
Copyright (C) 2018 The Android Open Source Project Copyright (C) 2019 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--> -->
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="#FFFFFF" /> <item android:alpha="0.14"
android:color="?android:attr/colorForeground"/>
</selector> </selector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 881 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 986 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 836 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1016 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

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