Commit Graph

8821 Commits

Author SHA1 Message Date
Andreas Gampe
df2a7f9f9d Merge "LoggingPrintStream: Make visible for testing" am: 7d1789867b am: dcb8cf8732 am: 0db4c361e3
am: 245ecc9a95

Change-Id: I933617b2bf177c82b69a4908ddeb65074186b52f
2017-10-10 21:38:41 +00:00
Andreas Gampe
245ecc9a95 Merge "LoggingPrintStream: Make visible for testing" am: 7d1789867b am: dcb8cf8732
am: 0db4c361e3

Change-Id: I10e61d65cd05c8d93d43a2fefee841023ec35889
2017-10-10 21:29:12 +00:00
Andreas Gampe
dcb8cf8732 Merge "LoggingPrintStream: Make visible for testing"
am: 7d1789867b

Change-Id: If6e464f6840b66deb6f6c61b0ca96d847444e910
2017-10-10 21:11:10 +00:00
Andreas Gampe
e2456d602f LoggingPrintStream: Make visible for testing
The class must be public to avoid test issues. If the class is
package-private, the test would have to be in the boot class-
path:

 Rejecting re-init on previously-failed class java.lang.Class<com.android.internal.os.LoggingPrintStreamTest$TestPrintStream>: java.lang.IllegalAccessError: Class com.android.internal.os.LoggingPrintStream extended by class com.android.internal.os.LoggingPrintStreamTest$TestPrintStream is inaccessible (declaration of 'com.android.internal.os.LoggingPrintStreamTest$TestPrintStream' appears in /data/app/com.android.frameworks.coretests-SD7GJmYE507ACoE9gu2mnw==/base.apk)
   at java.lang.Object java.lang.reflect.Constructor.newInstance0(java.lang.Object[]) (Constructor.java:-2)
   at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:334)
   at junit.framework.Test junit.framework.TestSuite.createTest(java.lang.Class, java.lang.String) (TestSuite.java:61)

Test: m
Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/os/LoggingPrintStreamTest.java
Change-Id: I26cead7954cf4309c8b3e16994c35a3f4a9eb798
2017-10-10 09:09:26 -07:00
TreeHugger Robot
a3c728e1a2 Merge changes from topic "jr-blocker"
* changes:
  Initial notification blocker
  Provide more information to the noti asst
2017-10-09 18:13:50 +00:00
Julia Reynolds
503ed9404e Provide more information to the noti asst
And pass user sentiment from the assistant to listeners.

Not all of the information the assistant might want is provided
by systemui yet, but the hooks to do so have been added in this CL.

Bug: 63095540
Test: runtest systemui-notification, cts
Change-Id: I8194c065b7895d6013a40320e76eb62caab1263f
2017-10-09 12:36:46 -04:00
Kweku Adams
2f73ecdf52 Adding initial protos for batterystats dump.
Timer is the basic stat tracking object that's used for a lot of the
data in batterystats.
ControllerActivity data is tracked both per uid and for the entire
system, so it makes sense to define it now independently.
For the BatteryStatsHelper change: there's a small window of time after
boot where getSystemService will return null. I ran into it.

BUG: 65750808
Test: flash device and check incident proto output
Change-Id: I15e7d046a43f76d5f53d05b5138ea40f42e19d59
2017-10-06 14:52:26 -07:00
Chalard Jean
6b2fa02346 Merge "Add some useful helpers and constants." am: ed8d236319 am: 0f4421873e am: 06d401ae73
am: bbb7768f4f

Change-Id: I9bebe24f2c65ecaf31b70e02a45e0acd50e1430e
2017-10-06 10:21:43 +00:00
Chalard Jean
bbb7768f4f Merge "Add some useful helpers and constants." am: ed8d236319 am: 0f4421873e
am: 06d401ae73

Change-Id: Iaf611b8e39080d677c9cfe7edb124c11bbdf8a81
2017-10-06 10:11:04 +00:00
Chalard Jean
0f4421873e Merge "Add some useful helpers and constants."
am: ed8d236319

Change-Id: I3a934e19ece91bf5957e4c5fa289bbc1a6242915
2017-10-06 09:48:32 +00:00
Mike Ma
8cb8bdf657 Merge "Add AOD metrics in batterystats" into oc-mr1-dev
am: 6204a60c53

Change-Id: Ife567f987a1585cb1108725db6ad63516a8dc67a
2017-10-06 07:17:25 +00:00
Chalard Jean
e5659bd316 Add some useful helpers and constants.
Test: Pulled out of a client app ; the client app is behaving
Test: identically to how it was behaving before. Wrote unit
Test: tests in frameworks-net.

Change-Id: I397137748a95c65cee2e1e1b243a1a260e83a6f7
2017-10-06 13:38:46 +09:00
TreeHugger Robot
5b0c30fa2d Merge "Catch IO Exception in UsbDevicesParser and don't add failed devices." 2017-10-06 00:51:55 +00:00
Mike Ma
1ce1d3a42c Add AOD metrics in batterystats
Fixes: 64899521
Test: manual - flash build, reset batteryStats, use device > 1 hr
with alternating pattern between screen on/off/AOD. Dump stats, check
all screen related stats look normal, esp. record matches actual time
spent in each screen state. In raw bugreport:
Search "amount discharged" for % discharge;
Search "Screen on/off/doze discharge" for mAh discharge;
Search "time on battery" for up/real time in each state.

Test: Added two unit tests for note AOD screen state

Merged-In: I7193a36751124dd380818b2b665303c0f0d8c984
Change-Id: I51cead7f92abd9e4c620f7dfde393993cdad494e
2017-10-06 00:50:03 +00:00
Mike Ma
94434759e8 Merge "Add AOD metrics in batterystats" 2017-10-06 00:47:39 +00:00
Tobias Thierer
a130c634d1 Merge "Fix documentation generation with OpenJDK 9 javadoc." am: ed6ae8f2b1 am: 8d4e36b1e8 am: 7c8e38c2cc
am: fcd0e0a554

Change-Id: I7836df411ed7d67bae34bda0bf6b6392613437b9
2017-10-05 23:49:36 +00:00
Tobias Thierer
fcd0e0a554 Merge "Fix documentation generation with OpenJDK 9 javadoc." am: ed6ae8f2b1 am: 8d4e36b1e8
am: 7c8e38c2cc

Change-Id: Idf7ff7b214281982a4a747c1e0af4cf54f622865
2017-10-05 23:38:06 +00:00
Tobias Thierer
8d4e36b1e8 Merge "Fix documentation generation with OpenJDK 9 javadoc."
am: ed6ae8f2b1

Change-Id: I8bd1f9b3994f480d55d7c885b2c24227a67915e9
2017-10-05 23:12:37 +00:00
Mike Ma
c2f518a9dd Add AOD metrics in batterystats
Fixes: 64899521
Test: manual - flash build, reset batteryStats, use device > 1 hr
with alternating pattern between screen on/off/AOD. Dump stats, check
all screen related stats look normal, esp. record matches actual time
spent in each screen state. In raw bugreport:
Search "amount discharged" for % discharge;
Search "Screen on/off/doze discharge" for mAh discharge;
Search "time on battery" for up/real time in each state.

Test: Added two unit tests for note AOD screen state
Change-Id: I7193a36751124dd380818b2b665303c0f0d8c984
2017-10-05 15:28:55 -07:00
Paul McLean
50f8bbb9cf Catch IO Exception in UsbDevicesParser and don't add failed devices.
Note: This is related to bug 66988327, but NOT a fix for it.

Bug: 66988327
Test: Manual
Change-Id: Ib9ccaa9634c7fc011f70513d5589870e9190418a
2017-10-05 15:28:20 -06:00
Yi Jin
9a37e8e886 Merge "Remove number of Wake Kills, it is safe to change proto numbers since nothing is being used now." 2017-10-04 22:20:48 +00:00
Andrei Stingaceanu
6c591dd3c3 Merge "[Magnifier - 1] Initial implementation and wiring" 2017-10-04 09:38:53 +00:00
Yi Jin
dca4327254 Remove number of Wake Kills, it is safe to change proto numbers since
nothing is being used now.

Bug: 65690183
Test: N/A
Change-Id: Iafc5698aeb2b742e9af6efc755e6d78101c5c7e7
2017-10-03 14:25:58 -07:00
Yi Jin
8cf1ffec89 Merge "Implement procstats dumpsys section" 2017-10-03 20:54:13 +00:00
Andrei Stingaceanu
d2eadfa4b1 [Magnifier - 1] Initial implementation and wiring
* implementation of a magnifier which can be attached to any view
* important APIs:
** show(float centerXOnScreen, float centerYOnScreen, float scale)
** dismiss()
* smart offset => shows below if there is no space above
* controlled by boolean flag (easy to turn off)
* attached the magnifier to Editor's handles
* vertically snaps to the middle of the line containing the
  selection
* horizontally snaps to the offset of the character where
  the selection starts/ends

Bug: 66657373
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: manual test that shows the magnifier working
Change-Id: I1d4616b8bb1210d869ac47dca137ea9636355250
2017-10-03 16:45:54 +01:00
Tobias Thierer
85edc2bc95 Fix documentation generation with OpenJDK 9 javadoc.
"make docs" breaks ("lint: @attr must be a field") on three @attr ref
statements in LinearLayoutManager. These are the only @attr ref
statements that reference the support library's resources from
framework (the others are within framework or within the support
library); it may be that the R class that they're referencing is
merely in the wrong package, but changing it to com.android.internal.R
or android.R didn't fix the issue.

Since LinearLayoutManager is an internal class, it's not worth the
effort of trying to make this work. This CL drops the three offending
@attr ref statements, thereby fixing the build.

Bug: 62049770
Test: Treehugger

Change-Id: Ife01201019f4fffd5552da11591661539ca40fdd
2017-10-03 12:45:57 +01:00
Adam Powell
21e6180afd Merge "Lower watchdog timeout for ChooserTargetService responses" into oc-mr1-dev am: cbe8754184
am: 6a6a65e89e

Change-Id: Iad59aa075152428734fe68186d87651ac3f9780d
2017-10-02 22:19:10 +00:00
Adam Powell
6a6a65e89e Merge "Lower watchdog timeout for ChooserTargetService responses" into oc-mr1-dev
am: cbe8754184

Change-Id: I96573018654de3cfccdae1be6ce01ae7749c5ffe
2017-10-02 21:40:30 +00:00
TreeHugger Robot
cbe8754184 Merge "Lower watchdog timeout for ChooserTargetService responses" into oc-mr1-dev 2017-10-02 20:40:37 +00:00
Dan Sandler
afa8043cf5 Merge "Merge "Don't crash onServiceDisconnected..." into oc-mr1-dev am: dab9eff899" into oc-mr1-dev-plus-aosp
am: bb268b9fd6

Change-Id: Iec740e8d40db93eda07e548e097a8cb7b0c4e3b0
2017-10-02 18:23:32 +00:00
Dan Sandler
fce1eb3ea3 Merge "Don't crash onServiceDisconnected..." into oc-mr1-dev
am: dab9eff899

Change-Id: Idfc6a98804928a177153492010e04ec75fa30755
2017-10-02 18:00:56 +00:00
TreeHugger Robot
dab9eff899 Merge "Don't crash onServiceDisconnected..." into oc-mr1-dev 2017-10-02 17:44:57 +00:00
Adam Powell
3f23dfc6c1 Lower watchdog timeout for ChooserTargetService responses
Services providing direct share targets were given up to 5 seconds
to respond to a query, and for UI stability we don't show any until
all services have responded. 5 seconds is a long time to wait and
leads to user complaints when there is even one app that doesn't
respond in time.

Lower the timeout to 2 seconds as a more reasonable maximum.

Bug: 67306843
Test: manual, existing CTS
Change-Id: If55f0485240bc3ccbf8a32aa0e15903ea574ec2b
2017-10-02 10:41:03 -07:00
Yi Jin
9680cfae05 Implement procstats dumpsys section
Bug: 65690183
Test: tested manually using incident-report tool
Change-Id: I0c34e411dba8faf9f311c78701ac8f6bec824277
2017-09-29 17:03:50 -07:00
Jeff Sharkey
f8bb2445ff Finish removing ASEC.
Awhile back we explicitly blocked any new ASEC installs, with the
expectation that we'd eventually remove the logic entirely.  We've
had them disabled for about a week now without incident, so let's
rip out the remaining code.

Test: bit FrameworksCoreTests:android.content.pm.PackageHelperTests
Test: bit FrameworksCoreTests:android.content.pm.PackageManagerTests
Bug: 32913676
Change-Id: I1ecc35487420731f5c4bdf03bca5751548ce51b3
2017-09-28 11:32:57 -06:00
Beverly
68c04c024d Merge "Adjusted chooser padding so 2nd line isn't cutoff." into oc-mr1-dev am: 5802026595
am: 3836cce06d

Change-Id: Ia03d3752e15bc7700abecc2dff0d0c1b8a6acdd9
2017-09-26 23:31:06 +00:00
Beverly
3836cce06d Merge "Adjusted chooser padding so 2nd line isn't cutoff." into oc-mr1-dev
am: 5802026595

Change-Id: Ic2bb95c7230ea25646824f41d219b09d3cb70709
2017-09-26 23:20:09 +00:00
TreeHugger Robot
5802026595 Merge "Adjusted chooser padding so 2nd line isn't cutoff." into oc-mr1-dev 2017-09-26 23:14:08 +00:00
Hugo Benichi
d7a9617ea7 Merge changes Ia47e566b,Ib94d79a9 am: b9e2ddfc10 am: a2161c5ccb am: b91bd88c5e
am: f43db3bf94

Change-Id: I4226f31aaea21a7ad2bff7ac8b0a85acc5151cfc
2017-09-26 13:30:24 +00:00
Hugo Benichi
f43db3bf94 Merge changes Ia47e566b,Ib94d79a9 am: b9e2ddfc10 am: a2161c5ccb
am: b91bd88c5e

Change-Id: Ied2b31c9d1219b8aebf5fec085ab598b77bede6e
2017-09-26 13:05:41 +00:00
Hugo Benichi
a2161c5ccb Merge changes Ia47e566b,Ib94d79a9
am: b9e2ddfc10

Change-Id: I0cac456f778db78d76d2225b79ce42526a6d2d19
2017-09-26 11:46:30 +00:00
Hugo Benichi
67c5e03b54 Extract RingBuffer class from NetdEventListenerService
This patch takes out the ring buffer array added for NFLOG wakeup packet
events logging and extract it into its own class for reuse. This new
RingBuffer class has the two minimal useful functions append() and
toArray().

Bug: 65164242
Bug: 65700460
Test: runtest frameworks-net, with new unit test
Change-Id: Ib94d79a93f4e99661b7d0fac67117b91d57af980
2017-09-26 14:14:16 +09:00
Dan Sandler
fcd7fae5e6 Don't crash onServiceDisconnected...
...if destroy() hasn't already been called through some
other codepath.

Bug: 65249720
Test: runtest -x core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java
Change-Id: I5f90548e437986d8585390578f4ceecd57cc3473
2017-09-25 17:43:16 -04:00
Sudheer Shanka
f39df68b71 Merge "Add shutdown reason as extra when triggering ACTION_REQUEST_SHUTDOWN." 2017-09-25 20:42:52 +00:00
Adrian Roos
f2ebc40286 Merge "FRP: Add config flag for disabling credential FRP" into oc-mr1-dev am: 73c93f02f7
am: 392a9b5c1d

Change-Id: Ifeb044d767b03c799fa028e6efc967b88fae7b53
2017-09-25 18:47:59 +00:00
Adrian Roos
392a9b5c1d Merge "FRP: Add config flag for disabling credential FRP" into oc-mr1-dev
am: 73c93f02f7

Change-Id: I647bfc52892b305eb59f446812e142b609172bd4
2017-09-25 18:38:23 +00:00
Sudheer Shanka
292637f51a Add shutdown reason as extra when triggering ACTION_REQUEST_SHUTDOWN.
When BatteryService triggers ACTION_REQUEST_SHUTDOWN intent, add the reason
for shutdown as extra to indicate low battery or critical battery
thermal state.

Bug: 63736262
Test: 1/ adb shell cmd battery unplug && adb shell cmd battery set level 0
      2/ Power on the device
      3/ Verify sys.boot.reason == shutdown,battery
Test: 1/ adb shell cmd battery set temp 700
      2/ Power on the device
      3/ Verify sys.boot.reason == shutdown,thermal,battery

Change-Id: If20a36ef53f8bcbfae4114df08f741ec1dcd7df9
2017-09-25 11:20:37 -07:00
Adrian Roos
2adc263ce9 FRP: Add config flag for disabling credential FRP
Bug: 65258606
Test: Verify FRP still works when not disabled
Change-Id: I78e308b6eaba73c794615b1eebdbfacb334ae72f
2017-09-25 13:32:48 +02:00
Beverly
3aee178c86 Adjusted chooser padding so 2nd line isn't cutoff.
Change-Id: I171eafed073b4412904e3c0dc6f88efb8370d3bf
Fixes: 65546796
Test: manual
2017-09-21 17:14:04 -04:00
Christine Franks
0321346f38 Handle night display state when timezone changes
Bug: 64458884
Test: runtest -c com.android.server.NightDisplayServiceTest \
frameworks-services and manually tested Hawaii and London

Change-Id: I052034a4c64eb73c42672215e8847c11e00efeb5
(cherry picked from commit 2ce862c3ed)
2017-09-20 03:35:49 +00:00