summaryrefslogtreecommitdiffstats
path: root/core/java/com
Commit message (Collapse)AuthorAgeFilesLines
* Formalize time bases in battery stats.Dianne Hackborn2014-03-052-649/+797
| | | | | | | | | | | | | | | | | | | | Battery stats used to revolve around a single time base it maintained, "battery uptime and realtime." This is derived from the system's uptime and realtime, but only increments while the device is on battery. It is used to update its timers for things like the screen being on, wake locks, etc only while the device is not plugged in to power. This change formalizes that time base into a separate class that maintains all of its state. This is used to introduce a new time base, "battery screen off," which only increments while the device is on battery *and* the screen is off. Wake locks are now based on this time base, so we don't count them while the screen is on -- it is misleading to have them increment while the screen is on because the device is defined to always stay awake anyway during that time, so what they are doing is irrelevant. Change-Id: I020e20c930d8dca2953c6c3ddef1dc93c24161a5
* Manually merge commit '2faf28cf' into masterWill Haldean Brown2014-03-041-0/+282
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original commit message: Add swipe-to-dismiss support to PhoneWindow. This adds a new window feature -- FEATURE_SWIPE_TO_DISMISS -- and a theme attribute to activate that feature. When the feature is activated, a SwipeDismissLayout is inflated as the DecorView layout. SwipeDismissLayout intercepts touch events and steals ones that are large swipes to the right if its children don't. PhoneWindow registers handlers that listen for these swipe events, translate the window when necessary, and finish the activity at the end of the gesture. Conflicts: core/java/android/view/Window.java core/res/res/values/attrs.xml Change-Id: I943290b436864ca4a1bd401b88d696e08c921cdd
| * am bd79652a: Merge "Add swipe-to-dismiss support to PhoneWindow." into ↵Will Haldean Brown2014-03-041-0/+282
| |\ | | | | | | | | | | | | | | | | | | klp-modular-dev * commit 'bd79652a9afeee1e81f0f51d11e5869091f58af9': Add swipe-to-dismiss support to PhoneWindow.
| | * Add swipe-to-dismiss support to PhoneWindow.Will Haldean Brown2014-03-041-0/+282
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new window feature -- FEATURE_SWIPE_TO_DISMISS -- and a theme attribute to activate that feature. When the feature is activated, a SwipeDismissLayout is inflated as the DecorView layout. SwipeDismissLayout intercepts touch events and steals ones that are large swipes to the right if its children don't. PhoneWindow registers handlers that listen for these swipe events, translate the window when necessary, and finish the activity at the end of the gesture. Change-Id: I512e758f3c3ffd3b353dba3b911c0e80a88d6f5f
* | | Hold a wake lock while dispatching network activity events.Dianne Hackborn2014-02-284-87/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add new API for determining whether the current data network is active, and thus better scheduling network operations. This API is designed to not be tied to a mobile network -- regardless of the network, apps can use it to determine whether they should initiate activity or wait. On non-mobile networks, it simply always reports as the network being active. This changed involved reworking how the idle timers are done so that we only register an idle timer with the current default network. This way, we can know whether we currently expect to get callbacks about the network being active, or should just always report that it is active. (Ultimately we need to be getting this radio active data from the radio itself.) Change-Id: Iaf6cc91a960d7542a70b72f87a7db26d12c4ea8e
* | | Add support for USB devices with multiple configurations and alternate ↵Mike Lockwood2014-02-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | interfaces Added UsbConfiguration class, as well as accessors to UsbDevice to get configuration list Added methods to UsbDeviceConnection to select configurations and alternate interfaces. Also added accessors for USB descriptor name strings and fixed some memory leaks in the JNI code. Bug: 12425052 Change-Id: Idb990f4d5c054a8cb997eb3f440f6da9f83bce05
* | | Merge "Change Activity Scene Transitions to be more automatic redo."George Mount2014-02-271-0/+5
|\ \ \
| * | | Change Activity Scene Transitions to be more automatic redo.George Mount2014-02-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 206e30cd93afe3eb72ec94178324417db5424ed2 along with removing the additional startActivity* methods and replaces them with ActivityOptions makeSceneTransitionAnimation methods. Change-Id: I52bec31ae3c4cea6d549810ae5a7acd8aea176d8
* | | | Collect per-uid mobile radio usage.Dianne Hackborn2014-02-263-22/+208
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now compute radio active time per application, by distributing the active time across all applications each time the radio goes down, weighting it by the number of packets transferred. Per-app radio power use is now computed using this radio active time. This also gives us a new metric "ms per packet", which give an idea of how effectively an application is using the radio. This is collected and reported as a new set of stats in the human- readable checkin. (It can be computed from the raw checkin data). Also improve sync reporting to include the sync source as used in wake locks, not just the component name. Change-Id: I0b0185fadd1e47ae749090ed36728ab78ac24c5e
* | | Revert "Change Activity Scene Transitions to be more automatic."George Mount2014-02-261-5/+0
| | | | | | | | | | | | | | | | | | This reverts commit f10587faadb9080a7bf9991cbe04bac5525da482. Change-Id: I2785a3d2d6b667cad6d61dcbbc1c624161735fa4
* | | Merge "Deal with apps known to LocalTransport backend but with no data"Christopher Tate2014-02-261-1/+3
|\ \ \
| * | | Deal with apps known to LocalTransport backend but with no dataChristopher Tate2014-02-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An app might have backed something up and later deleted it, in which case it will have a directory in the LocalTransport bookkeeping but with no actual dataset. Skip these packages at restore time, since we know a priori that there will be nothing to do. Change-Id: I85853097bc65ed60e5efd217ee6553b50459e445
* | | | Merge "Change Activity Scene Transitions to be more automatic."George Mount2014-02-251-0/+5
|\ \ \ \
| * | | | Change Activity Scene Transitions to be more automatic.George Mount2014-02-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Shared element transitions are enabled by default when the Window has a TransitionManager. Shared element location and size are captured and transferred to the target Activity. ActionBar is treated as a shared element. Change-Id: I0f22ea4e5cbe80254e848444e3f235cb742684f4
* | | | | More battery stats.Dianne Hackborn2014-02-252-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add events for sync. - Add more descriptive tags for wake events. - Fix battery reset. - Fix tracking of wifi data. Change-Id: Ic07f2a86a5ed33e7da57eb1108c31c777ecd801f
* | | | | Merge "Tabs -> spaces in frameworks/base."John Spurlock2014-02-251-1/+1
|\ \ \ \ \
| * | | | | Tabs -> spaces in frameworks/base.John Spurlock2014-02-251-1/+1
| |/ / / / | | | | | | | | | | | | | | | Change-Id: I5a84e8e93ac99b5ed0212b37bf66efa5e53864be
* | | | | Fix some issues with network usage in battery stats.Dianne Hackborn2014-02-242-17/+21
| |/ / / |/| | | | | | | | | | | Change-Id: I8b354872511fcb55cecb2e09aada2eab41a1e202
* | | | Improve how battery stats collects network stats.Dianne Hackborn2014-02-242-39/+116
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This optimizes the path for battery stats to collect per-uid network usage. It now collects wifi and mobile usage separately, with a path that allows it to recycle all data structures and filter out stats it isn't interested in before they come back to java. This is setting us up for the actual goal, to collect mobile stats independently each time the mobile radio goes down, allowing us to distribute mobile radio usage across uids based on the number of packets they transferred during a session. Change-Id: I21a0f517cf087ea5aa8b8dd535e20b46e361a52b
* | | Don't assume that we're at start of file at ctor timeChristopher Tate2014-02-211-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BackupDataReader / BackupDataWriter were implicitly assuming that when instantiated, the underlying fd was positioned at start-of-file. If one tried to e.g. open an existing data stream to append further data to it, things might randomly fail (at read time, possibly when consuming the stream later) due to incorrect alignment of the data entities: the appending writer would assume that no padding was needed to achieve correct alignment, and this might easily be false. Now the underlying native reader/writer helpers recognize the true position within the file when constructed, and as a result it's now safe to e.g. construct a BackupDataOutput for an existing file and then append to it. Change-Id: If0484921e687852f923a4b4efabff573a6c16981
* | | Merge "Fix for reveal animated drawables"Alan Viverette2014-02-191-28/+48
|\ \ \
| * | | Fix for reveal animated drawablesAlan Viverette2014-02-191-28/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Includes fixes for RevealDrawable clipping, touch feedback constant state, and action bar background display lists. BUG: 13065159 Change-Id: Ie4bf03f59da69047e18a8fe9233c3d24b0160576
* | | | am 13c83996: am 1c532c2e: am 4b07b26e: Merge "Make UsbService optional" into ↵Adam Lesinski2014-02-192-9/+27
|\ \ \ \ | |/ / / |/| / / | |/ / | | | | | | | | | klp-modular-dev * commit '13c839962e246517a7a95326610ea30c529d79dc': Make UsbService optional
| * | am 4b07b26e: Merge "Make UsbService optional" into klp-modular-devAdam Lesinski2014-02-192-9/+27
| |\ \ | | |/ | | | | | | | | | * commit '4b07b26e8654df52ca80bb2165ebdf9352ab9337': Make UsbService optional
| | * Make UsbService optionalAdam Lesinski2014-02-182-9/+27
| | | | | | | | | | | | | | | | | | | | | Tweaked the services Android.mk to build dependencies when building with mm[m]. Change-Id: I6dad511c652bcacc085f27ede5f8f22a6982c6bd
* | | Merge "Fix alert dialog's background when no custom panel visible"Alan Viverette2014-02-191-60/+68
|\ \ \
| * | | Fix alert dialog's background when no custom panel visibleAlan Viverette2014-02-181-60/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also some miscellaneous AlertController cleanup. BUG: 13077576 Change-Id: I40f669f3a703a49fc53f482c2434b2993ed15326
* | | | Merge "Fix issue #13095629: Device is in restart mode for long time..."Dianne Hackborn2014-02-191-2/+6
|\ \ \ \
| * | | | Fix issue #13095629: Device is in restart mode for long time...Dianne Hackborn2014-02-191-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...during taking OTA Add some sanity checks. Change-Id: I6bec1b8d8443c4b3c2a706635acf89c8e5051428
* | | | | Fix issue #13065185: Frequent runtime restarts on launching...Dianne Hackborn2014-02-181-3/+3
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | ..."Hill Climb Racing" app A service is in use when it is in the restarting state. Change-Id: Ic92a6e7bcc24b01aeef5f97f994f105d5e11ea7f
* | | | Implement wifi part of issue #12973036: Improve power_profile.xmlDianne Hackborn2014-02-182-171/+264
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | Add battery stats tracking of wifi state. Also update when we retrieve the current time to use a more consistent value across stats tracking. Change-Id: I6a7c3efd58ff2c8ea86dac141c8f848e7996d63f
* | | Merge "Support default, pattern, pin and password encryption types"Paul Lawrence2014-02-141-6/+22
|\ \ \
| * | | Support default, pattern, pin and password encryption typesPaul Lawrence2014-02-131-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Java plumbing to expose methods to get/set encryption type in IMountService, and hooking up of those methods to the Settings app so the type is set correctly. Needs matching vold changes from https://googleplex-android-review.googlesource.com/#/c/412649/ Bug: 8769627 Change-Id: I70c0ed72d11f5ab6f0958a7f9c101b6822b13baa
* | | | am f75aaf02: am ae254a8d: am 3048191b: Remove onCreate() method that should ↵Jeff Brown2014-02-141-8/+0
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | not be there. * commit 'f75aaf0282531f8e8448bfb1cbdfb239f683ae8b': Remove onCreate() method that should not be there.
| * | | am 3048191b: Remove onCreate() method that should not be there.Jeff Brown2014-02-141-8/+0
| |\ \ \ | | | |/ | | |/| | | | | | | | | * commit '3048191b4cf9eff7a72b84065dec2b3dd1e89b3c': Remove onCreate() method that should not be there.
| | * | Remove onCreate() method that should not be there.Jeff Brown2014-02-131-8/+0
| | | | | | | | | | | | | | | | Change-Id: I8355dd78f910afa9895d2fa00cb627a0885d9eec
* | | | Merge "Start tracking radio up time."Dianne Hackborn2014-02-133-65/+99
|\ \ \ \ | |_|_|/ |/| | |
| * | | Start tracking radio up time.Dianne Hackborn2014-02-133-65/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now always turn on network state tracking for mobile, and push this information down to battery stats. In battery stats we use this to both log the changes in the history and keep track of the total time the mobile radio was active. Power computation is switched over to using this information to help determine power use, which will hopefully make it more accurate (not counting inaccuracies in knowing when it actually goes down). Note yet done is aggregating this data per-uid, to better emphasize which apps are causing the radio to be up. Right now we just spread the total time across all uids weighted by the total number of packets they have sent and received. Also put in the battery stats infrastructure for bluetooth to address issue #12973036: Improve power_profile.xml Change-Id: I39d11b7ff6ae4f336f253d1cba308d8569de7e0d
* | | | am 5137fa03: am 34cc9f90: am 53c7608a: am a3c3533b: Merge "Finish fixing ↵Dave Platt2014-02-132-1/+45
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | Zygote descriptor leakage problem" * commit '5137fa03c3e416c6f68c36f3ec922621853609b1': Finish fixing Zygote descriptor leakage problem
| * | | am 53c7608a: am a3c3533b: Merge "Finish fixing Zygote descriptor leakage ↵Dave Platt2014-02-122-1/+45
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | problem" * commit '53c7608aefb0ed754394e571cac02e96ad6fcdb3': Finish fixing Zygote descriptor leakage problem
| | * | | Finish fixing Zygote descriptor leakage problemDave Platt2014-02-062-1/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to prevent Zygote descriptors from leaking into the child environment, they should be closed by the forked-off child process before the child switches to the application UID. These changes close the descriptors via dup2(), substituting a descriptor open to /dev/null in their place; this allows the Zygote Java code to close the FileDescriptor objects cleanly. This is a multi-project change: dalvik, art, libcore, frameworks/base, and external/sepolicy are affected. The CLs need to be approved together, lest the build break or the software fail to boot. Round 2: indent change Bug: 12114500 Change-Id: I090402136a8a8b7d6aad6eb153026e85d7cf6ad3
* | | | | Always call super.onCreate(). Always.Christopher Tate2014-02-121-2/+4
| |_|/ / |/| | | | | | | | | | | | | | | | | | | Bug 12991134 Change-Id: Ife16ef93408253e3318a06dc0206ab4b88c7f367
* | | | am 25df673b: am 1b51c9cb: Merge "Make SystemService constructor take a ↵Jeff Brown2014-02-112-68/+77
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | Context." into klp-modular-dev * commit '25df673b849de374cf1de40250dfd8a48b7ac28b': Make SystemService constructor take a Context.
| * | | am 1b51c9cb: Merge "Make SystemService constructor take a Context." into ↵Jeff Brown2014-02-112-68/+77
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | klp-modular-dev * commit '1b51c9cb96fe2a0818289857a016521eed1ec183': Make SystemService constructor take a Context.
| | * | Make SystemService constructor take a Context.Jeff Brown2014-02-102-68/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change simplifies the process of initializing a SystemService by folding the onCreate() step back into the constructor. It removes some ambuiguity about what work should happen in the constructor and should make it possible for services to retain most of their final fields after refactoring into the new pattern. Change-Id: I25f41af0321bc01898658ab44b369f9c5d16800b
| * | | resolved conflicts for merge of 2cd0563c to klp-modular-dev-plus-aospNarayan Kamath2014-01-311-1/+1
| |\ \ \ | | |/ / | |/| / | | |/ Change-Id: Ia28df1c1aa084959ed9289bfe90e7f6a4bffb8a2
| | * frameworks/base: Rename persist.sys.dalvik.vm.lib to allow new defaultBrian Carlstrom2014-01-301-1/+1
| | | | | | | | | | | | | | | Bug: 12798969 Change-Id: Ibb7ed86867e4dca53ad7fe33326b08e6f5e664c4
* | | Merge "Battery stats: more events, fixes."Dianne Hackborn2014-02-072-14/+112
|\ \ \
| * | | Battery stats: more events, fixes.Dianne Hackborn2014-02-072-14/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new history events for top application package and foreground application packages. Doing this involved a fair amount of improvement to history events. The event code is now separated out to have "start" and "finish" identifies, and we use that to now keep track of which events are active. With that, when resetting the stats, we can spit out all of the currently active events at the front of the new history. Also fixed some problems when I re-arranged the history delta int bits that were conflicting with the packing of the battery status bits. These packing structures are changed to work together correctly. Change-Id: Ic8b815060dd8a50ff4a0a209efc2e1044215cd88
* | | | Merge "Refactoring of fitSystemWindows to applyWindowInsets for views"Adam Powell2014-02-061-9/+11
|\ \ \ \ | |/ / / |/| | |