Commit Graph

8536 Commits

Author SHA1 Message Date
Tarandeep Singh
01b6ff0178 Merge "Add multi-display support to FloatingToolbar." into oc-mr1-dev 2017-08-31 20:45:48 +00:00
Julian Mancini
30175b958e Remove PDF Thumbnail functionality
Bug: 64225798
Test: Removing Functionality
Change-Id: Id02f1b50d161c6f2779c9f65c579383c18028b65
2017-08-31 14:26:10 -06:00
TreeHugger Robot
c1235a1ff2 Merge "Do not call setAlwaysButtonEnabled if the activity doesn't support defaults." into oc-mr1-dev 2017-08-31 19:47:42 +00:00
Tarandeep Singh
c9c83a9ccb Add multi-display support to FloatingToolbar.
DecorView has no support for multi-display (bug 65172902).
Until that is done, the easy fix for displaying cut, copy, paste
on non-default display is to modify FloatingToolbar.
FloatingToolbar uses context of Default display. Changed it
to use context of the window (which makes it multi-display
compatible).

Fixes: 64837794
Test: Manual using AAe's KitchenSink test app
bit FrameworksCoreTests:android.widget.TextViewActivityTest
bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: I513f1aac1c0d22355c996247e3bf56c6d812348f
2017-08-31 17:51:50 +00:00
TreeHugger Robot
f10b0d000e Merge "Fixes NPE thrown in sort if new targets are added." into oc-mr1-dev 2017-08-31 00:34:57 +00:00
TreeHugger Robot
dcadf1934a Merge "Add static lock in PowerProfile" into oc-mr1-dev 2017-08-30 23:35:07 +00:00
Kang Li
0935f152c7 Fixes NPE thrown in sort if new targets are added.
Test: manually tested it to verify that it works as expected.

Bug: 65035399
Change-Id: Ie99b05c5324f47cbac66687d7301ef62a7c83e55
2017-08-30 21:32:08 +00:00
jackqdyulei
0e3504c0fa Add static lock in PowerProfile
Before this cl, there exists nullpointer crash in PowerProfile in
following part:

"sPowerMap.containsKey(key) && (Double) sPowerMap.get(key) > 0"

To my best knowledge, it is because in
PowerUsageSummary.SummaryProvider, we may create batterystats in
meantime:
1. setListening is invoked in worker thread, in which we will force
update the batterystats.
2. In setListening we will register receiver, which may update
batterystats through onReceive in UI thread.

This cl adds static lock in PowerProfile, making the init part can
only be accessed by an thread at a time.

Bug: 64209576
Test: Manual
Change-Id: I00bc094f44416669b4f0e11e647b0fae2ff61013
2017-08-29 15:30:42 -07:00
Ruchi Kandoi
65d76c1213 Do not call setAlwaysButtonEnabled if the activity doesn't support defaults.
13405c5529 introduced a bug where
activities using ResolverActivity without dafaults/always option get selected,
the ResolverActivity tries to set a default causing a crash.

Test: Test Application using TECH_DISCOVERED intent filter
Bug: 38358120
Change-Id: Id36635d84963bcf1dc7e55938e2370542ed291ab
2017-08-29 15:19:21 -07:00
TreeHugger Robot
10477217f5 Merge "Fix ListView can not be moved after rotation." into oc-mr1-dev 2017-08-29 20:09:56 +00:00
TreeHugger Robot
cc4f60fe4b Merge "Add shadow to adaptive icons to the shared sheet Test: manual Bug: 65015602" into oc-mr1-dev 2017-08-29 19:54:26 +00:00
TreeHugger Robot
6a1dad9194 Merge "Fix tooltips for views in a popup window" into oc-mr1-dev 2017-08-29 19:08:30 +00:00
Jiongxuan Gao
3365b16821 Fix ListView can not be moved after rotation.
Symptom:
"Share with" popup displayed incompletely, and cannot be slid after
rotated the screen twice.

Root cause:
Since ChooserActivity's configChanges attribute contains
"screenSize|orientation" , when user rotates device, Android will
not recreate ChooserActivity, its content view ResolverDrawerLayout
is also not recreated. In ResolverDrawerLayout's onMeasure, it will
call getHeightUsed to calculate the ListView's height. getHeightUsed
will check against the lowest child view plus padding and margin
instead of the actual measured height of the ListView. This lets the
ListView hang off the edge when all of the content would fit on-screen
. Because of ResolverDrawerLayout has not been drawn yet, we can not
get the actual showing items' count of ListView before it's drawn, the
result of getChildCount for ListView will return the value in landscape
mode. The heightUsed of ListView might be smaller. mCollapsibleHeight
will be 0. When received a move action, the mCollapseOffset and new
position might both be 0.

Solution:
When configuration changed, we should rebuild the list and refresh
adapter's data set. Just like onRestart does.

Bug: 34365764

Change-Id: I4be0f9afc68588fbb0d8d152c41509650d04c754
2017-08-29 10:26:39 -07:00
Sudheer Shanka
6b1396e8fe KernelUidCpuFreqTimeReader: Put logs under debug flag.
Bug: 63041570
Test: N/A
Change-Id: Ifdeacb227bb936de82af9c9505621b327de3a9d2
2017-08-28 23:06:38 -07:00
Hyunyoung Song
dadb9e1728 Add shadow to adaptive icons to the shared sheet
Test: manual
Bug: 65015602

Change-Id: I01de79edc0a13817680106b1ef46e3212487b62f
2017-08-28 12:22:42 -07:00
Fyodor Kupolov
30c565d399 Merge "Added tron metrics for shutdown time" into oc-mr1-dev 2017-08-28 18:41:52 +00:00
Fyodor Kupolov
291f63bb54 Added tron metrics for shutdown time
The metrics are persisted in /data/system/shutdown-metrics.txt file
property and logged after reboot. MetricsLogger API cannot be directly
used during shutdown since event log is cleared on reboot/power off.

Test: manual reboot/shutdown and verify that metrics are logged
Bug: 64815357
Change-Id: I7fa1af8be58a80a3d5bae26d55c1ed40bf98f4c0
2017-08-25 16:59:08 -07:00
TreeHugger Robot
02f8fa9603 Merge "Fixed that the status icons were showing in the camera" into oc-mr1-dev 2017-08-25 19:13:44 +00:00
Selim Cinek
3a49ba2e40 Fixed that the status icons were showing in the camera
When launching to quicksettings, the camera icons showed
above the camera, clashing with their UI

Test: launch camera (locked) and click on galery
Fixes: 64317909
Change-Id: I4ef68963af11f6d0be739c79cdf352ba35d9ece0
2017-08-25 09:44:14 -07:00
Sudheer Shanka
29091ec55f Merge "Change KernelUidCpuFreqTimeReader Slog.wtf to Slog.e" into oc-mr1-dev 2017-08-23 22:26:08 +00:00
Sudheer Shanka
8cde930d71 Change KernelUidCpuFreqTimeReader Slog.wtf to Slog.e
Bug: 63041570
Test: N/A
Change-Id: I2cb12f1b8f0333c4a000d601624dc95934cf9b90
2017-08-23 11:29:23 -07:00
Selim Cinek
87c3153dcd Transforming all texts of decorated media custom views
Since otherwise they would be illegible with the color
tranformation.

Change-Id: I5c1fa085fc3d6f682012c267d489a95fc7073f32
Fixes: 64810767
Test: manual, add decoratedMediaCustomView
2017-08-23 02:30:14 +00:00
Vladislav Kaznacheev
df6ee1ecbe Fix tooltips for views in a popup window
The current implementation is using the anchor view's getWindowToken to
construct the TooltipPopup instance. This does not work if the anchor
view is in a popup window.

Using getApplicationWindowToken fixes the problem.

Bug: 64595364
Test: android.view.cts.TooltipTest#testTooltipInPopup
Change-Id: I1a887c9ae6ac00f2412891f316367acfc56cef94
2017-08-22 15:34:22 -07:00
Julia Reynolds
4796cf6b43 Merge "Let the foreground service channel be blocked" into oc-dr1-dev
am: 6614a2e5d0

Change-Id: Ic155670df78a6e779174cbd705f07260c8d305b6
2017-08-17 23:13:29 +00:00
Julia Reynolds
c23a2e67ac Let the foreground service channel be blocked
And update the channel name

Change-Id: Ic4b909d31b38b9e1ee05f9b3e4e5c91efc6752b1
Fixes: 36891897
Test: manual
2017-08-17 14:11:45 -04:00
TreeHugger Robot
07c83d00c9 Merge "API Council feedback" into oc-mr1-dev 2017-08-16 22:55:52 +00:00
TreeHugger Robot
a9774680f8 Merge "Do not filter out some colors" into oc-mr1-dev 2017-08-16 19:38:45 +00:00
TreeHugger Robot
7fc53a11f8 Merge "Allow explicit permission denial" into oc-mr1-dev 2017-08-16 17:11:30 +00:00
Todd Kennedy
74629e3183 Allow explicit permission denial
Change-Id: I5d348ed555f249d210253dab60ae11d4831c4f0a
Fixes: 63675512
Test: Manual
2017-08-16 14:43:05 +00:00
Lucas Dupin
e2efebc8a2 Do not filter out some colors
Colors specified manually using the public WallpaperColors
constructor should not be blacklisted.

Test: runtest -x tests/Internal/src/android/app/WallpaperColorsTest.java
Test: runtest -x tests/Internal/src/com/android/internal/colorextraction/types/TonalTest.java
Change-Id: I96faf413e3629c247220d825bb7c3480ed2f1003
Fixes: 64361146
2017-08-15 11:30:19 -07:00
Lei Yu
bd6ff3d3e5 Merge "Write currentDuration into Parcel" into oc-mr1-dev 2017-08-14 22:28:26 +00:00
Fyodor Kupolov
6e3461b67c Log timings for shutdown stages
Renamed BootTimingsTraceLog to TimingsTraceLog. It is now used for
 boot and shutdown logging.

Added measurements for main stages of shutdown in the system server:
ShutdownTiming: SendShutdownBroadcast took to complete: 734ms
ShutdownTiming: ShutdownActivityManager took to complete: 203ms
ShutdownTiming: ShutdownPackageManager took to complete: 17ms
ShutdownTiming: ShutdownBt took to complete: 533ms
ShutdownTiming: ShutdownRadio took to complete: 534ms
ShutdownTiming: ShutdownNfc took to complete: 1536ms
ShutdownTiming: ShutdownRadios took to complete: 1538ms
ShutdownTiming: ShutdownStorageManager took to complete: 906ms
ShutdownTiming: SystemServerShutdown took to complete: 3918ms

Bug: 64569080
Test: shutdown/reboot and check logs
Change-Id: I636c045852cd1ed6be1c58af6608f70e95756389
2017-08-14 11:23:29 -07:00
Sudheer Shanka
3cb64c2c51 Merge "DO NOT MERGE: Update BatteryStatsImpl to handle change in no. of freqs." into oc-mr1-dev 2017-08-11 01:05:43 +00:00
jackqdyulei
610a0a09f2 Write currentDuration into Parcel
This cl writes currentDuration to Parcel, so in battery settings we could
use this data in anomaly detection.

Also note that in getTotalDurationMsLock(aka method1), the logic is:

result = mTotalDurationMs + getCurrentDurationMsLocked(aka method2)

Since now method2 is not zero, we also tweaked the value for
mTotalDurationMs to make method1 return the same value compared with
before.

Since getMaxDurationMsLocked depends on mNesting, which is always zero,
so we don't need to tweak value for mMaxDurationMs

All these methods are covered in BatteryStatsDurationTimerTest

Bug: 64255589
Test: runtest -x BatteryStatsTest
Change-Id: I9168be099d00bb68fedbc5bfbb7bf7f0d9aae85a
2017-08-10 16:44:30 -07:00
Sudheer Shanka
a87245d305 DO NOT MERGE: Update BatteryStatsImpl to handle change in no. of freqs.
Bug: 62240247
Test: cts-tradefed run singleCommand cts-dev -m CtsIncidentHostTestCases -t \
      com.android.server.cts.BatteryStatsValidationTest

Change-Id: I1328fe7bf29229e9563cde6eea80addf2b91ea5d
2017-08-10 15:36:47 -07:00
Narayan Kamath
57ae4db225 Merge "ClassLoaderFactory: Correct broken refactoring from change 19da1cf72e8." into oc-mr1-dev 2017-08-10 15:34:22 +00:00
Narayan Kamath
590b90f533 ClassLoaderFactory: Correct broken refactoring from change 19da1cf72e.
Bug: 64493351
Test: cts-tradefed run cts-dev -t android.appsecurity.cts.ClassloaderSplitsTest -m CtsAppSecurityHostTestCases
Change-Id: Ib4868c1e0320002f5122193621e9ab56fe34819f
2017-08-10 12:15:17 +01:00
TreeHugger Robot
c75f43c1ab Merge "Go: add features for low ram / normal ram devices." into oc-mr1-dev 2017-08-10 04:35:09 +00:00
Dianne Hackborn
2a103f126f Go: add features for low ram / normal ram devices.
Automatically populated from ActivityManager.isLowRamDevice().

Test: manual

Change-Id: I027b8ae0205c9793a91ffdd2635479610a62aff9
2017-08-09 17:14:00 -07:00
Makoto Onuki
ff94e0351a DropBoxManagerService: Don't store redundant information
Filenames can be calculated from other fields, so there's no need to
store them.

This will reduce the average EntryFile size from 160b to 28b, so in theory
it could save 132 KB for 1000 entries.

- Also switched from HashMap to ArrayMap, which should help a bit too.

- Also fixed unit tests and added more.

Bug: 20890386
Test: bit FrameworksServicesTests:com.android.server.DropBoxTest
Test: Boot, check the dropbox directory, run dumpsys dropbox, reboot and repeat.

Change-Id: If567750f478318acd621864d1d4ef2ed41f214bd
2017-08-09 12:07:40 -07:00
TreeHugger Robot
8cbb5ffd5b Merge "Inherit theme dark/light scheme for MediaRouter dialogs/button" into oc-dr1-dev 2017-08-09 17:31:48 +00:00
Christofer Åkersten
8466b0179e Merge "Inherit theme dark/light scheme for MediaRouter dialogs/button" into oc-mr1-dev 2017-08-09 16:45:51 +00:00
Andrew Sapperstein
264fd594ca Merge "Make accessibilityInversionEnabled public" into oc-dr1-dev
am: 3108a06656

Change-Id: Ic37ee35914b714144228b77b192edf835bf9627e
2017-08-09 13:06:21 +00:00
Jason Monk
45144930b2 Merge "resolve merge conflicts of de0c539dd4 to oc-mr1-dev" into oc-mr1-dev 2017-08-09 12:15:19 +00:00
Adrian Roos
c2ca590e8e Merge "FRP: Fix crash after lockout" into oc-mr1-dev 2017-08-09 09:54:22 +00:00
Christofer Åkersten
fb09ecfdd7 Inherit theme dark/light scheme for MediaRouter dialogs/button
Bug: 64291950
Test: manual
Change-Id: I20694ce512a794a3c6574108b80dcfb4979b3b39
Merged-In: I20694ce512a794a3c6574108b80dcfb4979b3b39
2017-08-09 16:28:50 +09:00
Christofer Åkersten
d51640ba50 Inherit theme dark/light scheme for MediaRouter dialogs/button
Bug: 64291950
Test: manual
Change-Id: I20694ce512a794a3c6574108b80dcfb4979b3b39
2017-08-09 15:48:16 +09:00
Sudheer Shanka
bd9884a331 Merge "Change logging format in KernelUidCpuFreqTimeReader." into oc-mr1-dev 2017-08-09 05:38:18 +00:00
Sudheer Shanka
40c43f1b09 Change logging format in KernelUidCpuFreqTimeReader.
TimeUtils.formatForLogging takes currentTimeMillis as
argument, not elapsedRealTime.

Bug: 63041570
Test: visual inspection of logs
Change-Id: I4b880f64a8ead9a6a4a37fa4b9691edfc38a12db
2017-08-08 15:54:44 -07:00
Andrew Sapperstein
5a71a0f520 Make accessibilityInversionEnabled public
Need to use it in Settings.

Bug: 64256644
Test: existing
Change-Id: I9f9d2655e35ee2ad0dc9f9980cc9993f7b084025
2017-08-08 13:57:49 -07:00