Commit Graph

6537 Commits

Author SHA1 Message Date
Alan Viverette
04c801cc6a Merge changes from topic "viewpager_state" into nyc-mr1-dev
* changes:
  [automerger] Update internal ViewPager's SavedState to match Support Library version am: 187964aca1 am: 4c24e4d831 am: fece305de0 am: cb362192e8 am: bc42f76941 am: c42091667c
  [automerger] Update internal ViewPager's SavedState to match Support Library version am: 187964aca1 am: 4c24e4d831 am: fece305de0 am: cb362192e8 am: bc42f76941
  [automerger] Update internal ViewPager's SavedState to match Support Library version am: 187964aca1 am: 4c24e4d831 am: fece305de0 am: cb362192e8
  [automerger] Update internal ViewPager's SavedState to match Support Library version am: 187964aca1 am: 4c24e4d831 am: fece305de0
  [automerger] Update internal ViewPager's SavedState to match Support Library version am: 187964aca1 am: 4c24e4d831
  [automerger] Update internal ViewPager's SavedState to match Support Library version am: 187964aca1
  Update internal ViewPager's SavedState to match Support Library version
2018-03-09 18:43:02 +00:00
Android Build Merger (Role)
e0b5c2d25e [automerger] Verify last array's length in readFromParcel am: 3b8bc2e450 am: 71478241eb
Change-Id: I5fb0625286289c43644612528d25fb3f90f6ec7b
2018-02-21 20:27:01 +00:00
Android Build Merger (Role)
71478241eb [automerger] Verify last array's length in readFromParcel am: 3b8bc2e450
Change-Id: If09aad1fa86dbc5c6223d06f67b81d45660ca2d3
2018-02-21 20:26:56 +00:00
Fyodor Kupolov
3b8bc2e450 Verify last array's length in readFromParcel
Length of the last array in readFromParcel should be the same as
value of mNextIndex.

Test: PoC app in the bug
Bug: 73252178
Change-Id: I69f935949e945c3a036b19b4f88684d906079ea5
2018-02-21 20:26:52 +00:00
Android Build Merger (Role)
aebf5c06df [automerger] Update internal ViewPager's SavedState to match Support Library version am: 187964aca1 am: 4c24e4d831 am: fece305de0 am: cb362192e8 am: bc42f76941 am: c42091667c
Change-Id: Ia150bf95186b1a7acdec0d723d44f33040951f56
2018-02-16 19:46:03 +00:00
Android Build Merger (Role)
c42091667c [automerger] Update internal ViewPager's SavedState to match Support Library version am: 187964aca1 am: 4c24e4d831 am: fece305de0 am: cb362192e8 am: bc42f76941
Change-Id: Id69b35c6cc53b6cea1666d724813ae21634c0b4c
2018-02-16 19:45:57 +00:00
Android Build Merger (Role)
bc42f76941 [automerger] Update internal ViewPager's SavedState to match Support Library version am: 187964aca1 am: 4c24e4d831 am: fece305de0 am: cb362192e8
Change-Id: Ie379f04b1e570ebc94a9e5c37ab3ddbf469acb93
2018-02-16 19:45:41 +00:00
Android Build Merger (Role)
cb362192e8 [automerger] Update internal ViewPager's SavedState to match Support Library version am: 187964aca1 am: 4c24e4d831 am: fece305de0
Change-Id: Ie54af74e2ab273be07c4cd73881010ee952997ef
2018-02-16 19:45:36 +00:00
Android Build Merger (Role)
fece305de0 [automerger] Update internal ViewPager's SavedState to match Support Library version am: 187964aca1 am: 4c24e4d831
Change-Id: I33e06bfcad6941fd8845f443991dfbcbd4167348
2018-02-16 19:45:30 +00:00
Android Build Merger (Role)
4c24e4d831 [automerger] Update internal ViewPager's SavedState to match Support Library version am: 187964aca1
Change-Id: Ia2d011a3e2c705e82ab11dbf571f6f52cf05bae8
2018-02-16 19:45:24 +00:00
Alan Viverette
187964aca1 Update internal ViewPager's SavedState to match Support Library version
Merged-In: Ic4569b21d8a26a62bba91742b442f0c3ea8bcc9e
Change-Id: I17d085be9ce1a139e75264f1e715df7f565cd41b
Fixes: 71992105
Test: manual
2018-02-16 14:45:05 -05:00
Android Build Merger (Role)
4af59f1c97 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f am: 4405b0ced2 am: b3012285e2 am: ab36ba8483
Change-Id: Ie3d39f4c402d3385f45aca01059f03ef4025855f
2018-02-07 08:18:44 +00:00
Android Build Merger (Role)
ab36ba8483 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f am: 4405b0ced2 am: b3012285e2
Change-Id: I76a950ed4296cad67230c36ee9edc0b7cc905c60
2018-02-07 08:18:37 +00:00
Android Build Merger (Role)
b3012285e2 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f am: 4405b0ced2
Change-Id: I7c984a83858ee5bb0b84d122dac27e0273f0a177
2018-02-07 08:18:22 +00:00
Android Build Merger (Role)
4405b0ced2 [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d am: 83cb35453f
Change-Id: Ib6d585953a35d3d00ab51144af7639c851ac3d72
2018-02-07 08:18:15 +00:00
Android Build Merger (Role)
83cb35453f [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888 am: 0231bc4d6d
Change-Id: I060b6306f3f53b4497b6a19d7221aa1938e66f55
2018-02-07 08:18:09 +00:00
Android Build Merger (Role)
0231bc4d6d [automerger] Fix VerifyCredentialResponse parcelling code am: 54813e9888
Change-Id: Ib1b60818cddeefe3031cf6c9880f5b790775aa62
2018-02-07 08:18:02 +00:00
Rubin Xu
54813e9888 Fix VerifyCredentialResponse parcelling code
There was an asymmetry between parcelling and unparcelling of
VerifyCredentialResponse that could lead to type confusion if
packed with other objects in a Parcel.

Test: none
Bug: 71714464
Change-Id: Icff68879e249422ccca49f2bb7db85c35b4cb353
2018-02-07 08:17:06 +00:00
Nick Kralevich
3946a75cb3 ZygoteInit: Remove CAP_SYS_RESOURCE am: 4911af2b8c am: 1cc9ec47c8 am: 8965cd6a39 am: 47beaa8fab am: 55c8a1ede9 am: 66a08a5413 am: 7a06357519 am: a07389b446
am: 5f4382e2a6

Change-Id: Ieab172a133b0d9198cef008b037c4a1107d0746c
2017-05-23 00:18:31 +00:00
Nick Kralevich
02f0044d98 system_server: add CAP_SYS_PTRACE am: 966619d0ab am: b8d972e973 am: c46889e2d2 am: f5bd84b82d am: 982b8018af am: 7fd2d8ea31 am: 5bfe82c3ee am: 12c5f0da9f
am: dc87ac995a

Change-Id: Ic7e65852a72cde3d2e285774e9cb85e9590e7fd2
2017-05-23 00:17:22 +00:00
Nick Kralevich
5f4382e2a6 ZygoteInit: Remove CAP_SYS_RESOURCE am: 4911af2b8c am: 1cc9ec47c8 am: 8965cd6a39 am: 47beaa8fab am: 55c8a1ede9 am: 66a08a5413 am: 7a06357519
am: a07389b446

Change-Id: I5e8fdff89b3d8d1e36f24767dc60efa1dc352dcb
2017-05-23 00:07:43 +00:00
Nick Kralevich
dc87ac995a system_server: add CAP_SYS_PTRACE am: 966619d0ab am: b8d972e973 am: c46889e2d2 am: f5bd84b82d am: 982b8018af am: 7fd2d8ea31 am: 5bfe82c3ee
am: 12c5f0da9f

Change-Id: I8ce1d6a2399967cf0408adf7ffbe1839f471e1e7
2017-05-23 00:06:55 +00:00
Nick Kralevich
a07389b446 ZygoteInit: Remove CAP_SYS_RESOURCE am: 4911af2b8c am: 1cc9ec47c8 am: 8965cd6a39 am: 47beaa8fab am: 55c8a1ede9 am: 66a08a5413
am: 7a06357519

Change-Id: I9301189268f519d4b87d8c9bfa88d1da4e8a53cd
2017-05-22 23:51:48 +00:00
Nick Kralevich
12c5f0da9f system_server: add CAP_SYS_PTRACE am: 966619d0ab am: b8d972e973 am: c46889e2d2 am: f5bd84b82d am: 982b8018af am: 7fd2d8ea31
am: 5bfe82c3ee

Change-Id: I95333a7ff3d6ee1a3161d436a2a0b312931b663e
2017-05-22 23:50:57 +00:00
Nick Kralevich
7a06357519 ZygoteInit: Remove CAP_SYS_RESOURCE am: 4911af2b8c am: 1cc9ec47c8 am: 8965cd6a39 am: 47beaa8fab am: 55c8a1ede9
am: 66a08a5413

Change-Id: Ica5cb7828a37bd597dc0d83f7a65e89380d1e31c
2017-05-22 23:36:12 +00:00
Nick Kralevich
5bfe82c3ee system_server: add CAP_SYS_PTRACE am: 966619d0ab am: b8d972e973 am: c46889e2d2 am: f5bd84b82d am: 982b8018af
am: 7fd2d8ea31

Change-Id: I4b57d119b9b8d512a017ede0fb62658fb25f9580
2017-05-22 23:35:04 +00:00
Nick Kralevich
66a08a5413 ZygoteInit: Remove CAP_SYS_RESOURCE am: 4911af2b8c am: 1cc9ec47c8 am: 8965cd6a39 am: 47beaa8fab
am: 55c8a1ede9

Change-Id: Ia3e4d749c5b5475640325fd47eb4260d52e61365
2017-05-22 23:19:09 +00:00
Nick Kralevich
7fd2d8ea31 system_server: add CAP_SYS_PTRACE am: 966619d0ab am: b8d972e973 am: c46889e2d2 am: f5bd84b82d
am: 982b8018af

Change-Id: I8cb5052694668ee8021f75778244e4d1b6cc3bb5
2017-05-22 23:18:24 +00:00
Nick Kralevich
55c8a1ede9 ZygoteInit: Remove CAP_SYS_RESOURCE am: 4911af2b8c am: 1cc9ec47c8 am: 8965cd6a39
am: 47beaa8fab

Change-Id: Ie697e5e8bfb7664b410d564a84ae5784be890f90
2017-05-22 23:02:54 +00:00
Nick Kralevich
982b8018af system_server: add CAP_SYS_PTRACE am: 966619d0ab am: b8d972e973 am: c46889e2d2
am: f5bd84b82d

Change-Id: I163a9224d6b0ff5f42f52656773e1c297661b977
2017-05-22 23:02:13 +00:00
Nick Kralevich
47beaa8fab ZygoteInit: Remove CAP_SYS_RESOURCE am: 4911af2b8c am: 1cc9ec47c8
am: 8965cd6a39

Change-Id: If549cda5fd1a640fee746311745b9b08ebf63b91
2017-05-22 22:46:18 +00:00
Nick Kralevich
f5bd84b82d system_server: add CAP_SYS_PTRACE am: 966619d0ab am: b8d972e973
am: c46889e2d2

Change-Id: I840740012d9ba0c434f7de0fd9ca83a44926d018
2017-05-22 22:45:44 +00:00
Nick Kralevich
8965cd6a39 ZygoteInit: Remove CAP_SYS_RESOURCE am: 4911af2b8c
am: 1cc9ec47c8

Change-Id: Ic81685686dabbc1f0004a30785a021bf89420846
2017-05-22 22:24:39 +00:00
Nick Kralevich
c46889e2d2 system_server: add CAP_SYS_PTRACE am: 966619d0ab
am: b8d972e973

Change-Id: I4d9e2d9b53523b9182a9f9272d06a93a87b0c61b
2017-05-22 22:23:47 +00:00
Nick Kralevich
1cc9ec47c8 ZygoteInit: Remove CAP_SYS_RESOURCE
am: 4911af2b8c

Change-Id: I4aa46981edb8fd711e1aec8c889528e596e5c233
2017-05-22 22:05:18 +00:00
Nick Kralevich
b8d972e973 system_server: add CAP_SYS_PTRACE
am: 966619d0ab

Change-Id: Ie5f95f2c078cd0bec7a2b2321c3303301ec9ec74
2017-05-22 22:04:57 +00:00
Nick Kralevich
4911af2b8c ZygoteInit: Remove CAP_SYS_RESOURCE
Please see commit 3082eb7c72 for an
explanation of this change.

This capability is not used by system_server.

Bug: 34951864
Bug: 38496951
Test: code compiles, device boots, no selinux errors ever reported.
Change-Id: I4242b1abaa8679b9bfa0d31a1df565b46b7b3cc3
(cherry picked from commit 35775783fc)
2017-05-22 12:19:29 -07:00
Nick Kralevich
966619d0ab system_server: add CAP_SYS_PTRACE
Commit https://android.googlesource.com/kernel/common/+/f0ce0eee added
CAP_SYS_RESOURCE as a capability check which would allow access to
sensitive /proc/PID files. system_server uses this capability to collect
smaps from managed processes. Presumably this was done to avoid the
implications of granting CAP_SYS_PTRACE to system_server.

However, with SELinux enforcement, we can grant CAP_SYS_PTRACE but not
allow ptrace attach() to other processes. The net result of this is that
CAP_SYS_PTRACE and CAP_SYS_RESOURCE have identical security controls, as
long as system_server:process ptrace is never granted.

Add CAP_SYS_PTRACE to the set of capabilities granted to system_server.

Don't delete CAP_SYS_RESOURCE for now. SELinux has blocked the use of
CAP_SYS_RESOURCE, but we still want to generate audit logs if it's
triggered. CAP_SYS_RESOURCE can be deleted in a future commit.

Bug: 34951864
Bug: 38496951
Test: Device boots, functionality remains identical, no sys_resource
denials from system_server.
Change-Id: I2570266165396dba2b600eac7c42c94800d9c65b
(cherry picked from commit 3082eb7c72)
2017-05-22 11:28:48 -07:00
Andrew Scull
eb35ad9969 resolve merge conflicts of ad4aa1ce7d to nyc-mr1-dev
Change-Id: I97ef31536cd06495a08a3f94f81df2d1376186e0
2017-01-13 15:28:36 +00:00
Andrew Scull
ad4aa1ce7d resolve merge conflicts of e4cefbf4fc to nyc-dr1-dev
Change-Id: Ib536a33ba381c28397320edd516d52727e5bdacc
2017-01-13 13:16:09 +00:00
Andrew Scull
e4cefbf4fc Don't save password metrics to disk.
On FBE devices, don't save the metrics to disk but compute them when the
password is first entered and only store them in RAM.

Merged-in: 5daf273b7e
Bug: 32793550
Change-Id: Icee7f615167761177b224b342970a36c7d90f6ba
2017-01-12 16:01:59 +00:00
Selim Cinek
b8a7f78d24 Fixed a bug with the emergency affordance in multi user
The emergency call was not launched in the current user
and therefore was only launching once the user had switched.

Change-Id: If6f3bcf77d88a0658b6e0f91f7e4da5d6264b04f
Fixes: 32424103
Test: manual: switch to secondary user and launch emergency affordance
2016-11-14 23:00:24 +00:00
Adrian Roos
b7e4e10618 Separate ambient display triggers
Allows configuring notification and sensor triggers
separately. Introduces a helper class that hosts the
logic for determining what kinds of triggers a device
supports.

Bug: 32073185
Change-Id: Ie7e8eb6b895dcc54e6f972e70642c7248b9e223a
Test: disable "ambient display", sensor triggers should still work
2016-10-18 10:43:44 -07:00
Yohei Yukawa
93278ca144 Handle exceptions from #requestPermission()
This is a follow up CL to my previous CL [1] that let
IInputConnectionWrapper to call InputContentInfo#requestPermission()
automatically so that temporary URI permissions can be granted
automatically on API 25+ devices whenever
INPUT_CONTENT_GRANT_READ_URI_PERMISSION is specified.

However, in that CL we forgot to handle exceptions thrown from
InputContentInfo#requestPermission().  This is problematic because it is
actually easy for IMEs to cause SecurityException by specifying a
content URI that does not allow grantUriPermission, e.g.:

  inputConnection.commitContent(
          new InputContentInfo(Uri.parse("content://call_log/test"),
          new ClipDescription("test", new String[]{"image/gif"}));

As a result, IMEs can let the application crash at any time because
InputContentInfo#requestPermission() is automatically called inside the
Framework.

This CL makes sure that exceptions thrown from
InputContentInfo#requestPermission() can be handled gracefully.

 [1]: Id955435dd2e72549ee7134f46b3c6951581694ad
      f3806f57a5

Bug: 32162481
Change-Id: I08916a1f54518390d3b67ab1673dc901e3f9716a
2016-10-14 22:26:35 +00:00
Xin Li
7e0483fcec Merge "Merge "DO NOT MERGE - Added Emergency affordance feature" into
lollipop-mr1-dev" into lmp-mr1-dev.

Change-Id: Ia47211f647d0d49b0adf3cb65eba4b9b686bcbff
2016-10-13 13:54:54 -07:00
Xin Li
ee2903686f Merge "Merge "DO NOT MERGE - Added Emergency affordance feature" into
marshmallow-dev" into mnc-dev.

Change-Id: I7215eebd4a2cc9a4b6ccf2a3e36ed8edc556d208
2016-10-13 13:51:42 -07:00
Xin Li
9b9906e9c0 Merge "Merge "DO NOT MERGE - Added Emergency affordance feature"
into nougat-dev" into nyc-dev.

Change-Id: Iffde36524f2335b90d4887dcdd189eaf55dc60e6
2016-10-13 13:40:33 -07:00
Selim Cinek
cd22634003 DO NOT MERGE - Added Emergency affordance feature
Added a service that listens whether emergency affordances
are necessary.

If the they are needed, it adds an option to the
global actions dialog that directly launches the
emergency call and also adds a long-press listener
to the keyguard emergency button.

Test: adb shell settings put global force_emergency_affordance 1 && adb shell settings put global emergency_affordance_number 111112
Bug: 30404490
Change-Id: Ib96a15da2ef4b568a8d77140ebca6aa6f20f5ddb
2016-10-06 02:15:31 +00:00
Selim Cinek
5fbc86bfd6 DO NOT MERGE - Added Emergency affordance feature
Added a service that listens whether emergency affordances
are necessary.

If the they are needed, it adds an option to the
global actions dialog that directly launches the
emergency call and also adds a long-press listener
to the keyguard emergency button.

Test: adb shell settings put global force_emergency_affordance 1 && adb shell settings put global emergency_affordance_number 111112
Bug: 30404490
Change-Id: Ib96a15da2ef4b568a8d77140ebca6aa6f20f5ddb
2016-10-05 18:40:07 -07:00
Selim Cinek
e6680d93db DO NOT MERGE - Added Emergency affordance feature
Added a service that listens whether emergency affordances
are necessary.

If the they are needed, it adds an option to the
global actions dialog that directly launches the
emergency call and also adds a long-press listener
to the keyguard emergency button.

Test: adb shell settings put global force_emergency_affordance 1 && adb shell settings put global emergency_affordance_number 111112
Bug: 30404490
Change-Id: Ib96a15da2ef4b568a8d77140ebca6aa6f20f5ddb
2016-10-06 01:29:56 +00:00