Skip to content

Commit e5f8199

Browse files
author
The-DarkBeast
committed
Merge tag 'android-8.1.0_r20' into HEAD
Android 8.1.0 release 20
2 parents 8eb05e7 + 65ff524 commit e5f8199

File tree

32 files changed

+355
-51
lines changed

32 files changed

+355
-51
lines changed

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
@@ -814,7 +814,13 @@ const char* ResStringPool::string8At(size_t idx, size_t* outLen) const
814814
*outLen = encLen;
815815

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

packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,18 +1687,9 @@ private Set<String> getOverlayInstantAppAccessibleSettings(int settingsType) {
16871687
}
16881688

16891689
private List<String> getSettingsNamesLocked(int settingsType, int userId) {
1690-
boolean instantApp;
1691-
if (UserHandle.getAppId(Binder.getCallingUid()) < Process.FIRST_APPLICATION_UID) {
1692-
instantApp = false;
1693-
} else {
1694-
ApplicationInfo ai = getCallingApplicationInfoOrThrow();
1695-
instantApp = ai.isInstantApp();
1696-
}
1697-
if (instantApp) {
1698-
return new ArrayList<String>(getInstantAppAccessibleSettings(settingsType));
1699-
} else {
1700-
return mSettingsRegistry.getSettingsNamesLocked(settingsType, userId);
1701-
}
1690+
// Don't enforce the instant app whitelist for now -- its too prone to unintended breakage
1691+
// in the current form.
1692+
return mSettingsRegistry.getSettingsNamesLocked(settingsType, userId);
17021693
}
17031694

17041695
private void enforceSettingReadable(String settingName, int settingsType, int userId) {
@@ -1711,8 +1702,10 @@ private void enforceSettingReadable(String settingName, int settingsType, int us
17111702
}
17121703
if (!getInstantAppAccessibleSettings(settingsType).contains(settingName)
17131704
&& !getOverlayInstantAppAccessibleSettings(settingsType).contains(settingName)) {
1714-
throw new SecurityException("Setting " + settingName + " is not accessible from"
1715-
+ " ephemeral package " + getCallingPackage());
1705+
// Don't enforce the instant app whitelist for now -- its too prone to unintended
1706+
// breakage in the current form.
1707+
Slog.w(LOG_TAG, "Instant App " + ai.packageName
1708+
+ " trying to access unexposed setting, this will be an error in the future.");
17161709
}
17171710
}
17181711

0 commit comments

Comments
 (0)