Commit Graph

93192 Commits

Author SHA1 Message Date
Seigo Nonaka
73146e7ceb Remove unused line in PrecomputedText
Bug: N/A
Test: N/A
Change-Id: I2456116657d8be893a8c477df14a5de490fbaa37
2018-07-16 18:09:32 -07:00
TreeHugger Robot
9c52638f19 Merge "Let LocaleInfo implements Serializable" 2018-07-16 19:04:30 +00:00
Jeff Sharkey
c43acd30c2 Merge "GROUP BY and HAVING aren't ready to be strict." 2018-07-16 16:49:12 +00:00
Jeff Sharkey
bba22006d6 GROUP BY and HAVING aren't ready to be strict.
Despite SQLite documentation saying these clauses follow the "expr"
syntax, queries will fail with obscure "row value misused" errors,
so remove the strict enforcement for now.

Test: manual
Bug: 111480817
Change-Id: Ib8cdcb4e6456110589203189fcfa14e75cd68718
2018-07-16 10:44:15 -06:00
Derek Sollenberger
b6c4f6cda9 Merge "TextView setOverlappingRendering must be true when shadows are used." 2018-07-16 15:49:42 +00:00
Neil Fuller
b1d24c0ace Merge "Avoid use of DateUtilsBridge.icuTimeZone()" am: e859c42e23 am: 25fd54f6f3
am: 3208539011

Change-Id: Ib45c4fd371c9b4b4ab97973eddfd49101c353cc3
2018-07-16 02:09:18 -07:00
Neil Fuller
3208539011 Merge "Avoid use of DateUtilsBridge.icuTimeZone()" am: e859c42e23
am: 25fd54f6f3

Change-Id: I0083ddcadbc391a26ae8d264f8626bdf3b8f988f
2018-07-16 01:58:14 -07:00
Neil Fuller
25fd54f6f3 Merge "Avoid use of DateUtilsBridge.icuTimeZone()"
am: e859c42e23

Change-Id: I6b6452f9609d88ce61959e7c4ae4f0fd8fa97e64
2018-07-16 01:50:04 -07:00
Jeff Sharkey
162d771709 Merge "Extend SQLiteQueryBuilder for update and delete." 2018-07-14 21:35:29 +00:00
TreeHugger Robot
8abf777389 Merge "Better Handling of Battery Stats History Overflow" 2018-07-14 03:07:29 +00:00
TreeHugger Robot
672dbd5b3a Merge "Make ENABLE_COPY_OPTIMIZATIONS non final." 2018-07-14 02:08:40 +00:00
Hui Yu
0ed84f1263 Better Handling of Battery Stats History Overflow
Previously battery history is kept in the in-memory mHistoryBuffer
with size of 512KB (96KB on low memory device). When the buffer is
close to full we drop certain types of history. When the buffer is
full the whole buffer is reset and we lost elder history. On a
device with long battery life this problem is more frequent.

This CL changes mHistoryBuffer to 128KB (64KB on low memory device).
When the buffer is full, it is saved to history file on file system.
By default we allow 32 history files (64 history files on low-memory
device) which gives us 4MB history (compare to 512KB today).

The MAX_HISTORY_BUFFER and MAX_HISTORY_FILES can be remote configured
through GServices or P/H.

In case of history exceeding 4MB, the oldest history file is deleted
and new history file is open.

This change increases battery history by using disk file and the
chance of losing history is greatly reduced.

Bug: 67297625
Test: adb shell dumpsys batterystats --history
Change-Id: Id9aafea761649d7323b97d1e44135f7880a95414
2018-07-13 17:31:19 -07:00
Jorim Jaggi
5439a6ea84 Merge "Pin compiled code of HOME app" into pi-dev
am: 0e5e46f874

Change-Id: I205971bc6c8309fc4ad40b4a4677703adecf4a75
2018-07-13 17:13:14 -07:00
Jeff Sharkey
6adc98c09c Extend SQLiteQueryBuilder for update and delete.
Developers often accept selection clauses from untrusted code, and
SQLiteQueryBuilder already supports a "strict" mode to help catch
SQL injection attacks.  This change extends the builder to support
update() and delete() calls, so that we can help secure those
selection clauses too.

Extend it to support selection arguments being provided when
appending appendWhere() clauses, meaning developers no longer need
to manually track their local selection arguments along with
remote arguments.

Extend it to support newer ContentProvider.query() variant that
accepts "Bundle queryArgs", and have all query() callers flow
through that common code path.  (This paves the way for a future
CL that will offer to gracefully extract non-WHERE clauses that
callers have tried smashing into their selections.)

Updates ContentValues to internally use more efficient ArrayMap.

Bug: 111268862
Test: atest frameworks/base/core/tests/utiltests/src/com/android/internal/util/ArrayUtilsTest.java
Test: atest cts/tests/tests/database/src/android/database/sqlite/cts/SQLiteQueryBuilderTest.java
Change-Id: I60b6f69045766bb28d2f21a32c120ec8c383b917
2018-07-13 18:11:37 -06:00
Jorim Jaggi
0e5e46f874 Merge "Pin compiled code of HOME app" into pi-dev 2018-07-13 22:36:08 +00:00
Shrijana Ghimire
8e63b746ba Merge "Merge "docs: Fixed typos in AdapterView Javadoc." into pi-dev am: 9ef41ccf42" into pi-dev-plus-aosp
am: 74ecab8a44

Change-Id: I676fa766b26ecfc145ed4d5dd60b1af70dc99529
2018-07-13 12:48:15 -07:00
Shrijana Ghimire
a58f9d550d Merge "docs: Fixed typos in AdapterView Javadoc." into pi-dev
am: 9ef41ccf42

Change-Id: I03291b3758127de3bfef480a6561930f5901014c
2018-07-13 12:29:55 -07:00
Shrijana Ghimire
9ef41ccf42 Merge "docs: Fixed typos in AdapterView Javadoc." into pi-dev 2018-07-13 19:03:24 +00:00
Neil Fuller
6d5c4a8d8d Avoid use of DateUtilsBridge.icuTimeZone()
DateUtilsBridge is only used in one place in framework.
The usage is avoidable by sticking to java.util. This
decreases the number of non-public libcore classes in
use by framework.

Test: build
Bug: 111055375
Change-Id: Ifd6576b5b6df1e154f16ec201a4575d0b95de66d
2018-07-13 19:54:29 +01:00
Derek Sollenberger
d4ca6d1c7a TextView setOverlappingRendering must be true when shadows are used.
The updates to the HWUI renderer now require that setOverlappingRendering be
set when shadows are used.  Without this change modifying the alpha of the
TextView will produce incorrect blending results.

Bug: 111381525
Test: Test app in bug
Change-Id: I523c5ef698e8db912dd2ef848eeeffb3465b990a
2018-07-13 12:02:53 -04:00
TreeHugger Robot
141d67c3a7 Merge "Pin compiled code of HOME app" 2018-07-13 15:47:19 +00:00
Julia Reynolds
b992c34510 Merge "Add notification settings to backup&restore" 2018-07-13 14:17:07 +00:00
Jorim Jaggi
7119800f4b Pin compiled code of HOME app
Keeping the code in memory of the currently set home app is
important for latency as we don't have any kind of starting
window/splash screen when pressing the home app to hide any latency.

Memory impact:

Pinning dex/vdex:

In practical scenarios, this should be < 500kb.
The home app is usually profile-speed compiled, for which the
resulting dex/vdex files are about 2 mb. However, during regular
use, at least 1.5 MB of it is referenced in memory. This makes
sense: By definition profile-speed only compiles the things that
is usually frequently executed during regular execution.

Pinning apk:
With Launcher 3 in practical scenarios this should be about 3.7 MB,
as the APK is about 5.7 MB but 2 MB are usually referenced in any
case.

Bug: 111132016
Bug: 78585335
Test: Inspect "adb shell dumpsys pinner" after boot.
Test: Check for pinned files after updating camera/home.
Test: Check for pinned files after user switch with different
default apps.
Test: Check for pinned files after bg-dexopt.
Test: Check for pinned files after bg-dexopt + kill pid.

Change-Id: I6cdbc06d089efeb1c72a51216879ba0573502009
Merged-In: I6cdbc06d089efeb1c72a51216879ba0573502009
2018-07-13 13:20:48 +00:00
Jorim Jaggi
402d78ebb7 Pin compiled code of HOME app
Keeping the code in memory of the currently set home app is
important for latency as we don't have any kind of starting
window/splash screen when pressing the home app to hide any latency.

Memory impact:

Pinning dex/vdex:

In practical scenarios, this should be < 500kb.
The home app is usually profile-speed compiled, for which the
resulting dex/vdex files are about 2 mb. However, during regular
use, at least 1.5 MB of it is referenced in memory. This makes
sense: By definition profile-speed only compiles the things that
is usually frequently executed during regular execution.

Pinning apk:
With Launcher 3 in practical scenarios this should be about 3.7 MB,
as the APK is about 5.7 MB but 2 MB are usually referenced in any
case.

Bug: 111132016
Bug: 78585335
Test: Inspect "adb shell dumpsys pinner" after boot.
Test: Check for pinned files after updating camera/home.
Test: Check for pinned files after user switch with different
default apps.
Test: Check for pinned files after bg-dexopt.
Test: Check for pinned files after bg-dexopt + kill pid.

Change-Id: I6cdbc06d089efeb1c72a51216879ba0573502009
2018-07-13 15:16:48 +02:00
tmfang
b2c5ac86ee Let LocaleInfo implements Serializable
Settings need LocaleInfo can be serializabled.
So, it can be passed by Intent.

Bug: 111373939
Test: manual test
Change-Id: Ie42c99583688be6fdcec5dd12b105bee90b2577e
2018-07-13 18:14:12 +08:00
TreeHugger Robot
f97fa4d77b Merge "Skip execution of transactions on a destroyed activity" 2018-07-13 03:38:16 +00:00
Lucas Dupin
401ea1647a Merge "Dark Notification Shade" 2018-07-13 02:09:31 +00:00
TreeHugger Robot
af93684515 Merge "Fix a few issues with procstats associations:" 2018-07-13 00:56:29 +00:00
Lucas Dupin
f03e752407 Dark Notification Shade
Test: adb shell service call uimode 4 i32 1 # day
Test: adb shell service call uimode 4 i32 2 # night
Bug: 110758454
Change-Id: Ib6fce91d1aeff7e1fbfe8a7a528095487fbdb3f8
2018-07-12 17:30:34 -07:00
Dianne Hackborn
2fd8ce4933 Fix a few issues with procstats associations:
- Use the correct state when comparing the association
  with the process.  (Was causing warning spam as well.)

- Don't wtf if we call startAssociationIfNeeded() no a
  ServiceRecord that doesn't have a process...  that is normal
  when first bringing up a service.

Also add a switch to turn this all off, which for now is
leaving it on.

Test: manual
Bug: 111391911
Bug: 111302807
Bug: 111131998

Change-Id: I2d3f43fd99c7ade24c867ad80a728d898ab0e6c5
2018-07-12 15:45:48 -07:00
Jorim Jaggi
bdc73423c6 Merge "DO NOT MERGE Remove WTF spam" into pi-dev
am: 650ead619e

Change-Id: I6d4300530516c25a5eb9af8ea8f924591eff3b95
2018-07-12 15:09:20 -07:00
Tomasz Wasilczyk
5f6ba52f59 Export BandDescriptor for AIDL.
Bug: 73950974
Test: it builds
Change-Id: I96321c24c96a848ab01cca47f563d70e4ff99b89
2018-07-12 21:51:01 +00:00
Jorim Jaggi
650ead619e Merge "DO NOT MERGE Remove WTF spam" into pi-dev 2018-07-12 21:32:53 +00:00
TreeHugger Robot
aa29832a8b Merge "Make IAutofillManager fully oneway." 2018-07-12 20:31:25 +00:00
TreeHugger Robot
a741f5dca4 Merge "Depecrate flags, and try to match them to actions" 2018-07-12 19:34:40 +00:00
Neil Fuller
a57acd367c Merge "Move XML object factory logic to libcore" am: 8176fb99e1
am: 7add22db60

Change-Id: If395891203fae0a8b55f8f58430adc979b758db2
2018-07-12 11:42:14 -07:00
Neil Fuller
7add22db60 Merge "Move XML object factory logic to libcore"
am: 8176fb99e1

Change-Id: Ib0940ecb89eaf11841bbd66cdaf1c5379466496c
2018-07-12 11:26:03 -07:00
Donghui Han
ebc6cb38a0 Merge "camera2: Treat face detect mode larger than FULL as FULL" into pi-dev am: 2fca393cc1
am: d05d630060

Change-Id: I3947264d88d0c558f8c7fb5ee22160af934e411e
2018-07-12 11:19:07 -07:00
Donghui Han
d05d630060 Merge "camera2: Treat face detect mode larger than FULL as FULL" into pi-dev
am: 2fca393cc1

Change-Id: I77b6b8e6d469a9e28478ddd7975f9c065caef20b
2018-07-12 10:47:53 -07:00
Felipe Leme
d4e52285ed Make IAutofillManager fully oneway.
The critical methods on this interface - like updateSession() - were already
void, so all we had to do were to "onewaywize" the other methods. We could
either refactor them to be truly async, or implement a blocking mechanism that
let them still be sync *and* oneway - because these methods are not in the
critical path, we opted for the latter, which is simpler and less risky.

Fixes: 73536867

Test: mmma -j ./frameworks/base/apct-tests/perftests/autofill/ && \
      adb install -r $OUT/data/app/AutofillPerfTests/AutofillPerfTests.apk && \
      adb shell am instrument -w -e class android.view.autofill.LoginTest \
      com.android.perftests.autofill/android.support.test.runner.AndroidJUnitRunner
Test: CtsAutoFillServiceTestCases

Change-Id: I380430aa2a7805aed6f629afb360566fc5402abb
2018-07-12 10:37:05 -07:00
Brett Chabot
968a5322b9 Make ENABLE_COPY_OPTIMIZATIONS non final.
Test: make -j56 Run_robolectric_robolectric_tests
Change-Id: I6ef235fef5a2daf55fab059b4d1b3a9afce09c8d
2018-07-12 10:33:43 -07:00
Donghui Han
2fca393cc1 Merge "camera2: Treat face detect mode larger than FULL as FULL" into pi-dev 2018-07-12 17:19:36 +00:00
Julia Reynolds
afc94d724c Add notification settings to backup&restore
Change-Id: I421c7487955ee339f88e3957c973375d0f87e2ff
Fixes: 35655737
Test: presubmit unit tests
2018-07-12 12:41:34 -04:00
Treehugger Robot
8176fb99e1 Merge "Move XML object factory logic to libcore" 2018-07-12 13:46:56 +00:00
Jorim Jaggi
511ac80149 DO NOT MERGE Remove WTF spam
Root cause has been identified, but fix is too risky. Instead, we
remove the WTF for now and readd the fix as well as the WTF
in master.

Note that due to defensive programming, in case we land in the WTF
case, it doesn't cause any real bug.

Test: boots
Bug: 110834518
Change-Id: I0da1e48e420c3fcde0e818b7fe0527da9155a159
2018-07-12 12:01:48 +00:00
TreeHugger Robot
f8585dcb50 Merge "Move XML object factory logic to libcore" 2018-07-12 11:20:37 +00:00
Riddle Hsu
d3062cbf41 Skip execution of transactions on a destroyed activity
An Activity may not yet create on client side, there is another
launch request with flags to clear task, then a destroy transaction
is scheduled. If client side keeps blocking until destroy timeout,
the token on server side will be removed. When client begins to
handle the first creation, it will report its activity token to
server that causes IllegalArgumentException because there is no
matched ActivityRecord.

Bug: 32375307
Test: atest FrameworksCoreTests:TransactionExecutorTests
Change-Id: I1b7e0c2863b13091c3fd50df602ff31ae02ff38d
2018-07-12 11:54:47 +08:00
TreeHugger Robot
daf0e11ca5 Merge "Make sure checking for accessibility pane is consistent" 2018-07-12 02:33:30 +00:00
Jeff Sharkey
b5a3117fe9 Merge "Utility methods useful for working with files." 2018-07-12 01:19:39 +00:00
Arthur Ishiguro
78c1e790b3 [automerger] Resolve inconsistent parcel read in NanoAppFilter am: abe5a73a4a am: 2895b320b4 am: 77e6e34644 am: 49e97ea1dc am: c2cfe453f2 am: cab2fa779e am: bf8733b162 am: e9b67d2b22 am: 267b960dab
am: b9912a254a

Change-Id: Ic85c323a3b706808616e1cf9d3e30a95ca2c37f6
2018-07-11 15:44:51 -07:00