312426 Commits

Author SHA1 Message Date
Karthik Ravi Shankar
ebc1b48922 Allow shell uid to access Vr APIs
Some of the Vr APIs in VrManagerService need to be accessed via shell to
be used for testing and for easy access. Add
android.permission.RESTRICTED_VR_ACCESS to shell uid.

Bug: 36071574
Test: adb shell vr set-persistent-vr-mode-enabled true
      adb shell dumpsys vrmanager
      >> Persistent VR mode is currently: enabled
      adb shell vr set-persistent-vr-mode-enabled false
      adb shell dumpsys vrmanager
      >> Persistent VR mode is currently: disabled

Change-Id: I486fa19f93d5c6999aa479fdf7e5f2f48f765240
Signed-off-by: Karthik Ravi Shankar <karthikrs@google.com>
2017-03-31 08:37:13 -07:00
Karthik Ravi Shankar
74db2a3667 Add vr persistent mode enable/disable
Persistent vr mode toggle control is needed sometimes from command line.
This also adds the infrastructure for future vr commands.

Bug: 36071574
Test: adb shell vr set-persistent-vr-mode-enabled true
      adb shell dumpsys vrmanager
      >> Persistent VR mode is currently: enabled
      adb shell vr set-persistent-vr-mode-enabled false
      adb shell dumpsys vrmanager
      >> Persistent VR mode is currently: disabled

Change-Id: I47a858e0696a907e746d50e2c6ca3d18197864a7
Signed-off-by: Karthik Ravi Shankar <karthikrs@google.com>
2017-03-31 08:37:12 -07:00
Karthik Ravi Shankar
99493dbc94 Launch 2D activities in VR mode
When in VR mode, launch all activities into the virtual display ID as
provided by the Compatibility display. This includes two cases -

- New activity launches
- Existing activity in the background.

Testing Done: Tested with PlanarVirtualDisplay app and Settings,
Calculator and GestureApp with different intent flags.

Bug: 36071574
Bug: 36071445
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testVrActivityLaunch
Test: #testVrActivityReLaunch

Change-Id: Ic590a7cbd6f9b339dc83b22a8ffb1252219ef22e
Signed-off-by: Karthik Ravi Shankar <karthikrs@google.com>
2017-03-31 08:37:05 -07:00
Jason Monk
ae39cb9c60 Fix tuner sub-screens attach
Seems that when preferences are attached has changed, so we need to
make sure any sub preference screense explicitly own their preferences.

Test: manual
Change-Id: Id28c30367417fc7dbe74c3970a8e19a031ea6d8d
Fixes: 36766199
2017-03-31 11:31:25 -04:00
Wyatt Riley
87206c4ed8 Merge "IGnssDebug.hal change field outputs for dump()" into oc-dev 2017-03-31 15:28:21 +00:00
Mark Renouf
270e4953d2 Corrects CompactExtractEditLayout to account for systemWindowInsetBottom am: d1a0d19794
am: 8f9a6c3e89

Change-Id: I10087b9982b3eceb200b447d4faecad4eb8d19fe
2017-03-31 15:20:24 +00:00
Mark Renouf
8f9a6c3e89 Corrects CompactExtractEditLayout to account for systemWindowInsetBottom
am: d1a0d19794

Change-Id: Ia0bdc13ac2e8f3e65aaa38a64b4af9409ffeaa21
2017-03-31 15:15:49 +00:00
Tyler Gunn
3d9286e650 Merge "Self Managed CS Implementation" into oc-dev 2017-03-31 15:06:47 +00:00
TreeHugger Robot
774b1f1f37 Merge "Split scroll factor into a 2d float." into oc-dev 2017-03-31 14:54:45 +00:00
Jason Monk
6eb906ecc3 Fix losing status bar icons on config changes
The DarkIconManager was not correctly calling set when icons
were added, leaving them blank after a config change until a new
set came in.

Do some refactoring to fix this and make it more testable.

Test: runtest systemui
Change-Id: I0b231021f2ce7d82a3f84ebb281b4e4fc902a0aa
Fixes: 35367550
2017-03-31 10:53:29 -04:00
Diego Perez
51b4387ae0 Revert "Layoutlib changes to support the new ResourceUrl"
This reverts commit 9fb4d6876a78fb336cb3650aca84bce723f96ecb.

Test: N/A
Change-Id: I57a09c6f011b8d8c9c2d054b03536e0a6fcc5688
(cherry picked from commit a4e82144b26ee50fca2739abc4f6c7111dc2f3cb)
2017-03-31 13:46:26 +00:00
Jason Monk
213eb4f162 Add test API for if the device supports QS
Test: cts-tradefed run cts-dev -m CtsSystemUiHostTestCases
Change-Id: Ib2dbbab8c4d0b7bae912f29f417e7e245bfd5b71
Fixes: 36363728
2017-03-31 09:26:27 -04:00
Anton Philippov
537fd18eaf Merge "Fix BackupManagerMonitor wrapping in RestoreSession" into oc-dev 2017-03-31 10:43:28 +00:00
Bill Yi
b12c4e6435 Import translations. DO NOT MERGE
Change-Id: Ic5ddb29c72414f5b06e61f9bb13b69489b2ac715
Auto-generated-cl: translation import
2017-03-31 02:03:59 -07:00
Bill Yi
a06a809423 Import translations. DO NOT MERGE
Change-Id: I0464cc4b75e0258a5928867ab11e9c47a2b69319
Auto-generated-cl: translation import
2017-03-31 00:57:17 -07:00
Bill Yi
8e79b3a9a0 Import translations. DO NOT MERGE
Change-Id: I789e7f6f9910fb2bfceec085555a42335853f1dd
Auto-generated-cl: translation import
2017-03-31 00:39:13 -07:00
Bill Yi
c14149a06a Import translations. DO NOT MERGE
Change-Id: I77938df9a45d62d2abf436670857c2a594b1533b
Auto-generated-cl: translation import
2017-03-31 00:29:46 -07:00
Brian Carlstrom
90d1e363ed Include likely IMEs in ANR dumping
Test: Start IME, induce ANR in Settings, verify /data/anr/traces.txt
Bug: 36704599
Change-Id: I5e6209ec25754bd27c57c58b27edeee38eb005de
2017-03-31 07:27:07 +00:00
Bill Yi
d191f97e4e Import translations. DO NOT MERGE
Change-Id: If706aae048d361a966f9971dce0595640b7052ce
Auto-generated-cl: translation import
2017-03-31 00:16:54 -07:00
TreeHugger Robot
f9533e7b4d Merge "TextClassificationManager API cleanup." into oc-dev 2017-03-31 04:29:27 +00:00
Hugo Benichi
938ab4fa39 Move back networking policy logic into NetworkPolicyManagerService
This patch removes from ConnectivityService the logic involved in
deciding if a uid has access to networking based on networking policies.

This logic is moved into NetworkPolicyManagerService which is the source
of truth with regards to the state of networking policie, both for
existing networks and uids.

Instead ConnectivityService directly queries NetworkPolicyManagerService
in a synchronous fashion for a specific uid or a (uid, network) pair.

This eliminates the need to keep a copy of the uid policy rules inside
ConnectivityService and ensures that ConnectivityService takes
networking decisions based on the correct state of networking policies,
and therefore eliminates certain data races in ConnectivityManager API
that applications are exposed to.

Test: $ runtest frameworks-net
      $ runtest -x frameworks/base/services/tests/../NetworkPolicyManagerServiceTest.java
      $ runtest -c com.android.server.net.ConnOnActivityStartTest frameworks-services
Bug: 32069544, 30919851
Change-Id: Ic75d4f7a8853e6be20e51262c4b59805ec35093a
2017-03-31 13:28:45 +09:00
Tyler Gunn
dd8756d514 Self Managed CS Implementation
- Add API guide for developers giving an overview of what they need
to implement.
- Add @hide setLabel method in PhoneAccount; used when registering a
self-managed CS's phone account; we override it with their app label to
ensure they don't try to give themselves another name.

Test: Unit
Bug: 34159263
Merged-In: I0c890dc2feeb3ee438a80ed425db2aaf1f4c1fdd
Change-Id: I0c890dc2feeb3ee438a80ed425db2aaf1f4c1fdd
2017-03-30 21:28:19 -07:00
TreeHugger Robot
6ccaf9061a Merge "Fixes starting app in docked stack for cts tests" into oc-dev 2017-03-31 03:38:39 +00:00
TreeHugger Robot
817e838b16 Merge "Refactored ViewState." into oc-dev 2017-03-31 03:29:45 +00:00
TreeHugger Robot
040a3913fd Merge "Pass correct size of integer to CallVoidMethod." into oc-dev 2017-03-31 03:26:10 +00:00
TreeHugger Robot
c7f474668e Merge "Override View.autofill() method and call into ViewDelegate" into oc-dev 2017-03-31 02:57:38 +00:00
Sudheer Shanka
670e750b2e Merge "Change namespace of ACTION_REQUEST_SHUTDOWN." into oc-dev 2017-03-31 01:54:56 +00:00
Adrian Roos
6e782a5e4e A11y: Prefer EXTRA_TITLE to ticker for status bar icon content description
Change-Id: I08d5439f0f593d32044d5a59fc7b8f24e33a15a9
Test: manual - post notification, check that Talkback utterance is correct on status bar icon.
Fixes: 30739573
2017-03-30 18:54:01 -07:00
Sudheer Shanka
218190a3c9 Change namespace of ACTION_REQUEST_SHUTDOWN.
Fixes: 36644580
Test: cts-tradefed run singleCommand cts-dev -m CtsSignatureTestCases -t android.signature.cts.IntentTest
      and Device power-off works
Change-Id: I63f461157a63305cd08c5dc42293730be4eb657f
2017-03-30 18:53:29 -07:00
Wyatt Riley
268c6e0485 IGnssDebug.hal change field outputs for dump()
Aligning the dump() string build to match the new
API fields in IGnssDebug.hal

Bug: 30955615
Test: Builds and non-implementation message reported on Pixel '16

Change-Id: I9e60c87e9c5a5ee2bc20e3f54eb878bd472515c1
2017-03-30 18:42:57 -07:00
TreeHugger Robot
1a098cf62b Merge "Rename autoFillHint to autoFillHints." into oc-dev 2017-03-31 01:41:45 +00:00
TreeHugger Robot
ef06d620bc Merge "Import translations. DO NOT MERGE" into oc-dev 2017-03-31 01:32:23 +00:00
Matthew Ng
0e2056057b Fixes starting app in docked stack for cts tests
Running command "adb shell am start -n <package/activity name> --stack 3"
will allow the app to be docked at the top in split screen and will not
minimize and be positioned incorrectly. Passing the last stack will pass
the stack that was launched from, in this case it is home stack. Then it
will launch recents after app is launched.

Test: adb shell am start -n <package/activity name> --stack 3 and
cts/hostsidetests/services/activityandwindowmanager/util/run-test
CtsServicesHostTestCases
android.server.cts.ActivityManagerAppConfigurationTests
Fixes: 36233172
Change-Id: Ibe171be9160f9070395ac20f5369dc495f235f20
2017-03-31 01:29:19 +00:00
TreeHugger Robot
0fd4284b29 Merge "Make ACTION_USER_REMOVED intent a SystemApi." into oc-dev 2017-03-31 01:27:26 +00:00
Daichi Hirono
f8708a026c Pass correct size of integer to CallVoidMethod.
Previously FuseAppLoop passes int values 0 to CallVoidMethod while the
argument must be jlong.

Bug: 35229514
Test: StorageManagerTest#testOpenProxyFileDescriptor{,_error,_async}
Change-Id: Id286d38da54b4523c63f2b380596e0de06887b3a
(cherry picked from commit 77a97cdba2903a6534fcabc1b8bc79b51aef54f5)
2017-03-31 01:24:22 +00:00
Felipe Leme
0f9464e172 Refactored ViewState.
- Added an int state.
- Removed mValueChanged and use state.
- Removed unused mAuth
- Set its Fillresponse in the proper places.
- Encapsulated private attributes.
- ...except mId (which is now id).
- Stored only id of current view state on Session.

This refactoring didn't modidy any behavior - in fact, the CTS tests didn't
change - but it will make it much easier to implement partitioning.

BUG: 35707731
Test: CtsAutoFillServiceTestCases pass

Change-Id: Ib07929a4089201a0e5bb66004af91f6cba362ba4
2017-03-30 18:17:08 -07:00
Abodunrinwa Toki
802144cca4 TextClassificationManager API cleanup.
Removes @removed methods.
See: I24e86272cf58bf6864505bee3b06978c1c0d46e5

Test: Checked that API is removed.
Change-Id: I93e7f64740671b5ff856f8b38eddc04417f6486e
2017-03-31 02:15:28 +01:00
Sudheer Shanka
166a81b3a3 Make ACTION_USER_REMOVED intent a SystemApi.
Fixes: 36645106
Test: cts-tradefed run singleCommand cts-dev -m CtsSignatureTestCases -t android.signature.cts.IntentTest
Change-Id: I4230791df73549f147dc048d152a05e9eed5bc63
2017-03-30 18:12:39 -07:00
TreeHugger Robot
1284be68e8 Merge "Fix issue with force resizing activity when app level doesn't want to" into oc-dev 2017-03-31 01:02:00 +00:00
Garfield Tan
ce1d0e9459 Add flags for quick viewer to indicate capabilities of a document.
Replace the QUICK_VIEW_ADVANCED extra.

Also restrict quick viewers not to send file content out of the device.

Test: It builds.
Bug: 36484539
Bug: 36755024
Change-Id: I921230eac6e497a615624202c741ef03432b2690
2017-03-30 17:50:53 -07:00
TreeHugger Robot
279997c435 Merge "Don't run jobs when connectivity is not validated" into oc-dev 2017-03-31 00:47:42 +00:00
TreeHugger Robot
554c5946ce Merge "Fix broken unit tests due to mockito upgrade." into oc-dev 2017-03-31 00:41:04 +00:00
Sohani Rao
7b38b035f5 Introduce Authentication Failure reason codes
In order to differentiate between various reasons for authentication
failure, add reason codes. These will be hidden since we don't intend to
have API change.

Bug: 33245941
Test: Unit test
Change-Id: I7222520df18e54d684ba9e50ff95be5d46a7d70c
2017-03-30 17:31:23 -07:00
Mady Mellor
60421c9d45 Update PIP dismiss to show scrim + info text at the bottom of the screen
- Rather than testing how far off screen the PIP is, instead tests how far
  past the nav bar / on screen bars the PIP is to determine if it is a
  dismiss
- When dragging PIP around screen, display info text + scrim at bottom
  these are above the PIP in z-order
- On lift up or when PIP is dismissed, info text + scrim also hide
- Alters dismiss animation to use end point on trajectory of finger and
  use FlingAnimationUtils when flinging

Test: Drag PIP around screen, notice dismiss scrim + text appear, dismiss
      PIP and scrim / text also disappear
Bug: 35358628
Change-Id: Ibc0f6a884903f7d1b3ca2fd5c20647b4acf15a71
2017-03-30 17:30:38 -07:00
Connor O'Brien
0ecd08bdd0 Recover cleanly from power HAL service crashes
Currently if the binderized power HAL service crashes, services that
call the HAL will crash as well. To fix this:
- Before calling power HAL functions, check that the handle to the
  power HAL service is still valid, and reload using getService() if
  necessary.
- When a call to a power HAL function fails, log the failure and mark
  the handle as invalid.

Bug: 35728909
Test: adb shell kill -9 $(adb shell pidof android.hardware.power@1.0-service)
Change-Id: Id2dd1a6507b9f5044d928483cdb6b736c701f8ba
Signed-off-by: Connor O'Brien <connoro@google.com>
(cherry picked from commit 578eb7fee3a28ff9ca309e741b5a647637896ba1)
2017-03-31 00:24:00 +00:00
Christopher Tate
7e1368d9b2 Add 'am start-foreground-service' shell command
Bug 35263881
Test: manual

Change-Id: Ia97415eee610e67d4c0a5dc6adaf01909dcbdbd1
2017-03-30 17:20:12 -07:00
TreeHugger Robot
7a0fef9324 Merge "BatteryStats: Add debug logging to narrow down slow camera launch" into oc-dev 2017-03-31 00:00:39 +00:00
TreeHugger Robot
d47e192d7c Merge "Temporarily bg-whitelist the default container package-cleaning service" into oc-dev 2017-03-30 23:58:00 +00:00
Daniel Nishi
8ebf40498f Use KB instead of kB.
Change-Id: Icb4e7cefa72bee63e37ddb462b571cf74b304bc9
Fixes: 36496960
Test: Manual
2017-03-30 16:55:56 -07:00
Chris Tate
4a0e84b454 Merge "Reschedule jobs that crash partway through" into oc-dev 2017-03-30 23:46:39 +00:00