Commit Graph

10470 Commits

Author SHA1 Message Date
TreeHugger Robot
d85bf7857d Merge "Method to allow testing of Loopers" 2017-03-21 23:01:04 +00:00
TreeHugger Robot
1f08e1369b Merge "Changes on Assist structure to handle virtual child for autofill:" 2017-03-21 22:52:09 +00:00
TreeHugger Robot
7105dd8bfa Merge "Shame developers that are calling hidden APIs." 2017-03-21 22:45:02 +00:00
TreeHugger Robot
e6b44f270f Merge "Allow dangerous reentrant behavior for older apps" 2017-03-21 22:40:14 +00:00
Jeff Sharkey
6f4b2a3039 Shame developers that are calling hidden APIs.
Test: builds, boots
Change-Id: Id3edf1a7890f7dbc4cff2a2699bbeabc247c6e90
2017-03-21 14:13:47 -06:00
TreeHugger Robot
709ff779e6 Merge "Improved WebView -> ViewStructure mapping for Autofill." 2017-03-21 19:49:43 +00:00
Dianne Hackborn
db1b3cfb2f Merge "Add new "storage not low" job scheduler constraint." 2017-03-21 19:27:03 +00:00
Jason Monk
5be50f7d29 Method to allow testing of Loopers
Add a wrapper object that provides some control and access to
the package hidden methods on Looper only for the purpose of
testing. Will not work on non-instrumented apps.

Test: none
Change-Id: I55cdfeac17ddc0d251852ab764501544079fc888
2017-03-21 14:24:20 -04:00
TreeHugger Robot
daa560ad77 Merge "Request logs from logd with 3s overlap to avoid missing events." 2017-03-21 17:01:33 +00:00
Pavel Grafov
4ce59d45a7 Request logs from logd with 3s overlap to avoid missing events.
Example: If we got a batch with timestamps [1, 4, 8] and an event
with timestamp 7 was delayed and was added to the buffer later,
if we request the next batch starting from timestamp 8 or 9 that
event will be lost.

The last 3 seconds of events are kept and checked against the next
batch.

Test: afw-test-tradefed-ci run afw-do-security-logging
Change-Id: I55727cfc6143c172edc7dabfd995776f9a0f7eab
Bug: 35373582
Bug: 35026180
Bug: 35648675
2017-03-21 14:52:32 +00:00
Jorim Jaggi
35e3f53a30 Also store reduced resolution screenshots
In order to speed up loading time when scrolling through it
in recents. They will be used in recents in the next CL. Also, we
use JPG instead as loading JPG is much faster than PNG.

Test: TaskSnapshotPersisterLoaderTest
Test: TaskSnapshotCacheTest
Bug: 34829962
Change-Id: I4c74b26969ae459bd3b1a42707011a49f425abd9
2017-03-21 14:58:50 +01:00
Sudheer Shanka
84a4895c9c Update AMS to wait for network state update if requested by the main thread.
Bug: 27803922
Test: runtest -c com.android.server.am.ActivityManagerServiceTest frameworks-services
      runtest -c com.android.server.am.ActivityManagerInternalTest frameworks-services
      cts-tradefed run singleCommand cts-dev --module CtsHostsideNetworkTests
      and manual
Change-Id: I7d1052b9941c1fae51ff8ab1c9b89dca3919ccd2
2017-03-21 00:22:36 -07:00
TreeHugger Robot
67bdd0f20e Merge "Fix NPE when mDecor is null on ActivityClientRecord" 2017-03-21 06:14:58 +00:00
Sudheer Shanka
4c66f8b20d Merge "Update NPMS to notify AMS when network policy rules are updated." 2017-03-21 06:13:03 +00:00
Felipe Leme
1a1e4687e4 Improved WebView -> ViewStructure mapping for Autofill.
Added setIdEntry() on ViewStructure and documented how WebView can map HTML
tags and attributes into ViewStructure.

Test: VirtualContainerActivityTest pass
Test: m update-api
Bug: 36056207

Change-Id: Idaee9612d2c1b1adac99f354c8f87137ee9ef877
2017-03-20 17:54:33 -07:00
Sudheer Shanka
e736185ee9 Update NPMS to notify AMS when network policy rules are updated.
Bug: 27803922
Test: runtest -c com.android.server.am.ActivityManagerInternalTest frameworks-services
      runtest -c com.android.server.NetworkPolicyManagerServiceTest frameworks-services

Change-Id: I357fd5c80b7e6d3e63df95397e328c52f233958b
2017-03-20 17:34:09 -07:00
Winson Chung
248278fc82 Merge "Update PiP AppOps flag to enforce all PiP functionality." 2017-03-21 00:29:05 +00:00
Winson Chung
056d2201d4 Merge "Showing notification when activity is in PiP." 2017-03-21 00:29:05 +00:00
Stephen Kiazyk
f903b739a0 Fix NPE when mDecor is null on ActivityClientRecord
It seems like this case is handled in all other instances that mDecor is
accessed, so I can only assume that this should also check for null.

Bug: 36396248
Test: Compile and run VR application, crash no longer observed.
Change-Id: I53559bd6f1b9e14f93b8f3881ba5b52b45289f65
2017-03-20 16:45:52 -07:00
Felipe Leme
f8a8174cd5 Changes on Assist structure to handle virtual child for autofill:
- Removed overloaded newChild() methods.
- Added a setAutofillId(parent, virtualId).
- Changed view so AutofillId is set on all relevant methods.

Test: VirtualContainerActivityTest (with new tests) pass
Bug: 36056207

Change-Id: Ia11344f95c2756e83307c54052878e9dbe471873
2017-03-20 16:21:41 -07:00
TreeHugger Robot
a0c5f7d869 Merge "More RecoverableSecurityException docs." 2017-03-20 22:37:25 +00:00
TreeHugger Robot
7bd4ea53e9 Merge "Allow setting a persistent VR thread." 2017-03-20 22:35:41 +00:00
Winson Chung
f4ac063f3e Update PiP AppOps flag to enforce all PiP functionality.
- Previously it only enforced whether an app could enter PiP as it was
  hiding.
- Also updating metrics constant name to reflect the change.
- Adding public OPSTR for apps to check if it the user has disabled PiP

Bug: 35957404
Test: android.server.cts.ActivityManagerPinnedStackTests
Change-Id: I979b5c6d4c85946623999ced1cfb197d830ccecb
2017-03-20 15:15:52 -07:00
TreeHugger Robot
3f1fb26bbc Merge "Batch autofill() calls to views with virtual children." 2017-03-20 22:03:25 +00:00
TreeHugger Robot
a7353961bf Merge "Add token to the resolver APIs" 2017-03-20 21:25:34 +00:00
Dianne Hackborn
532ea26c7b Add new "storage not low" job scheduler constraint.
This allows you to say that your job should run only when device
storage is not low.

Adds new command line interface to DeviceStorageMonitor to help
with driving the tests (modelled after BatteryService).

Test: new StorageConstraintTest suite.
Change-Id: I96bfb761cd8257b6f68dde43ce9cfb1a3b9d0acb
2017-03-20 13:41:08 -07:00
Jeff Sharkey
780861f245 More RecoverableSecurityException docs.
Mention convenience methods in class docs, and require a valid
NotificationChannel to be provided to match O best-practices.

Also mention that notifyChange() should be triggered when the action
is finished.

Test: builds, boots
Bug: 34676491
Change-Id: I0e6c6d43a93cbce1a5de02621290cc2ff9423274
2017-03-20 14:38:17 -06:00
Craig Donner
dc4796c209 Allow setting a persistent VR thread.
Bug: 36215076
Test: adb shell am instrument -w -e class \
android.os.SetPersistentVrThreadTest \
com.android.frameworks.coretests/\
android.support.test.runner.AndroidJUnitRunner
cts-tradefed run cts -m CtsVrTestCases -t android.vr.cts.VrSetFIFOThreadTest
Change-Id: If2f3a5f1c8593c74ac35964f68dcbe75b4da472e
2017-03-20 13:04:36 -07:00
Todd Kennedy
d3c5106940 Add token to the resolver APIs
Change-Id: Ia6d4f6d88ec265480a4dca94fe77ef42592a328c
Fixes: 35442315
Test: Build and make sure instant apps still resolve
2017-03-20 11:23:06 -07:00
Julia Reynolds
7d5b4da27f Apps must opt into using icon badges.
Test: make
Bug: 35941623
Change-Id: Ifdbbed2097228d1121f3eb03ecab9851d23a023f
2017-03-20 13:23:24 -04:00
Winson Chung
c81c0ce2e9 Showing notification when activity is in PiP.
- Adding callback to SystemUI to be notified which package entered PiP,
  and when it leaves PiP.
- Showing a BTW notification on a new PiP-specific channel.

Bug: 36070720
Test: Launch PiP, observe notification, leave PiP, observe no notification
Change-Id: Ibe10298288fe0464d7d136f2571e855f3f5c70ea
2017-03-20 10:14:47 -07:00
Jeff Sharkey
351c2c2169 Grumble, apps should check features before using.
Turns out several apps are blindly grabbing a FINGERPRINT_SERVICE
reference without checking to see if the device actually includes
that feature.

Hand pre-O apps a stubbed out Manager instance, but keep the new
ServiceNotFoundException behavior intact going forward, since it
prevents race conditions during boot or Binder service restarts.

Test: builds, boots
Bug: 32566669
Change-Id: Id1c0873e98e59b255f32e0f9204f4525a345f9ef
2017-03-18 16:48:04 -06:00
Felipe Leme
28afe0e1d8 Batch autofill() calls to views with virtual children.
This is useful in the cases where the virtual children hierarchy is rendered
by a different process.

Test: VirtualContainerActivityTest pass
Bug: 36056207
Change-Id: Id9bf3a9e9366b616dc2a6e0a204e238a2bee3a20
2017-03-18 11:25:23 -07:00
TreeHugger Robot
5469a7883d Merge "Fix NPE when config is updated before ViewRootImpl is set" 2017-03-18 01:33:12 +00:00
Andrii Kulian
ce1ecf1f34 Fix NPE when config is updated before ViewRootImpl is set
If activity received a configuration change before it had its
ViewRootImpl initialize, then there was a NPE when trying to
notify the ViewRootImpl instance about latest changes.

Bug: 36396248
Test: android.server.cts.ActivityManagerAppConfigurationTests
Test: #testLaunchWithUiModeChange
Test: Launch AndroidAuto app
Change-Id: I71e0f316f885a30dadce388bbd3d9f21f419076b
2017-03-17 16:54:34 -07:00
Adam Lesinski
10eb1455b9 Merge changes from topic 'configForSplit'
* changes:
  libandroidfw: Search all packages for an identifier
  AAPT2: Finish support for feature splits
  Add support for configForSplit
2017-03-17 23:19:13 +00:00
TreeHugger Robot
741a898514 Merge "Adding an extras Bundle to MessagingStyle messages." 2017-03-17 19:38:02 +00:00
TreeHugger Robot
9f7958c17f Merge "Disable large-ish parcel logging." 2017-03-17 17:57:30 +00:00
TreeHugger Robot
2fb89f45b9 Merge "Removed 'virtual' from autofill method names." 2017-03-17 17:54:37 +00:00
TreeHugger Robot
6e4075bde6 Merge "Adding enabled state for remote actions." 2017-03-17 17:51:45 +00:00
Jeff Sharkey
f5299f1b88 Disable large-ish parcel logging.
This logging was originally added to track down very large log
messages that were causing Binder transactions to fail.  We fixed
a handful of bugs that could have been causing this over in 32575987,
so this logging should no longer be needed in live builds.  (In fact,
this logging is being triggered often enough to push other important
debugging information out of logs.)

Test: builds, boots
Bug: 36372780
Change-Id: I640192fbec35693673a2f22b7a82ce54f27937da
2017-03-17 10:25:10 -06:00
Felipe Leme
81f01d9efd Removed 'virtual' from autofill method names.
Fixes: 36126001
Test: VirtualContainerActivityTest pass

Change-Id: I3b8fe835cd7c7f39c8e2cb8f2daca71b03236a1f
2017-03-17 09:09:31 -07:00
Andrii Kulian
c1b59ed73e Merge "Separate global and override config sent to client" 2017-03-17 15:39:37 +00:00
liangweikang
5a2c5a3bd9 Merge "[BUG] fix NullPointerException in Notification.java" am: c14d5db093 am: 79e9f380e2
am: 9b0784aa5f

Change-Id: I41f9d2d027138360d3a967c97dbf3aed69512650
2017-03-17 15:07:50 +00:00
liangweikang
9b0784aa5f Merge "[BUG] fix NullPointerException in Notification.java" am: c14d5db093
am: 79e9f380e2

Change-Id: Ic9356edc395f68c5dda5a19a2efca31b5f16a068
2017-03-17 14:57:55 +00:00
liangweikang
79e9f380e2 Merge "[BUG] fix NullPointerException in Notification.java"
am: c14d5db093

Change-Id: Ib1c17e2fe5f36e0230845ca123b0cd2cb7365154
2017-03-17 14:51:58 +00:00
liangweikang
63b03b573f [BUG] fix NullPointerException in Notification.java
https://code.google.com/p/android/issues/detail?id=252835

Test: null

Change-Id: I6c575686c75b02ac938f35622b522fff25403c29
Signed-off-by: liangweikang <liangweikang900911@gmail.com>
2017-03-17 02:59:49 +00:00
Andrii Kulian
446079600e Separate global and override config sent to client
There is some flakiness in View#onConfigurationChanged callback -
if ViewRootImpl receives config update earlier than ActivityThread,
it may not detect the configuration change and skip inner updates.
Also now ViewRootImpl assumes that it receives the global config as
a param, but instead it gets merged config from WM. This means that
ViewRootImpl#sConfigCallbacks was sending incorrect values to the
recipients.

This CL switches to sending global and override configuration to the
client separately. Also in case if there is a corresponding activity,
it first updates it and waits for update callback to ViewRootImpl.
This way global config and override config for activity will always
be set first and resources will be updated before inner state of
ViewRootImpl is updated.

Bug: 35870157
Bug: 34164473
Test: android.server.cts.ActivityManagerDisplayTests
Test: testOnMovedToDisplayCallback
Change-Id: Ic9e7541cf25ecfac6ec90e48f7efb0ece91f657e
2017-03-16 19:13:02 -07:00
Winson Chung
6b88baf1e8 Adding enabled state for remote actions.
- Actions can specify whether they are enabled (default) or disabled, and
  SystemUI will reflect the state in the PiP actions.

Bug: 36363677
Test: Expand pip with dismissed action
Change-Id: I36994868f82d8ba0fc87947a722d9f20b39425a1
2017-03-16 18:05:30 -07:00
Adam Lesinski
1665d0f028 Add support for configForSplit
Applications with the android:isolatedSplits="true" attribute in
their AndroidManifest.xml would have their Split APKs loaded in
isolation of each other, based on a set of dependencies.

Configuration Splits generated for a Feature split would not be properly
loaded before, so this change, along with a tools change, fixes this
issue and completes support for isolatedSplits.

Bug: 30999713
Test: CTS test coming (depends on some tool changes)
Change-Id: Ia4e7b0e69168a9d6637867558e306f7031720fb3
2017-03-16 15:45:10 -07:00