Commit Graph

309172 Commits

Author SHA1 Message Date
songjinshi
e02e3ea7f9 [Debug]: Add timeout for dumpNativeBacktraceToFile.
If the debuggerd be blocked, the watchdog and
activitymanager thread will be blocked when the
ANR or watchdog occurs,so we needed to add
timeout for dumpNativeBacktraceToFile.

Change-Id: Iab1a64328e70257025d860638d93a4fb8eaaeea2
Signed-off-by: songjinshi <songjinshi@xiaomi.com>
2017-02-07 19:17:45 +00:00
Eric Laurent
c117bea6dc audio: deprecate AudioManager.isBluetoothA2dpOn()
This method name is misleading and the functionality is now
replaced by the more generic AudioManager.getDevices() method.

Bug: 35076621
Test: make, make update-api
Change-Id: Idc2e55f85722d3197fc8fab115af33f5da889d57
2017-02-07 11:14:19 -08:00
Phil Weaver
1e2758256a Merge "Provide text locations to accessibility services." 2017-02-07 19:14:09 +00:00
Calin Juravle
4466c5ad84 Fix typo in dexopt.secondary system property
Test: adb shell cmd package bg-dexopt-job
Bug: 32871170
Change-Id: Ic8a14a3fc5c9aa63f6cb376f337b5bf459997325
2017-02-07 11:09:01 -08:00
Jean-Michel Trivi
10ffc78304 Audio player delayed start: don't throw exception
When the framework sets a delayed start on a PlayerBase instance
  (e.g. MediaPlayer or AudioTrack), catch the IllegalStateException
  that can be thrown if the player's state has changed by the time
  the actual start command gets executed.

Test: generate notifications played by NotificationPlayer
Bug 35019197

Change-Id: I51fd0305bc83b34e33fbcf9331f55627d32702f3
2017-02-07 10:47:31 -08:00
Adam Powell
0f552f4d50 Provide old behavior for View#hasFocusable to old apps
Existing apps have copies of ListView behavior that expects the old
hasFocusable behavior of only reporting explicitly focusable views.
Use targetSdkVersion to give the old behavior to existing apps.
Add hasExplicitFocusable method to View to offer the old behavior
to apps that need it. ViewCompat method required in support library
to shim through to hasFocusable pre-O.

Bug: 34946284
Test: CTS
Change-Id: I65503fa2c5fe4cb8b635efa464e653bbf5e7f821
2017-02-07 10:44:37 -08:00
Soonil Nagarkar
de6780acb6 Set default throttle to 30m.
Test: manually

Change-Id: Ib8ce75819095af7e01124a2c55c3a96f7c38740c
2017-02-07 10:40:45 -08:00
Jason Monk
d8df1b083d Merge "QS: Fix brightness/edit disappearing with too few tiles" 2017-02-07 18:23:54 +00:00
Vladislav Kaznacheev
19dab2df3a Hide pointer icon while navbar is hidden
When the navbar gets hidden as a result of
View.setSystemUIVisibility call, the most recent pointer gets
stuck because hover events stop being dispatched to the app.
Hide the pointer icon to avoid confusion.

Bug: 32248070
Test: ApiDemos > View > System UI Visibility > System UI Modes >
   click on HIDE_NAV

Change-Id: Iae80bfa7ab5469946485a68e5308ea752a4645b0
2017-02-07 10:12:51 -08:00
Felipe Leme
fb0f360222 Merge "Refined session management so Save can be automatically called." 2017-02-07 17:50:29 +00:00
Bill Yi
7f01089aae Merge "Import translations. DO NOT MERGE" into nyc-mr2-dev am: 7e61e7c585 -s ours
am: fdb6ec0314  -s ours

Change-Id: Ie5eb63649ee976737b3287c19b4c8238e9eb84d7
2017-02-07 17:33:18 +00:00
Bill Yi
750f29ae93 Import translations. DO NOT MERGE am: ca2ead63c9 -s ours
am: 2192d06b21  -s ours

Change-Id: I5d6efc9f948b01823d854393bb4e319866aaa458
2017-02-07 17:32:16 +00:00
Bill Yi
fdb6ec0314 Merge "Import translations. DO NOT MERGE" into nyc-mr2-dev
am: 7e61e7c585  -s ours

Change-Id: I541c140a9244f7671b3a09f19a4e0ff7acef4f0f
2017-02-07 17:28:13 +00:00
Bill Yi
2192d06b21 Import translations. DO NOT MERGE
am: ca2ead63c9  -s ours

Change-Id: I0411d2408480cd60d32c40db1e5c5f59a9d98609
2017-02-07 17:28:07 +00:00
TreeHugger Robot
7e61e7c585 Merge "Import translations. DO NOT MERGE" into nyc-mr2-dev 2017-02-07 17:21:09 +00:00
Makoto Onuki
f34f9736a9 Merge "Fix PSS/USS Average in procstats" 2017-02-07 17:11:45 +00:00
Peeyush Agarwal
e631e32a1a Extend MenuItem to allow modifier keys for shortcut
Before this, CTRL was the default modifier for MenuItem shortcuts.
Now, It's possible to specify the modifier in XML or via MenuItem
methods.
The modifier list includes META, CTRL, ALT, SHIFT, SYM and FUNCTION.

WIP on support library implementation

Bug: 32165848
Test: Run the tests using following commands:
> cts-tradefed run cts-dev -m CtsViewTestCases -t
>   android.view.cts.MenuTest#testPerformShortcut
> cts-tradefed run cts-dev -m CtsViewTestCases -t
>   android.view.cts.MenuInflaterTest#testInflateShortcutModifiersFromXml

Change-Id: I7db4607d4657451934761914efe4c250de109653
2017-02-07 17:01:26 +00:00
Paul Duffin
3e5fbca0c5 Replace com.android.internal.util.Predicate with java.util.function.Predicate
Bug: 35089332
Bug: 30188076
Test: make checkbuild
Merged-In: I0a5b4bf520fc39b59d8d790b01e9cff0d54e6d21
Change-Id: I58e4e35e7b7315033d893748f7c79e1ba6732f39
2017-02-07 16:57:54 +00:00
Winson Chung
2a82fe587b Refactor PiP logic in preparation for expanded state.
- #1: Move logic for handling IME size changes into SysUI, and only rely
      on PinnedStackController to provide bounds when first entering
      PiP and on rotation
- #2: Doing #1 allows us to move PipMotionHelper to SysUI completely, which
      lets us aggregate the animation calls out of PipTouchHandler
- #3: Add proper callbacks to the listeners when the movement bounds
      changed from config change, ime change, or aspect ratio change. This
      allows SysUI to calculate the associated movement bounds for the
      expanded state, and we can then remove the corresponding WM call.
      It also means that SysUI is the only thing that needs to know about
      the expanded state.
- #4: Fix issue where TV was getting the default bounds, not taking the
      aspect ratio when the PiP was entered into account.  Doing #3
      allows us to report the right bounds.
- #5: Remove dead code related to edge snapping/minimizing now that they
      are on by default and associated tuner setting, and controller
      callbacks

Test: android.server.cts.ActivityManagerPinnedStackTests (all existing tests pass)

Change-Id: I3ef361bdf8d44094b4c0a11c70ba4db7d697fdec
Signed-off-by: Winson Chung <winsonc@google.com>
2017-02-07 08:26:36 -08:00
Winson Chung
9c2a686757 Modifying RemoteAction callback to PendingIntent.
Test: android.server.cts.ActivityManagerPinnedStackTests
Bug: 34864798
Change-Id: I89a5184c2f067722cb1f5f962bbb8cbb91529092
2017-02-07 08:26:24 -08:00
Paul Lawrence
c47dd7cf0c Expand seccomp whitelist
Bug: 34979910
Test: System boots, app runs
Change-Id: I8b60a24ac855679251e73edcdec57eb4af4a5610
2017-02-07 08:21:29 -08:00
Abodunrinwa Toki
8710ea13c1 start/invalidate selection actionMode asynchronously
Text selection is now started/updated using AsyncTasks that first get
a result from the TextClassifier before actually starting/invalidating
the actionMode on the UI thread with the result.

Bug: 34778899
Test: cts-tradefed run cts-dev -m CtsWidgetTestCases -t android.widget.cts.TextViewTest#testSmartSelection
Change-Id: Ie7eda04bb64335744d88b8874363d46af4f94742
2017-02-07 16:14:56 +00:00
Jeremy Joslin
a5172f69ca New internal interface method to get the active scorer metadata.
Returns the cached NetworkScorerAppData from the connected service.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 34773276
Change-Id: Ia8986e770c4ede0c0f7e2ad4f5bc0a0117a9ae2b
2017-02-07 16:12:22 +00:00
Delphine Martin
3f7bf2e96c Merge "Fix incorrect syntax in Proguard flags" 2017-02-07 15:41:04 +00:00
Bryan Mawhinney
96eb5b724b Fix live wallpaper not showing on lock screen after restore
A recent change in nyc-mr2 means that setWallpaperComponent will
promote any static system wallpaper to the lock screen.  If we don't
actually have a static lock wallpaper to restore, we need to explicitly
clear the lock wallpaper to have the live one show through

Test: manually using adb backup / restore
Bug: 35090402
Change-Id: I8a2c5ffbaefe172c9d78a9f746ab87d9bc6b7448
2017-02-07 15:37:40 +00:00
Clara Bayarri
5edceec2cc Merge "Cache Downloaded Fonts in Typeface" 2017-02-07 15:36:28 +00:00
Bryan Mawhinney
5c14853296 Workaround wallpaper restore race
If WallpaperManager is asked to read a wallpaper between when we
call mWm.clear and mWm.setStream, it is possible for us to end
up losing restored state such as cropHint and allowBackup

By not calling mWm.clear, we make this much less likely to happen.
It isn't necessary to call clear, as will explicitly overwrite
all the interesting state anyway.

Test: by repeated adb restore
Bug: 34760753
Change-Id: I2750695d5dd16077b47b5b8fca3a667b98cc4f6c
2017-02-07 15:30:06 +00:00
Esteban Talavera
84e706fb9b Merge "Unhide getLockTaskPackages" 2017-02-07 15:04:48 +00:00
Filip Pavlis
8874d6efda Merge "Fix transitions between single and multi-pane." 2017-02-07 14:46:54 +00:00
Rubin Xu
f810cc9a5b Merge "Fix uri permission grant on remote bug report uri" 2017-02-07 14:40:17 +00:00
Orion Hodson
4a4c67615e Import CallSite classes and BootstrapMethodError class from ojdk8u60
Minor changes to CallSite.java, with other imported unmodified.

Bug: 33191717, 30550796
Test: make docs
Change-Id: I15e6f05d49d0fcdea8d10d128a957e0d13ca2df2
2017-02-07 14:37:15 +00:00
Bill Yi
63bfc8312c Merge "Import translations. DO NOT MERGE" into nyc-mr2-dev am: 6654edae49 -s ours
am: 5e1652a7c9  -s ours

Change-Id: I12564fcecc14484b8cf32c669f77bf5f11c0fa87
2017-02-07 14:20:39 +00:00
Bill Yi
b01f312dd0 Import translations. DO NOT MERGE am: 446a66d235 -s ours
am: 9e1b6881a6  -s ours

Change-Id: I5583afd8f110c57fd8cbaa43ca23457b91073b93
2017-02-07 14:19:39 +00:00
Bill Yi
a2dd05c284 Merge "Import translations. DO NOT MERGE" into nyc-mr2-dev am: f3f4f78dc7 -s ours
am: 0e4a8f5f41  -s ours

Change-Id: Ic0894bfb2f8e5d5c9850caf6110e4e24959e6bac
2017-02-07 14:18:49 +00:00
Stan Iliev
6983bc40d7 Fix deadlock in render thread when Bitmap.prepareToDraw is invoked
Fix a deadlock with Skia pipelines, caused by calling
Bitmap::getSkBitmap from render thread.

Test: built and booted an image. Ran recent apps activity.
bug: 35060578
bug: 34926691
Change-Id: Iaf7957b955d938b722b153d72ad832ae5d50e86f
2017-02-07 09:18:17 -05:00
Bill Yi
0cc5fe37a6 Import translations. DO NOT MERGE am: b83f6b6f44 -s ours
am: f8f731cbe6  -s ours

Change-Id: I135bddc74ce28a227a4c2197305be7b5379b2152
2017-02-07 14:17:56 +00:00
Charles He
d2aa0bb0d3 Merge "Fingerprint: get auth id for non-current user." into nyc-mr2-dev am: 15b8313d1b
am: d7d9c0241f  -s ours

Change-Id: I54e46e945fa45b35932efb697b65a3afce34782d
2017-02-07 14:17:06 +00:00
Charles He
f6387d8a51 Fingerprint: get auth id for non-current user. am: aae60473e1
am: 9b734a7c4c  -s ours

Change-Id: I1d37dbf2d5348ed1caa2260a01e0d8449311c6b3
2017-02-07 14:16:05 +00:00
Andreas Huber
74400b2ef4 Merge "Fixes Treble marshaling of strings embedded in structures from Java" am: 97fca8c035 am: 0bae9b1406 am: 0e686542e6
am: 390cd6ceda

Change-Id: I0b1ba7490adaaec8f4eaa7e4afada7425f8c1129
2017-02-07 14:12:09 +00:00
Pavlin Radoslavov
489ce07b81 Merge "Add a mechanism to configure the default A2DP codec priorities" am: acf34d8b62 am: cd6e0ee19d am: b7067e2b6c
am: 537eaf0f6e

Change-Id: I42186a561d59decb0d811b3f5b8d5bf96df53152
2017-02-07 14:05:43 +00:00
Jason Monk
f5c7778c7d Merge "resolve merge conflicts of a800795a15 to master" 2017-02-07 14:02:22 +00:00
Esteban Talavera
bfb666da53 Unhide getLockTaskPackages
getLockTaskPackages is currently hidden, and can only be
called by a device or profile owner, which doesn't make
much sense. Unhidding it to be consistent with the rest
of the DevicePolicyManager APIs that have a getter for
each setter.

Bug: 34614754
Test: cts-tradefed run cts-dev --module DevicePolicyManager --test com.android.cts.devicepolicy.DeviceOwnerTest#testLockTask_affiliatedSecondaryUser
Test: cts-tradefed run cts-dev --module DevicePolicyManager --test com.android.cts.devicepolicy.DeviceOwnerTest#testLockTask_unaffiliatedUser
Test: Test:  cts-tradefed run cts-dev --module DevicePolicyManager --test com.android.cts.devicepolicy.DeviceOwnerTest#testLockTask_deviceOwnerUser
Change-Id: I6e03c2f47c0f9e7a635e798a1bf7f131a8e37c65
2017-02-07 12:01:20 +00:00
Filip Pavlis
61fc0d47ff Fix transitions between single and multi-pane.
Transitions in and out of multi-window were causing navigation history
losses + incorrect views to be displayed. The history loss was caused by
the fact that single-pane mode was using Activities but multi-pane mode
was using Fragments. Translating history between those two would be
challenging. Because of that Fragment approach was also applied to
single-pane mode. That required some changes in back press handling and
initial logic when creating the PreferenceActivity.

Test: Separate CTS CL being submitted along this one, see the topic.
Bug: 32201932
Change-Id: I5e6a6a21c34e813d1c3522ae7f5e33f43887c602
2017-02-07 11:51:51 +00:00
Rubin Xu
7226c7dc9f Fix uri permission grant on remote bug report uri
System server is no longer allowed to grant uri permission directly. As a result
we use grantUriPermissionFromIntent() to grant permission from the shell UID,
who is the owner of the bug report content.

Also fix a security bug where the broadcast to notify user consent of remote
bug report mismatches the <protected-broadcast> definition, causing it to be
sendable by anyone.

Bug: 34159108
Test: manual - Install TestDPC and request bugreport, try accept and decline
      once the report is ready (Bullhead).

Change-Id: I66e3f2a16d4547549f09d3c96d52aed2330caedf
2017-02-07 11:30:20 +00:00
Andrei Stingaceanu
155c3a88ac Merge "Clickable spans - trigger onClick onSingleTapUp" 2017-02-07 11:19:53 +00:00
Diego Perez
c0919ba4cb Upgrade thumbnails size by 4x
Test: Updates existing tests
Change-Id: I822ea4b35ee56b8c2e193b7123e6e99719499359
2017-02-07 11:10:57 +00:00
Diego Perez
abb080d749 Fix support for enum attributes in BridgeContext
Test: Updated BridgeXmlPullAttributesTest
Bug: http://b.android.com/231347
Change-Id: I5fd8b46155ccea6c9b65787f311a0887fa4b4806
2017-02-07 10:29:09 +00:00
TreeHugger Robot
c15add0040 Merge "Extend permissions of cameraserver" 2017-02-07 10:13:09 +00:00
Yohei Yukawa
87ca8406d4 Propagate StartInputReason to attachNewInputLocked
As a preaparation to work on Bug 35079353, this CL makes it clear that
IMS#startInput()/IMS#restartInput() can be also be triggered by
IMMS#onSessionCreated().

By doing this, we can now assume that each
IMS#startInput()/IMS#restartInput() event has always one corresponding
StartInputReason. In a subsequent CL, we will pass this to the IME
process (and to the app process) for further traceability.

Test: no behavior change.
Bug: 35079353
Change-Id: I604e35b023d27b77126cd70fe068dc6b5edc2611
2017-02-07 00:13:14 -08:00
Jaewan Kim
620f72841f Merge "Add oneway keyword for the IOnMediaKeyListener" 2017-02-07 07:59:25 +00:00