Commit Graph

10113 Commits

Author SHA1 Message Date
Lucas Dupin
c81702eb62 Reach gesture implementation
Add configurable doze gesture. OEMs should define the gesture type
on a device overlay.

Bug: 111414690
Test: look at logs in adb shell dumpsys activity service com.android.systemui
Test: manual with alternative sensor event
Change-Id: I048b99b53151427006e42eb6b4780a420020cd78
2018-08-16 11:59:29 -07:00
Riddle Hsu
a4d6fa229c Get gravity of menu panel by display
Also:
 - Reorganize import of DisplayContent and PhoneWindow.
 - Fix DisplayContent leakage in wm test.
   (SurfaceFlinger abort in createLayer -> addClientLayer with
    "Suspected IGBP leak: 4097 IGBPs (4096 max)")

Bug: b/111362047
Test: atest FrameworksServicesTests:DisplayContentTests# \
      testGetPreferredOptionsPanelGravityFromDifferentDisplays

Change-Id: I9c5a0f59a86fda08bd532cb2b66bab76b2dfa6c8
2018-08-15 20:51:57 +08:00
Andrew Lehmer
d42decc7af Merge "Double tap and lift should take to lock screen" 2018-08-13 15:54:27 +00:00
Lucas Dupin
4359b559f2 Double tap and lift should take to lock screen
The current ambient display design doesn't make sense when the
display is not 'always on', let's wake-up directly to the lock
screen instead.

Change-Id: I217720dcf01a507f43e9da6e1970b2246fb75211
Test: double tap from AOD or screen off
Test: lift from AOD or screen off
Test: receive pulsing notification, long press
Fixes: 73148491
Fixes: 111881300
Bug: 111414690
2018-08-10 14:05:02 -07:00
Dianne Hackborn
eaed0ba69f Flesh out procstats protobufs to have ALL THE INFO!
This involved re-arranging some of the protobuf structs.
What is there now is kind-of awkward, but I didn't want to go
through and just completely change the whole thing.

Bug: 110957691
Test: atest CtsStatsdHostTestCases:ProcStatsValidationTests
Change-Id: I1d59c15c4d0f3dbdea2cf71307debfcafed7938a
2018-08-10 09:28:12 -07:00
Makoto Onuki
7388dd5419 Merge "Add a hidden API for fgetfilecon(3)" am: 9b04b2fd0b am: c5d7fdef72 am: 39ddb130ec
am: 09663b4ada

Change-Id: I88f58139f5539b2f46256f1f522ad3d05ce47b93
2018-08-08 17:19:13 -07:00
Hugo Benichi
f5f5457232 Merge "VPN: Implement toString for VpnConfig." am: c874462c2d am: 52f56a2948 am: e4e1ab85d9
am: 6d915c711f

Change-Id: I33281bdf6342d5053ddb9ceff03fbe03c4c6ce16
2018-08-08 17:02:51 -07:00
Remi NGUYEN VAN
2c871f9241 Merge "Add codewiz@, reminv@ to OWNERS for connectivity" am: 76f081be5c am: a96779b592 am: fb9247e38d
am: f76484af05

Change-Id: I1d77e198618d1de05f952ae58abb3b79e66e49e3
2018-08-08 16:44:05 -07:00
Makoto Onuki
09663b4ada Merge "Add a hidden API for fgetfilecon(3)" am: 9b04b2fd0b am: c5d7fdef72
am: 39ddb130ec

Change-Id: Ib33c1e9f57ce727d6ecb1a5f799c0570c6b32208
2018-08-08 13:05:36 -07:00
Hugo Benichi
6d915c711f Merge "VPN: Implement toString for VpnConfig." am: c874462c2d am: 52f56a2948
am: e4e1ab85d9

Change-Id: If9b64dddcfafce5decf6b9de84481e2c1bc1dbab
2018-08-08 12:54:12 -07:00
Remi NGUYEN VAN
f76484af05 Merge "Add codewiz@, reminv@ to OWNERS for connectivity" am: 76f081be5c am: a96779b592
am: fb9247e38d

Change-Id: I755a029d35edb73924dbeccc698901dea533c57d
2018-08-08 12:21:25 -07:00
Makoto Onuki
39ddb130ec Merge "Add a hidden API for fgetfilecon(3)" am: 9b04b2fd0b
am: c5d7fdef72

Change-Id: I7a6876932b3eb8ecf61fa7c9470ae53ed1d8a0ae
2018-08-08 12:18:58 -07:00
Hugo Benichi
e4e1ab85d9 Merge "VPN: Implement toString for VpnConfig." am: c874462c2d
am: 52f56a2948

Change-Id: Ic07276029d19ac42da901183d247fe79a25c139a
2018-08-08 12:08:58 -07:00
Remi NGUYEN VAN
fb9247e38d Merge "Add codewiz@, reminv@ to OWNERS for connectivity" am: 76f081be5c
am: a96779b592

Change-Id: I781053bcceb117f3d83950a5ee477b766bb7e314
2018-08-08 11:57:20 -07:00
Makoto Onuki
9b04b2fd0b Merge "Add a hidden API for fgetfilecon(3)" 2018-08-08 14:51:19 +00:00
Hugo Benichi
c874462c2d Merge "VPN: Implement toString for VpnConfig." 2018-08-08 08:07:47 +00:00
Remi NGUYEN VAN
d2cb322e93 Add codewiz@, reminv@ to OWNERS for connectivity
Test: m
Change-Id: I11df4c93ac61b620fc576a2ff17192b7c9ecb984
2018-08-08 12:22:20 +09:00
TreeHugger Robot
17e78cef39 Merge "Improve binder calls stats sampling." 2018-08-06 22:53:16 +00:00
TreeHugger Robot
35863cda9a Merge "Minor changes on top of memory leak fix ag/4607657" 2018-08-06 22:51:36 +00:00
Makoto Onuki
9700015b36 Add a hidden API for fgetfilecon(3)
Test: manual test with the debug code
Bug: 111381531
Change-Id: Ie9d6fe9e737b852cc825990a83bda6eb95cf1160
2018-08-06 14:31:45 -07:00
Hui Yu
10571e0ce5 Minor changes on top of memory leak fix ag/4607657
Fix: 80443940
Test: "adb shell cmd battery unplug" and "adb shell cmd battery set ac 1",
observe memory usage from Android Monitor.

Change-Id: If095a5a88bf43485f2b1ab6da4cab0c87099b90b
2018-08-06 13:20:55 -07:00
Olivier Gaillard
359e2eef15 Merge "Set default sampling period to 100." 2018-08-06 20:11:42 +00:00
Olivier Gaillard
0d5f50428b Merge "Remove unused imports" 2018-08-06 20:10:48 +00:00
arangelov
8eedb5ad40 Merge "No disclaimer when switching profile for system SMS and dialer apps." into pi-dev am: a7a496f3a1
am: 487ca863a0

Change-Id: I7d5a8a2e2784adc31ae0f366cf81650819228007
2018-08-06 11:00:57 -07:00
arangelov
487ca863a0 Merge "No disclaimer when switching profile for system SMS and dialer apps." into pi-dev
am: a7a496f3a1

Change-Id: I7a14ee395b21c8b6d9c81dc6d13497110bc336b4
2018-08-06 10:44:32 -07:00
Olivier Gaillard
34ad8af018 Improve binder calls stats sampling.
- Decouple detailed tracking and sampling. Detailed tracking now control
which data wwe should track (e.g. exception, max reply size, ...),
sampling controls the % of requests to track
- Do not create a CallStat object just for the sake of tracking the call
count. Most of the keys have a really low call count (60% of keys below
10 call counts, 90% below 100 calls). When data sampling is enabled, we
can save lots of memory.

Test: unit test
Change-Id: If81b38023a76a8b1e07e655f9ecd8a098d401df4
2018-08-06 16:49:26 +01:00
Olivier Gaillard
c0eadf9976 Set default sampling period to 100.
Test: unit test
Change-Id: I23fb6dbb6de75c948c30b71bb93eaab557090424
2018-08-06 16:49:26 +01:00
Olivier Gaillard
94e6fe61c7 Remove unused imports
Test: unit test
Change-Id: I01c4d0001fa76cb79f1c40ce40d9a55e3bd5623a
2018-08-06 16:49:25 +01:00
Hugo Benichi
4d5c5d0ec4 VPN: Implement toString for VpnConfig.
Bug: 69426741
Test: Build, flashed, booted. Checked VpnConfig is printed as expected
in the logs.
Change-Id: I07629fa1df52b405de538953bb30f0fee5cf4fbf
2018-08-07 00:12:29 +09:00
Hui Yu
8e88e955a6 Fix memory leak in TimeBase.mObservers list.
Leaks happen in following places:
1. Not all timer/counter in Uid class are detached from TimeBase when
the Uid object is destructed.
2. When Uid object is removed from mUidStats list in
onUserRemovedLocked, removeUidStatsLocked, readLocked, All
timer/counter in Uid class are not detached from TimeBase.
3. When timer/counter in Uid class is reassigned, the previous
timer/counter object is not detached.

Performance improvement:
The mObservers list in TimeBase object of BatteryStatsImpl can have
size up like 20k, the list type is ArrayList, remove() method on
ArrayList is very slow. For long mObservers list, we change to use
HashSet as container. The mObservers list in TimeBase object of Uid
is short, it continues to use ArrayList as container.

Fix: 80443940
Test: "adb shell cmd battery unplug" and "adb shell cmd battery set ac 1",
observe memory usage from Android Monitor.

Change-Id: I2001ca390a0a86a32082e1012dde4b831f1e7d04
2018-08-03 19:08:37 -07:00
arangelov
64439c1e8c No disclaimer when switching profile for system SMS and dialer apps.
This CL prevents the Toast message from showing when the following
conditions are met:
1. App is system app
2. Intent action is either ACTION_DIAL or ACTION_CALL or if it is
ACTION_SENDTO, only skip if data scheme is one of "sms:", "smsto:",
"mms:" or "mmsto:".

Bug: 111228250
Test: atest FrameworksCoreTests:IntentForwarderActivityTest
Change-Id: Idef71ff2928e9e3d72bad4ba8ff17f9306e91d25
2018-08-02 14:52:30 +01:00
Olivier Gaillard
af17609d6e Merge "Add support for battery/screen state changes." 2018-08-02 08:33:17 +00:00
TreeHugger Robot
bd1056fc2a Merge changes from topic "biometric-prompt"
* changes:
  Refactor FingerprintDialog to be Biometric
  Clean up interface between controller and view
2018-08-02 05:42:34 +00:00
Olivier Gaillard
86714d1347 Add support for battery/screen state changes.
Only collect data when the device is charging to be consistent with what
battery stats is doing.

Add a screen interactive dimension to have more context to analysis the
binder calls data.

Test: unit test
Change-Id: Id31c53ae315d905e5d8e67918f64780f34ff5d72
2018-08-01 21:03:59 +01:00
Kweku Adams
ef0c08fe7e Fixing proto field name style.
Bug: 110957691
Test: Android builds
Change-Id: I9a7dbe3a6522b243cfd1df85eeae22395ff000ae
2018-08-01 11:55:07 -07:00
TreeHugger Robot
60538cce45 Merge "Add tracking of process run time." 2018-08-01 18:38:51 +00:00
Olivier Gaillard
b812229775 Binder calls stats cleanup
Test: unit test
Change-Id: I6e621de1be211cf1e4fbf61aea8447dac83aee8e
2018-08-01 13:57:30 +01:00
Olivier Gaillard
f31dfb94f8 Optimize resolving transaction codes.
Do the heavy work outside of the main lock and only resolve the same
method once.

Test: unit test
Change-Id: I083b3e66d35178311b5ee71443b39efe1112ad55
2018-07-31 22:49:29 +01:00
Dianne Hackborn
99aeba896e Add tracking of process run time.
To help identify processes RAM growth over time, we keep
keep track of the total time the current process has been
running and its RAM use during that time.  Then we can look
at how large processes are based on how long they have been
running for.

See "Cur time" here:

  * com.google.android.inputmethod.latin / u0a124 / v26731214:
      Process com.google.android.inputmethod.latin:train (unique, 6 entries):
        SOff/Norm/(Cch Emty): +1m4s338ms
              Mod/(Cch Emty): +15s977ms
              Low/    Imp Bg: +6s272ms
                     Service: +239ms
                  (Cch Emty): +2s874ms
             Crit/    Imp Bg: +1s52ms
                       TOTAL: +1m30s752ms
        PSS/USS (1 entries):
          SOff/Norm/(Cch Emty): 11MB-11MB-11MB/5.6MB-5.7MB-5.7MB/5.6MB-34MB-62MB over 2
        Cur time +30s214ms: 11MB-11MB-11MB/5.7MB-5.7MB-5.7MB/62MB-62MB-62MB over 1
      Process com.google.android.inputmethod.latin (unique, 6 entries):
        SOff/Norm/    Imp Bg: +2h22m18s830ms
              Mod/    Imp Bg: +15s977ms
              Low/    Imp Bg: +12s98ms
             Crit/    Imp Bg: +32s815ms
         SOn/Norm/    Imp Bg: +53m13s63ms
             Crit/    Imp Bg: +4s170ms
                       TOTAL: +3h16m36s953ms
        PSS/USS (3 entries):
          SOff/Norm/    Imp Bg: 27MB-31MB-34MB/21MB-27MB-30MB/21MB-33MB-88MB over 11
                Mod/    Imp Bg: 25MB-29MB-32MB/19MB-23MB-26MB/19MB-56MB-92MB over 2
           SOn/Norm/    Imp Bg: 34MB-34MB-34MB/30MB-31MB-31MB/30MB-61MB-91MB over 2
        Cur time +2m47s741ms: 27MB-28MB-28MB/21MB-21MB-21MB/21MB-54MB-88MB over 2

Bug: 110957691
Test: manual
Change-Id: I33b291555fd125b3791752cb10de48300bb21706
2018-07-31 14:45:11 -07:00
Olivier Gaillard
1f93a77b5c Resolves transaction codes lazily when a dump is requested.
This change allows to save:
- some memory by removing the method name from CallStat and CallSession
- some CPU by not calling binder.resolveCode for every binder call
at the expense of some hackiness (calling getDefaultTransactionCode
using reflection)

BinderCallsStats#getExportedCallsStats is now more costly to call but it
will be invoked only once a day only.

Test: unit test
Change-Id: Id4f933644c6da9d4aa2d0671db4ab80676eac1b0
2018-07-31 15:18:12 +00:00
Sudheer Shanka
b19b3f1a68 Merge "Pass the packageName to zygote when starting a new process." 2018-07-31 01:02:17 +00:00
Sudheer Shanka
154fe3f6a7 Pass the packageName to zygote when starting a new process.
This packageName is passed so that the process initialization
after the zygote fork can mount appropriate package sandbox.

Bug: 111890351
Test: n/a
Change-Id: I99d6c1b53fffd53d7387dc807106efe5e1dc9b07
2018-07-30 14:44:26 -07:00
Olivier Gaillard
7a2a98bb7f Store the runtime class instead of the class name.
This will be used by a follow up CL to call getTransactionCode lazily
instead of doing it during the binder call.

Test: unit tests
Change-Id: I11a997bb8a6268871daf4145a962886b43195c89
2018-07-30 17:59:30 +00:00
Olivier Gaillard
5536929078 Merge "Move a few method calls outside the BinderCallsStats lock." 2018-07-30 17:59:07 +00:00
Olivier Gaillard
8a760b9143 Move a few method calls outside the BinderCallsStats lock.
getThreadTimeMicro can take a few microseconds.

Change-Id: I3dc451ded2bde147c1b9061552210d499ec7d0e3
Test: unit tests
2018-07-30 11:19:49 +01:00
Jeff Sharkey
3ea5588f7c Merge "Support for appending "standalone" WHERE chunks." 2018-07-27 23:21:53 +00:00
TreeHugger Robot
ac70654f9d Merge "Procstats: keep track of per-proc state active time" 2018-07-27 21:26:41 +00:00
Jeff Sharkey
b89df9eac8 Support for appending "standalone" WHERE chunks.
The existing appendWhere() methods aren't very friendly for
developers, since they require manual tracking of state to decide if
subsequent standalone chunks should be prefixed with "AND".

While it's tempting to offer direct argument binding on the builder
class, we can't really deliver on that API in a secure way, so instead
add separate bindSelection() method which explicitly burns arguments
into a standalone selection string, which can then be appended to
the builder.

This was the last piece of new functionality being used by
SQLiteStatementBuilder, so we can delete that class and migrate
users back to SQLiteQueryBuilder.

Bug: 111268862
Test: atest frameworks/base/core/tests/coretests/src/android/database/DatabaseUtilsTest.java
Test: atest frameworks/base/core/tests/utiltests/src/com/android/internal/util/ArrayUtilsTest.java
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Test: atest cts/tests/tests/database/src/android/database/sqlite/cts/SQLiteQueryBuilderTest.java
Change-Id: I418f24338c90bae8a9dad473fa76329cea00a8c5
2018-07-27 13:45:51 -06:00
Sudheer Shanka
352a72ca09 Merge "Don't track per process state cpu times by default." 2018-07-27 17:21:41 +00:00
Olivier Gaillard
dd9e03a151 Merge "Disable collecting binder call stats by default." 2018-07-26 12:37:58 +00:00