4236 Commits

Author SHA1 Message Date
Jason Monk
ed0343c911 Add constant for manage permissions screen
This screen is not per app, but shows all runtime permissions and
how many apps hold each.

Change-Id: I68cdbe53177f742daf396f4eb53761fd5cda2636
2015-03-30 14:42:02 -04:00
Chris Wren
469d94490e Merge "add a mechanism for logging actions" 2015-03-30 18:31:44 +00:00
Chris Wren
4902da45a7 add a mechanism for logging actions
Change-Id: I60163e44602b8e23b643b9103c324fa0e0d2c4c4
2015-03-30 14:29:03 -04:00
Mike Lockwood
d1b16fe2fb Move MIDI utilities for internal use to com.android.internal.midi package
Change-Id: I7393ae1d4bca61667fb6ee809a7aa22c5c48de56
2015-03-30 09:06:06 -07:00
Christopher Tate
6e6af0d34e Merge "Add payload-size preflight stage to full transport backup" 2015-03-27 23:50:58 +00:00
Chris Wren
a2e94c8543 Merge "add a metrics logger" 2015-03-27 18:36:33 +00:00
Chris Wren
161155145e add a metrics logger
Change-Id: I5b1dccb5d103ece3112acf38889bae16273b092f
2015-03-27 13:42:28 -04:00
Abodunrinwa Toki
0c7ed2886e New floating toolbar implementation for secondary action mode views.
Change-Id: I04d179576290f1b107b3777287d81f149e16e658
2015-03-27 15:48:13 +00:00
Christopher Tate
11ae768cf1 Add payload-size preflight stage to full transport backup
We now peform a total-size preflight pass before committing data to the
wire.  This is to eliminate the large superfluous network traffic that
would otherwise happen if the transport enforces internal quotas: we
now instead ask the transport up front whether it's prepared to accept
a given payload size for the package.

From the app's perspective this preflight operation is indistinguishable
from a full-data backup pass.  If the app has provided its own full-data
handling in a subclassed backup agent, their usual file-providing code
path will be executed.  However, the files named for backup during this
pass are not opened and read; just measured for their total size.  As
far as component lifecycles, this measurement pass is simply another
call to the agent, immediately after it is bound, with identical
timeout semantics to the existing full-data backup invocation.

Once the app's file set has been measured the preflight operation
invokes a new method on BackupTransport, called checkFullBackupSize().
This method is called after performFullBackup() (which applies any
overall whitelist/blacklist policy) but before any data is delivered
to the transport via sendBackupData().  The return code from
checkFullBackupSize() is similar to the other transport methods:
TRANSPORT_OK to permit the full backup to proceed; or
TRANSPORT_REJECT_PACKAGE to indicate that the requested payload is
unacceptable; or TRANSPORT_ERROR to report a more serious overall
transport-level problem that prevents a full-data backup operation
from occurring right now.

The estimated payload currently does not include the size of the
source-package metadata (technically, the manifest entry in its
archive payload) or the size of any widget metadata associated with
the package's install.  In practice this means the preflighted size
underestimates by 3 to 5 KB.  In addition, the preflight API currently
cannot distinguish between payload sizes larger than 2 gigabytes;
any payload estimate larger than that is passed as Integer.MAX_VALUE
to the checkFullBackupSize() query.

Bug 19846750

Change-Id: I44498201e2d4b07482dcb3ca8fa6935dddc467ca
2015-03-26 18:57:36 -07:00
Adam Lesinski
4b6bd8d36b Retrieve WiFi info outside of BatteryStatsImpl
In order to not deadlock the system, we need to retrieve
WiFi energy info outside of the BatteryStats lock. We do this,
then pass that data down to BatteryStatsImpl to process.

b/19729960

Change-Id: Ib8beba1d5ac81d89144d502c4b688d0a88c5b102
2015-03-26 17:49:51 -07:00
Dianne Hackborn
73484d8b66 Merge "Battery stats: wakeup alarm tracking, general cleanup." 2015-03-25 21:27:54 +00:00
Prerepa Viswanadham
e564c00e2b Merge "Merge remote-tracking branch 'goog/mirror-m-wireless-internal-release' into master_merge" 2015-03-25 20:02:29 +00:00
Dianne Hackborn
1e725a7ec9 Battery stats: wakeup alarm tracking, general cleanup.
Instead of just tracking the total number of wakeup alarms
per package, track a count for each tag.  Note this is only
wakeup alarms, not non-wakeup alarms.

Also tighten up the code a bit by exposing the actual ArrayMap
container through most of the BatteryStats API, so we can more
efficiently iterate over them (which is all we ever want to do
with those containers at that point).

Finally remove all printing of "since unplugged" stats, as
another step towards completely removing that tracking.  If
nobody screams, hopefully soon we can go through and just get
rid of all the extra state we are carrying around that is
tracking that data.

Also note that currently the per-tag wakeup alarm data is
being reported in the human-readable stats, but in the checkin
data it is still being rolled up into a single number.  To fix
this, I need to completely rework the pkg entry line to have
separate data for services and wakeup alarms (so have three
types -- pkg for the start of a package, wal for a wakeup
alarm, svc for a service).

Change-Id: I8033acca8742935cfe95511cdea730a405b17cab
2015-03-24 18:29:18 -07:00
Prerepa Viswanadham
4209a28270 Merge remote-tracking branch 'goog/mirror-m-wireless-internal-release' into master_merge
Change-Id: I49aab437af220f1139cfd2d0a9c362acce31074e
2015-03-24 13:46:08 -07:00
Dianne Hackborn
88e98dfa59 More work on device idle mode.
- There is now an API for people to find out about
  its state.
- Moved DeviceIdleController to be closer to the
  power manager implementation, since they are
  closely related.
- Job scheduler now knows about idle state and doesn't
  run jobs while the device is idle.
- Battery stats now keeps track of "idling" vs "idle mode".
  Idling is when we consider the device to be idle,
  independent of whether we are actually in deep idle mode.
  This allows us to keep track of longer-term changes
  independently of cycling in and out of idle mode.
- Battery stats also now keeps track of package changes in
  its daily stats.
- Small optimization to network policy manager service to
  not touch uids that do not have the NETWORK permission.

Change-Id: I0b3304fb3722c78cdfdd0c1eada7369ece7cbcf9
2015-03-24 11:03:49 -07:00
Dmitriy Ivanov
6a225edccd Merge "Load libraries directly from apk" 2015-03-24 02:57:10 +00:00
Christopher Tate
c75517c160 Merge "Back up and restore the set of enabled IMEs" 2015-03-24 01:13:20 +00:00
Griff Hazen
daf5c0ebd0 Merge commit '583c7c56' into master
Change-Id: I89c2c63005fbb6b1c058b2022f4469be5244505f
2015-03-23 16:34:11 -07:00
Christopher Tate
7b9a28c7f0 Back up and restore the set of enabled IMEs
The restored set of enabled IMEs/subtypes is merged into the
current state of the system, rather than simply replacing it.
This is because we do not want to accidentally disable or
reconfigure something that the user is currently relying on.

There's a certain amount of repetitive activity here, rebuilding
the enabled-state data structures in a different format, but it's
important for maintainability that the restore code be able to
rely on the core InputMethodUtils implementation of reading/writing
the settings element.

Bug 19822542

Change-Id: If0104151b3526da6ecc669adde3119a239ecafeb
2015-03-23 16:28:21 -07:00
Alan Viverette
0ef59ac0e5 Update DatePicker and CalendarView to latest Material spec
Bug: 19431364
Change-Id: If364a051a5208d170495de4182e46b32c7560e08
2015-03-23 13:13:25 -07:00
Griff Hazen
38f75097ff am 0b42ff79: Merge "Allow emulator to select a window outset bottom" into lmp-mr1-modular-dev
* commit '0b42ff7916e6cc32c812a3be8f3e4ebdf96e8553':
  Allow emulator to select a window outset bottom
2015-03-22 00:05:48 +00:00
Dmitriy Ivanov
ff193d642e Load libraries directly from apk
Introduced new 'extractNativeLibs' attribute to manifest/application.
 Setting it to false prevents installer from extracting library from apk.

 The default value for extractNativeLibs is true.

Bug: 8076853
Change-Id: I1aa2c039bb2a590ae72f256acc9ba5401c2c59b1
2015-03-21 11:46:11 -07:00
Adam Lesinski
39fa40cbad Merge "Disable WiFi energy data collection to avoid deadlock" 2015-03-20 18:07:24 +00:00
Adam Lesinski
cb204c3334 Disable WiFi energy data collection to avoid deadlock
This is a temporary fix to prevent deadlocking in the
system. Need to come up with a better solution for
accessing WiFi and other subsystems from BatteryStats.

b/19729960

Change-Id: I464e7490c9780249d2a3eef05ce084a7d84372c0
2015-03-19 18:11:25 -07:00
Dianne Hackborn
79ec42e6a3 Merge "First stab at device idle mode." 2015-03-19 23:05:16 +00:00
Dianne Hackborn
8ad2af7e5b First stab at device idle mode.
Introduce a new device idle controller service that
monitor's the device state and determines when to go
in to idle mode.  When in idle mode, all we do right
now is turn off network access the same as we do for
power save mode.  Many more things should come in the
future -- stopping the alarm manager from scheduling
(most) alarms, telling GmsCore for it to stop doing
stuff, etc.

Battery stats now has state tracking for devie idle
mode, as well as events for the reasons we can come
out of idle mode (significant motion or the device
becoming active).  Also added new events noting when
packages are installed.

Renamed the "low power" event in battery stats to
"power save" because the former was just way too
confusing.

Finally, fix buffer size reading kernel wake locks.
(Stupidly, just increasing the buffer size.  Ideally
we should try to be smarter and grow our buffer to
fit the data available, but I'll leave that for
another time.)

Change-Id: I0be2062466c83ee9d890c6cf5a228d9cc4090eca
2015-03-19 11:10:55 -07:00
Alan Viverette
eef3bcbbe4 Merge "Replace usages of deprecated Resources.getColor() and getColorStateList()" 2015-03-19 01:54:09 +00:00
Alan Viverette
4a357cd2e5 Replace usages of deprecated Resources.getColor() and getColorStateList()
Change-Id: I8f64fe6c4c44a92ff6d07250223ba590a1d691b0
2015-03-18 18:37:18 -07:00
Mathieu Chartier
75f1ba5a81 am f792e016: am 437ac8f8: Merge "Add JIT late override property"
* commit 'f792e01606b988ab84190217529cca53da8db3f5':
  Add JIT late override property
2015-03-18 23:51:12 +00:00
Mathieu Chartier
f792e01606 am 437ac8f8: Merge "Add JIT late override property"
* commit '437ac8f8445b078041171eff56ce7ffbd1cf6766':
  Add JIT late override property
2015-03-18 23:09:21 +00:00
Pierre Vandwalle
2877877d4c add BASE_WIFI_LOGGER to system protocol messages
Change-Id: I4bb59b220208d5cb4fa415ad092970312392d8e4
2015-03-18 15:51:06 -07:00
Mathieu Chartier
7a49028aa2 Add JIT late override property
Required for JIT debug property since user builds can't restart
the shell.

Bug: 19735273

Change-Id: I1983852e80010c344b45e0bb459de47c56adfce8
2015-03-18 15:18:52 -07:00
Dianne Hackborn
27eac1d58f Add ability to get a screenshot for assist.
New flag you pass in to startSession() to say you want it,
new callback on VoiceInteractionSession to receive it.

Change-Id: I61fdcfdee41a60d46036a2ef16681a9b4181115a
2015-03-17 16:45:51 -07:00
Clara Bayarri
4d3494000c Merge "Delete the ActionModeWrapper now that it is not needed anymore." 2015-03-17 19:12:27 +00:00
Yohei Yukawa
6aa0378878 Remove deprecated hidden public methods from InputMethodUtils.
This is a follow up CL for a recent attempt to minimize
the number of default enabled IMEs.
- part1: I831502db502f4073c9c2f50ce7705a4e45e2e1e3
- part2: Ife93d909fb8a24471c425c903e2b7048826e17a3
- part3: I6571d464a46453934f0a8f5e79018a67a9a3c845
- part4: I871ccda787eb0f1099ba3574356c1da4b33681f3

This CL removes following deprecated hidden public methods
from InputMethodUtils as planned.
- isSystemImeThatHasEnglishKeyboardSubtype(InputMethodInfo)
- isValidSystemDefaultIme(boolean, InputMethodInfo, Context)
- containsSubtypeOf(InputMethodInfo, String, String)

This is a pure code refactoring with preserving the current
logic. Hence no behavior change is intended.

Change-Id: I1ff994cbbdef83e1e907a0d88aa9ae09d45263b4
2015-03-17 21:59:26 +09:00
Dianne Hackborn
3d07c94c39 Add new voice request for picking from a list.
Also add API for voice interaction service to control
whether the system should hold a wake lock while it is
working with an activity (and actually *do* hold a wake
lock while doing so, duh!).

And while in there, clean up the launching wake lock to
correctly give blame to the app that is launching.

Change-Id: I7cc4d566b80f59fe0a9ac51ae9bbb7188a01f433
2015-03-16 11:29:12 -07:00
John Reck
2c528c2175 am 059ba981: am 386dcbdd: Merge "Frameworks/base: Fix missing cast"
* commit '059ba9814bb07aeebd8bf697fc05ff833c63033b':
  Frameworks/base: Fix missing cast
2015-03-16 15:16:17 +00:00
John Reck
059ba9814b am 386dcbdd: Merge "Frameworks/base: Fix missing cast"
* commit '386dcbddf5c166f98209b78389e79d49ab3a8222':
  Frameworks/base: Fix missing cast
2015-03-16 15:09:04 +00:00
Andreas Gampe
65ac8a2bd7 Frameworks/base: Fix missing cast
Without a cast, the division is integer division.

Change-Id: I050e53778de8b1591a0be16ebbee8eed70eb1528
2015-03-15 14:10:23 -07:00
Christopher Tate
de2826b1e9 Properly set up local transport data dirs after an initialize operation
We were properly setting up the underlying storage at boot time, but
*not* doing so after an "initialize" operation, i.e. after wiping all
of the data upon request.  The effect was that after an init operation
while using the local transport (e.g. if you disabled backup and then
reenabled it with the local transport as your active one), full-data
backup operations wouldn't work until after the next reboot.

(Resubmit, with fixes, of earlier revert.)

Change-Id: I745cb49b5155119d63cff6fffad5230687faca71
2015-03-13 14:41:45 -07:00
Ed Heyl
33dd7a4684 Merge "Fix build: Revert "Properly set up local transport data dirs after an initialize operation"" 2015-03-13 21:03:07 +00:00
Ed Heyl
0a809733da Fix build: Revert "Properly set up local transport data dirs after an initialize operation"
This reverts commit dc205b3f9530ab8f25b9d8fdbe0fd942fcfc750e.

Change-Id: I6ed27c1eb8ddd1894bf0374b989a1b4e3d7761a3
2015-03-13 21:00:45 +00:00
Christopher Tate
6bfcc6bf1c Merge "Properly set up local transport data dirs after an initialize operation" 2015-03-13 20:12:44 +00:00
Griff Hazen
a093802171 Allow emulator to select a window outset bottom
And clean up some copied around code.

Bug: 17440607

Change-Id: I5cf9c58b49110c4be1a77dc9c410fedc6b99aef3
2015-03-13 10:01:41 -07:00
Dianne Hackborn
484bc6e5a7 Merge "More work on collecting assist data." 2015-03-13 16:41:29 +00:00
Clara Bayarri
af9047161a Delete the ActionModeWrapper now that it is not needed anymore.
Change-Id: I7fcd6cb92a7259168d9f45d9bdfd9ab155a25d0f
2015-03-13 14:15:54 +00:00
Yohei Yukawa
2fbea7ff90 Merge "Expose isSystemImeThatHasSubtypeOf to Settings" 2015-03-13 13:46:40 +00:00
Yohei Yukawa
9c83ff471d Expose isSystemImeThatHasSubtypeOf to Settings
This is a follow up CL for a recent attempt to minimize
the number of default enabled IMEs.
- part1: I831502db502f4073c9c2f50ce7705a4e45e2e1e3
- part2: Ife93d909fb8a24471c425c903e2b7048826e17a3
- part3: I6571d464a46453934f0a8f5e79018a67a9a3c845
- part4: I871ccda787eb0f1099ba3574356c1da4b33681f3

In the avobe CLs, an internal (hidden) method
InputMethodUtils.isValidSystemDefaultIme was marked as
deprecated and we decided to migrate to
InputMethodUtils.isSystemImeThatHasSubtypeOf.

To finish this refactoring, this CL make the new
method visible to the settings app.

InputMethodUtils.isValidSystemDefaultIme remains
to be an internal method. No behavior change is
intended.

Change-Id: I8cb9ca40d15af099c3d1ded46797fb57f14fb9e8
2015-03-13 22:43:06 +09:00
Clara Bayarri
4423d91de5 Add a type parameter to startActionMode() calls.
This requires adding a new method to View and Window.Callback to pass
down the type as a parameter.

For compatibility purposes, the new method implementations keep the
type and call the old method, in case clients have subclassed it.

Change-Id: If5d857f131e33be8cc6a8814f2e9c4e85ad2da25
2015-03-13 10:51:51 +00:00
Christopher Tate
dc205b3f95 Properly set up local transport data dirs after an initialize operation
We were properly setting up the underlying storage at boot time, but
*not* doing so after an "initialize" operation, i.e. after wiping all
of the data upon request.  The effect was that after an init operation
while using the local transport (e.g. if you disabled backup and then
reenabled it with the local transport as your active one), full-data
backup operations wouldn't work until after the next reboot.

Change-Id: I3bfda1e94ae2312678b0bb2dde13ebdb64a56d2b
2015-03-12 19:00:39 -07:00