17 Commits

Author SHA1 Message Date
Adrian Roos
481a6df99f Add device locked API for TrustAgentService
Bug: 18414067
Change-Id: I96c68af9ccc9940acf9fab3b5bd39a3485f01045
2014-11-20 21:48:38 +01:00
Adrian Roos
50bfeec868 Update KeyguardManager.isDeviceLocked API
Bug: 18414067
Change-Id: I0715714c2c9a122f578ec0c6f508faae12e6f752
2014-11-20 21:45:04 +01:00
Jim Miller
0814d41c73 Change Configure structure to List<PersistableBundle>
Adding the new structure was making it difficult for
LMP devices to have common source with upcoming API version.

Fixes bug 17008504

Change-Id: I704503cf0ebff113874c87ab11e37735dbe7b8d7
2014-11-07 17:18:37 -08:00
Jim Miller
e303bf4435 Update TrustAgentService API after review
This change incorporates API council feedback and enables the
TrustAgent whitelisting API.

It also contains a minor cleanup of DPM's use of UserHandle
to eliminate unnecessary object creation.

Fixes bug 17008504

Change-Id: I63cc50169fde54b34406845818bcaf6aadc1a3db
2014-11-05 18:17:56 -08:00
Adrian Roos
2ace72544a SampleTrustAgent: Exercise KeyguardManager.isKeyguardInTrustedState
Bug: 18084166
Change-Id: I7d8695f4b576676cc6da1fe07fea05e72d04f33e
2014-10-24 14:35:26 +02:00
Jim Miller
d4efaac5d5 Update TrustAgentService API after review.
Also documents timebase on related DevicePolicyManager API.

Fixes bugs 16401527 and 17046034

Change-Id: I8ee6d0055ab6f52ec71630344d3232f7875d9c1d
2014-08-22 22:43:30 +00:00
Adrian Roos
2bb8bfd1e8 Dismiss bouncer when onTrustInitiatedByUser fires
Also modifies the SampleTrustAgent to allow testing of the feature
and adds the initiatedByUser flag to the dumpsys output.

Bug: 16840500
Change-Id: I4c08ddcdcbd0ab02c694a1873f73cb9a250f98d7
2014-08-13 17:24:36 +00:00
Adrian Roos
7861c663fd Add setManagingTrust and expose it on lockscreen
Adds a facility for trust agents to indicate if they
are ready to manage trust. Also adds an indication to
the lock icon on the lockscreen to show whether trust is
being managed.

Bug: 15518469
Bug: 16123013

Change-Id: Ie17f588aebeafe66c81dea4a69c733b0d2c72fd4
2014-07-30 12:33:33 +00:00
Jim Miller
604e7558ef Add new DevicePolicyManager API to allow fine-grained TrustAgent management
This adds a new feature that allows a device admin to specify a
whitelist of features that are allowed for the given admin.

Change-Id: I83f853318efbcf72308532d0a997374f73fa9c10
2014-07-28 21:32:01 -07:00
Adrian Roos
c5f95cea26 Restart trust agents when updated or when they are dead
ActivityManager restarts the trust agent service for us
when it gets killed automatically. This does not apply
when its process crashes too often or when its package
gets updated however.
To catch the update case, the trust agent connection
is removed as soon as the package disappears, and then
readded when the new package appears.
To catch the repeated crashing case, the connection is
reset if it hasn't successfully connected for several minutes.

Also adds a button to SampleTrustAgent to simulate a crash.

Bug: 16137258
Change-Id: I1b18fc7a3025e23e25ca1623b6af658d5430a94b
2014-07-24 21:44:02 +02:00
Adrian Roos
18ea893a23 Ensure trust agents are only provided by platform packages
Prevents the TrustManagerService from binding to any non-platform
trust agents and updates the SampleTrustAgent to use the new
permission.

Bug: 15287044
Change-Id: I38c3deebd5ad359075e68f52d19417bab5ab43db
2014-06-03 15:49:19 +02:00
Adrian Roos
cb9fbc3a30 Enforce that trust agents declare the BIND_TRUST_AGENT permission
Change-Id: Iba10b6fb140362c368fb12b7d3c6be550897de40
2014-05-17 03:19:56 +02:00
Adrian Roos
7e03dfcb79 Apply revised TrustAgent API
Bug: 14997466
Change-Id: I81042e058a20f28603a11471882f3dcfc4f8b13c
2014-05-16 16:06:28 +02:00
Alan Viverette
6259933ec9 Switch framework Holo references to Quantum.Light
Change-Id: Ib545a143f1959b6104adbc9d594dd626851d90b3
2014-04-01 14:57:39 -07:00
Adrian Roos
a3dafcfb26 Add a SampleTrustAgent
Adds a simple app that shows how to build a trust agent. For
lack of a better place to put this, this stays in Keyguard's tests
for now.

Bug: 13723878
Change-Id: I9ebad253d3d89c846fe8afaad6babce9e7b80b5e
2014-03-31 19:27:52 +00:00
Christopher Tate
ccbf84f44c Some system apps are more system than others
"signatureOrSystem" permissions are no longer available to all apps
residing en the /system partition.  Instead, there is a new /system/priv-app
directory, and only apps whose APKs are in that directory are allowed
to use signatureOrSystem permissions without sharing the platform cert.
This will reduce the surface area for possible exploits of system-
bundled applications to try to gain access to permission-guarded
operations.

The ApplicationInfo.FLAG_SYSTEM flag continues to mean what it is
says in the documentation: it indicates that the application apk was
bundled on the /system partition.  A new hidden flag FLAG_PRIVILEGED
has been introduced that reflects the actual right to access these
permissions.

At some point the "system" permission category will be
renamed to "privileged".

Bug 8765951

Change-Id: I6f0fd9cdb9170e076dfc66d83ecea76f8dd7335d
2013-06-17 12:47:35 -07:00
Jim Miller
c0b676dcc2 Add keyguard background scrim and protection around keyguard APIs
With this change, the system process will put up a scrim in the
event keyguard crashes to protect underlying content.

It also adds permission checks to prevent unathorized access
through the binder APIs.

Cleaned up KeyguardTestActivity to build separately.

Removed unused resources.

Change-Id: I9e370c6bfb7dca68eae9eae304c815fb84a753d2
2013-04-26 14:34:21 -07:00