3 Commits

Author SHA1 Message Date
Dianne Hackborn
14272302a8 Implement control of auto power save mode.
Follow the setting for auto power save mode in both
battery service and battery UI.  Default level is 15 when
setting is not set; otherwise it is whatever the setting
gives, with 0 meaning auto battery save is off.

Change how we define the "turn off warn" level to be
an adjustment from the warn level, so we can have a good
value for whatever auto setting is set.

Fix power manager to never go in to power save mode when
plugged in, even if the user has manually turned it on.

Add new delete option to settings command, because I needed
it for testing.

Change-Id: I512b691df84399d50b8e751fd50732c6093ebe85
2014-06-11 10:34:26 -07:00
Dianne Hackborn
35654b61e8 More work on App Ops service.
Implemented reading and writing state to retain information
across boots, API to retrieve state from it, improved location
manager interaction to monitor both coarse and fine access
and only note operations when location data is being delivered
back to app (not when it is just registering to get the data at
some time in the future).

Also implement tracking of read/write ops on contacts and the
call log.  This involved tweaking the content provider protocol
to pass over the name of the calling package, and some
infrastructure in the ContentProvider transport to note incoming
calls with the app ops service.  The contacts provider and call
log provider turn this on for themselves.

This also implements some of the mechanics of being able to ignore
incoming provider calls...  all that is left are some new APIs for
the real content provider implementation to be involved with
providing the correct behavior for query() (return an empty
cursor with the right columns) and insert() (need to figure out
what URI to return).

Change-Id: I36ebbcd63dee58264a480f3d3786891ca7cbdb4c
2013-01-16 12:11:01 -08:00
Christopher Tate
af75948cdd New command line tool: "settings"
Because the usual content provider interface doesn't allow specification of
the target user under which to perform settings reads/writes, this CL introduces
a new command line app specifically for that.

Usage:

   settings [--user num] get namespace key
   settings [--user num] put namespace key value

If a --user argument is not given, the owner user is targetted.

Bug 7299066

Change-Id: I73108bb76b04fad133cc4e0f218d64490de549f1
2012-10-08 18:39:27 -07:00