Skip to content

Commit 2963cd4

Browse files
author
android-build-team Robot
committed
Merge cherrypicks of [3581037, 3581038, 3580473, 3580624, 3580656, 3580657, 3580658, 3580382, 3580474, 3580475, 3581039, 3581040, 3580476, 3580206, 3581527, 3580955, 3580956, 3580957, 3580958, 3580959, 3580960, 3580961, 3580962, 3580963, 3580964, 3580965, 3580966, 3581567, 3581568, 3581569, 3581570, 3581571, 3580625, 3580626, 3581587, 3581513, 3581514, 3581515, 3580477, 3581588, 3580659, 3580660, 3580383, 3580384, 3580478, 3580719, 3580479, 3580480, 3581385, 3581528, 3581041, 3581042, 3581043, 3581044, 3581045, 3581046, 3581607, 3580385, 3580481, 3580482, 3580483, 3580661, 3580662, 3580663, 3580664, 3580665, 3580484, 3580485, 3581608, 3581609, 3581610, 3581611, 3581612, 3581589, 3581613, 3580486, 3581519, 3581627, 3581628, 3581529, 3581530, 3581531, 3581629, 3581630] into oc-mr1-release
Change-Id: I107552246742f7f284efd431d810a44d97a223b1
2 parents 68505b3 + 5a3d270 commit 2963cd4

29 files changed

Lines changed: 317 additions & 36 deletions

File tree

core/java/android/bluetooth/le/PeriodicAdvertisingReport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ private PeriodicAdvertisingReport(Parcel in) {
7171
@Override
7272
public void writeToParcel(Parcel dest, int flags) {
7373
dest.writeInt(syncHandle);
74-
dest.writeLong(txPower);
74+
dest.writeInt(txPower);
7575
dest.writeInt(rssi);
7676
dest.writeInt(dataStatus);
7777
if (data != null) {

core/java/android/hardware/camera2/params/OutputConfiguration.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ public OutputConfiguration(@NonNull OutputConfiguration other) {
409409
this.mConfiguredSize = other.mConfiguredSize;
410410
this.mConfiguredGenerationId = other.mConfiguredGenerationId;
411411
this.mIsDeferredConfig = other.mIsDeferredConfig;
412+
this.mIsShared = other.mIsShared;
412413
}
413414

414415
/**
@@ -421,6 +422,7 @@ private OutputConfiguration(@NonNull Parcel source) {
421422
int width = source.readInt();
422423
int height = source.readInt();
423424
boolean isDeferred = source.readInt() == 1;
425+
boolean isShared = source.readInt() == 1;
424426
ArrayList<Surface> surfaces = new ArrayList<Surface>();
425427
source.readTypedList(surfaces, Surface.CREATOR);
426428

@@ -431,6 +433,7 @@ private OutputConfiguration(@NonNull Parcel source) {
431433
mSurfaces = surfaces;
432434
mConfiguredSize = new Size(width, height);
433435
mIsDeferredConfig = isDeferred;
436+
mIsShared = isShared;
434437
mSurfaces = surfaces;
435438
if (mSurfaces.size() > 0) {
436439
mSurfaceType = SURFACE_TYPE_UNKNOWN;

core/java/android/net/Uri.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,10 @@ static String parseAuthority(String uriString, int ssi) {
720720
LOOP: while (end < length) {
721721
switch (uriString.charAt(end)) {
722722
case '/': // Start of path
723+
case '\\':// Start of path
724+
// Per http://url.spec.whatwg.org/#host-state, the \ character
725+
// is treated as if it were a / character when encountered in a
726+
// host
723727
case '?': // Start of query
724728
case '#': // Start of fragment
725729
break LOOP;
@@ -758,6 +762,10 @@ static String parsePath(String uriString, int ssi) {
758762
case '#': // Start of fragment
759763
return ""; // Empty path.
760764
case '/': // Start of path!
765+
case '\\':// Start of path!
766+
// Per http://url.spec.whatwg.org/#host-state, the \ character
767+
// is treated as if it were a / character when encountered in a
768+
// host
761769
break LOOP;
762770
}
763771
pathStart++;

core/java/android/provider/CallLog.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,12 @@ public static class Calls implements BaseColumns {
223223
/** Call was WIFI call. */
224224
public static final int FEATURES_WIFI = 0x8;
225225

226+
/**
227+
* Indicates the call underwent Assisted Dialing.
228+
* @hide
229+
*/
230+
public static final Integer FEATURES_ASSISTED_DIALING_USED = 0x10;
231+
226232
/**
227233
* The phone number as the user entered it.
228234
* <P>Type: TEXT</P>

core/java/com/android/internal/colorextraction/types/Tonal.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@ public class Tonal implements ExtractionType {
5151

5252
private static final boolean DEBUG = true;
5353

54+
public static final int THRESHOLD_COLOR_LIGHT = 0xffe0e0e0;
5455
public static final int MAIN_COLOR_LIGHT = 0xffe0e0e0;
5556
public static final int SECONDARY_COLOR_LIGHT = 0xff9e9e9e;
56-
public static final int MAIN_COLOR_DARK = 0xff212121;
57+
public static final int THRESHOLD_COLOR_DARK = 0xff212121;
58+
public static final int MAIN_COLOR_DARK = 0xff000000;
5759
public static final int SECONDARY_COLOR_DARK = 0xff000000;
5860

5961
private final TonalPalette mGreyPalette;
@@ -197,12 +199,12 @@ private boolean runTonalExtraction(@Nullable WallpaperColors inWallpaperColors,
197199
// light fallback or darker than our dark fallback.
198200
ColorUtils.colorToHSL(mainColor, mTmpHSL);
199201
final float mainLuminosity = mTmpHSL[2];
200-
ColorUtils.colorToHSL(MAIN_COLOR_LIGHT, mTmpHSL);
202+
ColorUtils.colorToHSL(THRESHOLD_COLOR_LIGHT, mTmpHSL);
201203
final float lightLuminosity = mTmpHSL[2];
202204
if (mainLuminosity > lightLuminosity) {
203205
return false;
204206
}
205-
ColorUtils.colorToHSL(MAIN_COLOR_DARK, mTmpHSL);
207+
ColorUtils.colorToHSL(THRESHOLD_COLOR_DARK, mTmpHSL);
206208
final float darkLuminosity = mTmpHSL[2];
207209
if (mainLuminosity < darkLuminosity) {
208210
return false;

core/java/com/android/internal/widget/VerifyCredentialResponse.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ public void writeToParcel(Parcel dest, int flags) {
9898
if (mPayload != null) {
9999
dest.writeInt(mPayload.length);
100100
dest.writeByteArray(mPayload);
101+
} else {
102+
dest.writeInt(0);
101103
}
102104
}
103105
}

core/proto/android/service/diskstats.proto

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ message DiskStatsServiceDumpProto {
4747
}
4848

4949
message DiskStatsCachedValuesProto {
50-
// Total app data size, in kilobytes
50+
// Total app code size, in kilobytes
5151
int64 agg_apps_size = 1;
5252
// Total app cache size, in kilobytes
5353
int64 agg_apps_cache_size = 2;
@@ -65,15 +65,19 @@ message DiskStatsCachedValuesProto {
6565
int64 other_size = 8;
6666
// Sizes of individual packages
6767
repeated DiskStatsAppSizesProto app_sizes = 9;
68+
// Total app data size, in kilobytes
69+
int64 agg_apps_data_size = 10;
6870
}
6971

7072
message DiskStatsAppSizesProto {
7173
// Name of the package
7274
string package_name = 1;
73-
// App's data size in kilobytes
75+
// App's code size in kilobytes
7476
int64 app_size = 2;
7577
// App's cache size in kilobytes
7678
int64 cache_size = 3;
79+
// App's data size in kilobytes
80+
int64 app_data_size = 4;
7781
}
7882

7983
message DiskStatsFreeSpaceProto {

core/tests/coretests/src/android/net/UriTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,12 @@ public void testAuthorityParsing() {
192192
assertEquals("a:a@example.com:a@example2.com", uri.getAuthority());
193193
assertEquals("example2.com", uri.getHost());
194194
assertEquals(-1, uri.getPort());
195+
assertEquals("/path", uri.getPath());
196+
197+
uri = Uri.parse("http://a.foo.com\\.example.com/path");
198+
assertEquals("a.foo.com", uri.getHost());
199+
assertEquals(-1, uri.getPort());
200+
assertEquals("\\.example.com/path", uri.getPath());
195201
}
196202

197203
@SmallTest

libs/androidfw/ResourceTypes.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,13 @@ const char* ResStringPool::string8At(size_t idx, size_t* outLen) const
813813
*outLen = encLen;
814814

815815
if ((uint32_t)(str+encLen-strings) < mStringPoolSize) {
816-
return (const char*)str;
816+
// Reject malformed (non null-terminated) strings
817+
if (str[encLen] != 0x00) {
818+
ALOGW("Bad string block: string #%d is not null-terminated",
819+
(int)idx);
820+
return NULL;
821+
}
822+
return (const char*)str;
817823
} else {
818824
ALOGW("Bad string block: string #%d extends to %d, past end at %d\n",
819825
(int)idx, (int)(str+encLen-strings), (int)mStringPoolSize);

proto/src/metrics_constants.proto

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4532,7 +4532,8 @@ message MetricsEvent {
45324532
// OS: O MR
45334533
AUTOFILL_SERVICE_DISABLED_SELF = 1135;
45344534

4535-
// Counter showing how long it took (in ms) to show the autofill UI after a field was focused
4535+
// Reports how long it took to show the autofill UI after a field was focused
4536+
// Tag FIELD_AUTOFILL_DURATION: Duration in ms
45364537
// Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
45374538
// Package: Package of the autofill service
45384539
// OS: O MR
@@ -4567,8 +4568,40 @@ message MetricsEvent {
45674568
// OS: O MR
45684569
COLOR_MODE_SETTINGS = 1143;
45694570

4571+
// Enclosing category for group of APP_TRANSITION_FOO events,
4572+
// logged when we cancel an app transition.
4573+
APP_TRANSITION_CANCELLED = 1144;
4574+
4575+
// Tag of a field representing a duration on autofill-related metrics.
4576+
FIELD_AUTOFILL_DURATION = 1145;
4577+
45704578
// ---- End O-MR1 Constants, all O-MR1 constants go above this line ----
45714579

4580+
// ACTION: Stop an app and turn on background check
4581+
// CATEGORY: SETTINGS
4582+
// OS: P
4583+
ACTION_APP_STOP_AND_BACKGROUND_CHECK = 1233;
4584+
4585+
// FIELD: The action type for each anomaly
4586+
// CATEGORY: SETTINGS
4587+
// OS: P
4588+
FIELD_ANOMALY_ACTION_TYPE = 1234;
4589+
4590+
// OPEN: Settings -> Battery -> Wakelock anomaly
4591+
// CATEGORY: SETTINGS
4592+
// OS: P
4593+
ANOMALY_TYPE_WAKELOCK = 1235;
4594+
4595+
// OPEN: Settings -> Battery -> Wakeup alarm anomaly
4596+
// CATEGORY: SETTINGS
4597+
// OS: P
4598+
ANOMALY_TYPE_WAKEUP_ALARM = 1236;
4599+
4600+
// OPEN: Settings -> Battery -> Unoptimized bt anomaly
4601+
// CATEGORY: SETTINGS
4602+
// OS: P
4603+
ANOMALY_TYPE_UNOPTIMIZED_BT = 1237;
4604+
45724605
// Add new aosp constants above this line.
45734606
// END OF AOSP CONSTANTS
45744607
}

0 commit comments

Comments
 (0)