Commit Graph

10164 Commits

Author SHA1 Message Date
Shreyas Basarge
69f42ecbb6 Merge "BackupAgent#getBackupQuota() API" 2017-02-13 13:46:00 +00:00
Jeff Sharkey
72ec448307 Switch RecoverableSE over to using RemoteAction.
Now that RemoteAction supports PendingIntent, we should be using it
instead of rolling our own fields.  Continue offering legacy
constructor for some existing unit tests.

Create a notification channel for each remote app that throws at a
client app.  All apps targeting O must now use channels, which give
the user better control over notifications.

Mention in docs that strings should be localized.

Test: builds
Bug: 33749182, 35012253, 34676491
Change-Id: Ic57e32025bc6caf784d3746d9f97f6595b0edb69
2017-02-12 03:21:39 -07:00
Shreyas Basarge
b6e73c9670 BackupAgent#getBackupQuota() API
This cl adds a getBackupQuota() method
to the BackupAgent abstract class. This
can be used by the agent to determine
how much data it can back up.

Ref: https://docs.google.com/document/d/18MnfwkDfKNtXQBPRmL8vpVgfLgSWJsDja1Nm1QV5hOw/edit#heading=h.unncio2r7de2

Bug: 33750400

Test: GTS test at ag/1850525

Change-Id: I2eb5c0066c99732ec84cae9211f3a1edaad2baf1
2017-02-10 18:11:40 +00:00
Julia Reynolds
71b60b86e3 Merge "Let apps link to noti settings and vice versa." 2017-02-10 16:05:10 +00:00
Stefano Tommasini
afcea28827 Merge "Add instrumentation for BackupManager during restore." 2017-02-10 15:46:06 +00:00
Stefanot
f4e237c685 Add instrumentation for BackupManager during restore.
This CL adds more instumentation to
backup/restore operation in the BackupManager. For more details please
point to:
https://docs.google.com/document/d/1sUboR28LjkT1wRXOwVOV3tLo0qisiCvzxIGmzCVEjbI/edit#
This first Cl introduces 3 events that we sent to the monitor.
The base cl is ag/1835775

Test: TODO

BUG: 34873525
Change-Id: I127fe739a7522078eecce2ae689a4607203a98da
2017-02-10 13:52:02 +00:00
Stefano Tommasini
7a1c94cc89 Merge "Add monitoring to backup in BackupManager." 2017-02-10 12:52:32 +00:00
Stefanot
b1f573dca3 Add monitoring to backup in BackupManager.
This is the first CL of many that will add instumentation to
backup/restore operation in the BackupManager. For more details please
point to:
https://docs.google.com/document/d/1sUboR28LjkT1wRXOwVOV3tLo0qisiCvzxIGmzCVEjbI/edit#
This first Cl introduces 3 events that we sent to the monitor.

Test: ag/1858962 (same topic)

BUG: 34873525

Change-Id: I6c338b6fd9f4d7c8670dac201897250b6b170677
2017-02-10 11:03:08 +00:00
Chad Brubaker
b09ac24c3c Merge "Add permission for instant apps creating foreground services" 2017-02-09 21:33:19 +00:00
Julia Reynolds
2619b5e663 Let apps link to noti settings and vice versa.
Test: manual
Change-Id: I3536099fdea1c7a8ddbe38b223fc99b9fef9197a
2017-02-09 10:09:24 -05:00
Peeyush Agarwal
651ea36f5a Merge "Extend MenuItem to allow modifier keys for shortcut" 2017-02-09 11:17:25 +00:00
TreeHugger Robot
dc8912b2bd Merge "Delay changing state of added fragments until all executed." 2017-02-08 21:32:44 +00:00
Julia Reynolds
74856c4a61 Retrieving groups shouldn't have side effects
Test: runtest systemui-notification, viewing settings
Change-Id: Ib43fe6ad2af4763b633ad1690f69d17533915dbb
2017-02-08 20:35:14 +00:00
Julia Reynolds
49f38bb487 Merge "Don't let apps permanently delete channels." 2017-02-08 19:50:49 +00:00
George Mount
a42f8e41ee Delay changing state of added fragments until all executed.
Bug 34963118

When popping multiple transactions, all added fragments
should wait until all transactions are executed before
moving their states to the final state.

This CL brings back the behavior of executing all operations
first before changing the state of added fragments. This means
that intermediate fragments won't be created when popping.

Test: I11da5229bc7104ddc683e1d7d8d929c9db3f5686
Change-Id: I472860cfe94a33db42e9a1d3727213ab5d5075e7
2017-02-08 11:26:09 -08: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
Chad Brubaker
97b383f5a5 Add permission for instant apps creating foreground services
Foreground services could potentially be abused to get around the
lifecycle requirements of Instant Apps, so limit that behavior with a
perission that will need to be granted by the installer.

Test: Manually verified
Change-Id: Ia162077971e914960ebdb8293a33faa8038ed850
2017-02-07 15:35:20 -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
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
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