Commit Graph

10148 Commits

Author SHA1 Message Date
Julia Reynolds
49f38bb487 Merge "Don't let apps permanently delete channels." 2017-02-08 19:50:49 +00:00
Daniel Nishi
9fa0a5c478 Merge "Fix a bug where the last used times could be wrong." 2017-02-08 17:32:36 +00:00
Julia Reynolds
0ebe2d1b0d Merge changes from topics 'proto', 'lights'
* changes:
  Dump notification records to proto
  Highlight selected channel on launching settings.
  Let developers choose a light color for channels
2017-02-08 13:34:28 +00:00
Daniel Nishi
baa381119c Fix a bug where the last used times could be wrong.
If a newer UsageStats came along, it would wipe away
the older UsageStats' last used times because it was
newer and, therefore, a source of truth. This is an
improper assumption, however. The newer UsageStat
may cover a timeframe which does not even have a last
use and, thus, destroys valid data.

Bug: 34857041
Test: FrameworksCoreTest
Change-Id: I5111b0d5a184a31a0a8fbdf12984cc7ef90ccd6e
2017-02-07 16:47:57 -08:00
Selim Gurun
38d07a18bb Merge "Fix WebView crashes" 2017-02-07 21:29:00 +00:00
Winson Chung
cd161864a3 Merge changes I3ef361bd,I89a5184c
* changes:
  Refactor PiP logic in preparation for expanded state.
  Modifying RemoteAction callback to PendingIntent.
2017-02-07 21:18:15 +00:00
Julia Reynolds
5355e8593a Don't let apps permanently delete channels.
Test: manual
Change-Id: Ia2582e3b4213f0b77579af2ff94f79b08e5d1a91
2017-02-07 15:46:10 -05:00
Julia Reynolds
529e3329e6 Let developers choose a light color for channels
Test: runtest systemui-notification & cts
Change-Id: Ibfab57924d0a9093af23191ebdd68ce1c0da6eca
2017-02-07 15:46:09 -05:00
Adam Lesinski
0e61883f5d Fix WebView crashes
Use the sharedLibraryFiles from ApplicationInfo, which is
what WebView patches.

Bug:34761805
Test: None
Change-Id: I5a496e8e017842a3fa30b956edf1b16c9459c5f0
2017-02-07 11:43:45 -08:00
Felipe Leme
fb0f360222 Merge "Refined session management so Save can be automatically called." 2017-02-07 17:50:29 +00: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
Esteban Talavera
84e706fb9b Merge "Unhide getLockTaskPackages" 2017-02-07 15:04:48 +00:00
Rubin Xu
f810cc9a5b Merge "Fix uri permission grant on remote bug report uri" 2017-02-07 14:40:17 +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
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
Felipe Leme
bab851c7c9 Refined session management so Save can be automatically called.
This is yet another big refactoring:

- AutoFillManager keeps track of its current AutoFillSession.
- Views call AFM.startSession(View) when they can trigger autofill.
  (virtual views can call it as well). At this point, the manager
  sets an AutoFillSession, gets the activity token, and passes it to
  the service.
- Subsequent calls to AFM.start() will be ignored since the session
  is set.
- When the Activity is gone, it calls AFM.finishSession().
- Simlilarly, virtual views could call it as well.
- Added getAutoFillValue() to View.
- Removed AFM.updateAutoFillInput(childId): virtual views should now
  call startSession(childId) to start a session, and use the
  VirtualViewListener callbacks for updates.
- Change AutoFillValue to use String (which is immutable) instead of
  CharSequence for text values.
- Check if view is enabled before auto-filling.
- Removed 'cmd autofill fill' since it would require the appCallback
- Automatically dismiss the snack bar after 30s
- Moved the "don't change autofill value when autofilling" Inception
  logic into the service side.
- Etc...

BUG: 34819567
BUG: 33269702
BUG: 31001899

Test: manual verification
Test: CtsAutoFillServiceTestCases passes

Change-Id: I5fad928d4d666701302049d142026a1efa7291cd
2017-02-06 18:22:03 -08:00
Casey Burkhardt
edb54686c2 Merge "Initial implementation of Nav Bar Accessibility Button" 2017-02-07 00:14:49 +00:00
Eugene Susla
444eb97c0c Merge "CompanionDeviceManager" 2017-02-06 22:19:54 +00:00
TreeHugger Robot
fbffd434df Merge "Adding text input mode to TimePicker." 2017-02-06 21:35:26 +00:00
Casey Burkhardt
048c2bc19a Initial implementation of Nav Bar Accessibility Button
This allows an AccessibilityService to set a flag in its
AccessibilityServiceInfo that triggers the navigation bar to show an
Accessibility Button and observe callbacks when the button is clicked
or there are changes in the visibility of the navigation bar.

Test: Manual (Created a sample AccessibilityService) + CTS
Bug:29231271
Change-Id: I03d653d85bc37df28ed71d8bba94b7c75fe56e43
2017-02-06 12:56:08 -08:00
Eugene Susla
6ed45d8cd3 CompanionDeviceManager
This introduces an API for apps that support companion devices to provide a
more streamlined flow for pairing and setting up the device

Bug: 30932767
Test: Using a toy app, invoke the newly introduced API (CompanionDeviceManager),
 and go through the flow. Ensure filtering works, and device is returned to
 the calling app. Ensure the calling app can pair to the selected device.
Change-Id: I0aeb653afd65e4adead13ea9c7248ec20971b04a
2017-02-06 12:50:55 -08:00
TreeHugger Robot
556897f701 Merge "Fix: fragment destroyed improperly during pop." 2017-02-06 20:11:46 +00:00
Aurimas Liutikas
ab14d825c3 Adding text input mode to TimePicker.
Test: Tests will have a follow up CL.
Bug:30044800

Change-Id: I71a0fba97026da76251768016edf1b159617abb9
2017-02-06 11:29:38 -08:00
Selim Cinek
391b1b82d2 Merge "Further improved the coloring optimization" 2017-02-06 18:20:37 +00:00
Pavel Grafov
9b8beea020 Fix the documentation for SecurityLog.SecurityEvent.getData(). am: 739cda8f31 am: fca679ff74 am: 5a474b4930
am: c3beac34f6

Change-Id: Ia45f8bea58e15e33e41cf25b09b5220870d9dd07
2017-02-06 17:57:15 +00:00
Pavel Grafov
c3beac34f6 Fix the documentation for SecurityLog.SecurityEvent.getData(). am: 739cda8f31 am: fca679ff74
am: 5a474b4930

Change-Id: If1731db386157b1f53c3a7bbe379299c1ada0ca9
2017-02-06 17:52:37 +00:00
Pavel Grafov
5a474b4930 Fix the documentation for SecurityLog.SecurityEvent.getData(). am: 739cda8f31
am: fca679ff74

Change-Id: Ic6e2aab590583c501fa74317ee614ab1ebaea378
2017-02-06 17:46:11 +00:00
Pavel Grafov
fca679ff74 Fix the documentation for SecurityLog.SecurityEvent.getData().
am: 739cda8f31

Change-Id: I0c6f1271392bfc9cc8d253d5fa5e029213492b48
2017-02-06 17:41:08 +00:00
Julia Reynolds
13d898c523 Additional badging APIs.
- shortcut id
- icon
- updated documentation for number

Test: cts
Change-Id: I0424b8879e79b3da70cc378c0ca96e14e328ea34
2017-02-06 08:53:50 -05:00
Ben Weiss
995f4b5721 Merge "Extract and unhide TransitionListenerAdapter" 2017-02-06 10:16:50 +00:00
Zak Cohen
56345f4bfe Introduces VrManager as a system service.
Provides access to persistent VR mode as used by VR viewer when a device
is believed to be inside a viewer.

Bug: 34736524
Test: Built, run using build of vr services that enables mode.
Change-Id: I6ff392f09adb8e4bd522dacbd064777bba836282
2017-02-05 17:33:44 -08:00
Selim Cinek
9910483608 Further improved the coloring optimization
Fixes a few follow up bugs from the colorized
notification CL.

This also allows media notifications with a media
session to be colorized by default.

Test: existing tests pass
Bug: 34469375
Change-Id: I36348591a84fcd39d103d0ae3f64720f2fca2cf2
2017-02-03 16:11:51 -08:00
Dianne Hackborn
340417356d Implement issue #30977956: Enable Instrumentation tests for multi-process apps
New android:targetProcess attribute on <instrumentation> allows you to
specify the processes the instrumentation will run in.

This reworks how instrumentation is run in the activity manager to better
formalize its state and semantics, allowing us to keep track of it across
multiple processes.  This also clearly defines what happens when multiple
instrumentations are running at the same time, which is useful for writing
CTS tests that test the instrumentation APIs themselves.

Adds a couple new APIs to Instrumentation that helps with the new
situation where instrumentation can run concurrently in multiple processes.

Test: new CTS tests added (textXxxProcessInstrumentation in
ActivityManagerTest.java in cts/tests/app/src)

Change-Id: I2811e6c75bc98d4856045b2f0a45fb24af5d366f
2017-02-03 16:07:54 -08:00
George Mount
8c4fa3615d Fix: fragment destroyed improperly during pop.
Bug 34850219

When multiple back stack records were popped together,
to the bottom of the stack, the fragment at the bottom
would be destroyed. This was caused by the back stack
being bumped prior to executing the operations. The
back stack record index didn't properly reflect the
state it should be in during the operation and the
final fragment returned false to isInBackStack().

This CL moves the back stack bumping to immediately
prior to executing the operations.

Test: I887d565d245cd61434963040c20f887a10bf51dc
Change-Id: I3ad2be65cf0e66bf5615c0e912cc233528ee72a3
2017-02-03 08:11:44 -08:00
Selim Cinek
4f3463290b Merge "Increased the collapsed size of messaging notifications" 2017-02-02 23:59:08 +00:00
Philip P. Moltmann
416a36a83b [DO NOT MERGE] Delay SharedPreferences.apply() by 50 ms
am: 2fc44947dd

Change-Id: Ie0bb1c0c23928318cbaf3dc22ca0aa6761bbfa75
2017-02-02 19:21:40 +00:00
Esteban Talavera
3355950785 Merge "Affiliated profile owners can set lock task packages" 2017-02-02 14:15:55 +00:00
Narayan Kamath
ff5659fbc3 Revert "Call ActivityCallbacks after corresponding activity methods"
This reverts commit 660cf30e21.

bug: 34415265
bug: 34914977
Test: chrome launches

Change-Id: I170365fd47313bafb0d722e6d55ee119336137c4
2017-02-02 13:55:31 +00:00
Pavel Grafov
739cda8f31 Fix the documentation for SecurityLog.SecurityEvent.getData().
If the payload contains more than one object, it is passed in Object[].

Change-Id: I28ca2ec35d920c644bdea13f15b2787ef3170310
Fixes: 34871284
Test: Read aloud, sounds good.
2017-02-02 12:47:53 +00:00
Felipe Leme
5523f9a2fc Merge "Improved AutoFill Save workflow." 2017-02-02 02:05:32 +00:00
TreeHugger Robot
edae71777f Merge "Fix setting null target fragments" 2017-02-01 20:54:55 +00:00
Julia Reynolds
986c32dafe Merge "Deprecate notification fields" 2017-02-01 20:24:24 +00:00
Felipe Leme
0200d9ea15 Improved AutoFill Save workflow.
Currently, the onProvideAutoFillStructure() methods can be called
twice: to auto-fill an activity and to save the activity's data
in the service.

The problem with this approach is that when the save workflow is
called, the activity might have been gone. Hence, a proper approach
is to keep the initial AssistStructure data in the system_service
memory, watch for view changes, and then passed the new structure
back to the AutoFillService.

A side effect of this change is that we need another way to determine
if the view is sanitized or not. For "standard" views, that will be
defined based on whether the view content come from a resource or not,
but that logic is not implemented yet (for now, all views will be
considered sanitized, except for TextView passwords). For "custom"
views (such as WebView), this logic is responsibility of the view
implementation, through the newChild() method, which now takes a
flag (whose value could be AUTO_FILL_FLAG_SANITIZED for sanitized
views).

The SaveCallback.onSuccess() method was simplified: it does
not need a list of saved ids anymore the auto-fill UI will not use it
anymore.

Another side effect is that the Save notification is gone - until
it's attached again, it can be test by using:

    adb shell cmd autofill save

Finally, hook AutoFillUI on ACTION_CLOSE_SYSTEM_DIALOGS events.

BUG: 33269702
BUG: 31001899
Test: manual verification
Test: CtsAutoFillServiceTestCases passes
Change-Id: I907a7e21d1b3cd1ab6dec3a08d144a52655da46f
2017-02-01 11:00:15 -08:00
Adam Powell
0621742d3c Fix setting null target fragments
Bug 34869013
Test: CTS

Change-Id: Ibeed66f9a889a8e395bfabedcf22aebcbb848908
2017-02-01 10:45:12 -08:00
Sergei Vasilinetc
40c509ff0f Merge "Call ActivityCallbacks after corresponding activity methods" 2017-02-01 18:02:34 +00:00
Esteban Talavera
bdcada9762 Affiliated profile owners can set lock task packages
Mentioned that in the documentation, cleaned up the code
a bit and added unit tests

Bug: 34614754

Test: runtest -c com.android.server.devicepolicy.DevicePolicyManagerTest    frameworks-services
Change-Id: I91232bbe494398015094ab977c6a2adce339811f
2017-02-01 15:02:22 +00:00
Julia Reynolds
a33f5c4312 Deprecate notification fields
And move references to the deprecated fields to
NotificationRecord for testability.

Test: runtest systemui-notification
Change-Id: If3910dc78297ad66679b1efa380315127261a018
2017-02-01 09:56:00 -05:00
Phil Weaver
7da087d87d Merge "Accessibility can capture fingerprint gestures" 2017-02-01 02:01:44 +00:00
Adam Powell
adfd62c484 Fragment grab bag!
* Fragment#isStateSaved: report whether a given fragment has been
  through state save within its given FragmentManager. This will
  additionally echo the state of its child FragmentManager, indicating
  whether it is safe to perform transactions without losing state.

* Fragment#setArguments can now be called at any time before a
  fragment's state is saved, not just before an internal index is
  assigned. This fixes an issue with assigning arguments during
  fragment inflation in some code paths.

* FragmentTransaction#postOnCommit: Add a Runnable to a
  FragmentTransaction that will be executed once the operations in the
  transaction have been fully executed. Transaction optimization may
  mean that other transaction ops could run before this is executed,
  or that specific operations from this transaction were optimized
  out. (e.g. a fragment in this transaction was added, but then
  removed in a subsequent transaction before pending operations were
  executed.) This may not be used for transactions added to the back
  stack, as we cannot persist the runnable for later to guarantee
  running it when the transaction is reversed.

Test: CTS
Change-Id: I4eb90588135e30f287c6487aa62ebda231f3dad3
2017-01-31 14:58:17 -08:00
Phil Weaver
27fcd9c97a Accessibility can capture fingerprint gestures
Bug: 27148522
Test: Unit tests for two new classes in this CL, CTS in
linked CL.
Change-Id: Icb5113e00b1f8724814263b3cc7f72fe4a6f0b41
2017-01-31 14:27:09 -08:00