Commit Graph

2022 Commits

Author SHA1 Message Date
Kenny Root
4231185a2e Merge "KeySets: better rejection for badly-formed manifest" 2013-07-19 01:43:40 +00:00
Dianne Hackborn
add005cf94 Mmmmmmm... lovely, lovely ArrayMap.
And ArraySet, too.

Change-Id: I72ea28cbb2286b01b6e1be082f8e7ec17e99074e
2013-07-18 11:18:25 -07:00
Dianne Hackborn
c823051972 Switch proc stats to use new process state constants.
These new constants are a better mapping to the kind of
information that procstats is wanting to collect about
processes.  In doing this, the process states are tweaked
to have a bit more information that we care about for
procstats.

This changes the format of the data printed by procstats,
so the checkin version is bumped to 2.  The structure is
the same, however the codes for process states have all
changed.  The new codes are, in order of precedence:

p -- persistent system process.
t -- top activity; actually any visible activity.
f -- important foreground process (ime, wallpaper, etc).
b -- important background process
u -- performing backup operation.
w -- heavy-weight process (currently not used).
s -- background process running a service.
r -- process running a receiver.
h -- process hosting home/launcher app when not on top.
l -- process hosting the last app the user was in.
a -- cached process hosting a previous activity.
c -- cached process hosting a client activity.
e -- cached process that is empty.

In addition, we are now collecting uss along with pss
data for each process, so the pss checkin entries now
have three new values at the end of the min/avg/max uss
values of that process.

With this switch to using process state constants more
fundamentally, I realized that they could actually be
used by the core oom adj code to make it a lot cleaner.
So that change has been made, that code has changed quite
radically, and lost a lot of its secondary states and flags
that it used to use in its computation, now relying on
primarily the oom_adj and proc state values for the process.

This also cleaned up a few problems -- for example for
purposes of determing the memory level of the device, if a
long-running service dropped into the cached oom_adj level,
it would start being counted as a cached process and thus
make us think that the memory state is better than it is.
Now we do this based on the proc state, which always stays
as a service regardless of what is happening like this, giving
as a more consistent view of the memory state of the device.

Making proc state a more fundamentally part of the oom adj
computation means that the values can also be more carefully
tuned in semantic meaning so the value assigned to a process
doesn't tend to change unless the semantics of the process
has really significantly changed.

For example, a process will be assigned the service state
regardless of whether that services is executing operations
in the foreground, running normally, or has been dropped to
the lru list for pruning.  The top state is used for everything
related to activities visible to the user: when actually on
top, visible but not on top, currently pausing, etc.

There is a new Context.BIND_SHOWING_UI added for when system
services bind to apps, to explicitly indicate that the app
is showing UI for the system.  This gives us a better metric
to determine when it is showing UI, and thus when it needs
to do a memory trim when it is no longer in that state.  Without
this, services could get in bad states of continually trimming.

Finally, more HashSet containers have been changed to ArraySet,
reducing the temporary iterators created for iterating over
them.

Change-Id: I1724113f42abe7862e8aecb6faae5a7620245e89
2013-07-15 16:21:35 -07:00
John Spurlock
6098c5d355 Docfixes in IBinder, Context, View, and Intent.
Fix links in @throws clauses, typos, redundant "returns"
and use @code for true + false in returns.

Change-Id: Ic3c4c75d6061732d997a386dc3232475c992c188
2013-07-15 12:08:21 -04:00
Kenny Root
37dca155aa KeySets: better rejection for badly-formed manifest
During testing, I typed in a <publicKey> tag incorrectly and it
clobbered the previously defined key entry since it still parsed the
subsequent <keyset> tag defining an alias.

This gives more information in the log when running into such parsing
errors.

Change-Id: Id3c8e85530b1a5e39f4a2cb6ea8bd5521cb6918f
2013-07-10 16:55:05 -07:00
Craig Mautner
88c0589969 Refactor ActivityThread cache - Baby step 1.
Introduce ResourcesManager and ResourcesKey as standalone classes.
Move DisplayMetrics and Resources HashMaps from ActivityThread to
ResourcesManager.

Change-Id: I20cc6c0dd1b74667354839e5ac9a660f4ee2d00d
2013-07-09 09:36:42 -07:00
Kenny Root
2758e291c8 KeySetManager: fix indentation
Change-Id: I4fe67143bce30a7592c6a0f5a094172112bdfe43
2013-07-08 09:37:24 -07:00
Amith Yamasani
5fa9f2b127 Merge "Single-user restrictions" 2013-06-26 23:04:32 +00:00
Georgi Nikolov
dbe846b02e Bugfix 9373708
JBMR2 runtime restart (system process crash in the sync manager) during setup

The fix is to ensure that all access to SyncStatusInfo and related objects happens
while holding the mAuthority lock or is on a per-thread copy of the objects

Also, includes an unrelated fix for a bug I just noticed in the way
dumpSyncState() prints the periodic sync info

Change-Id: Id9e4dff41029412e133bdabc843d555434d9a12f
(cherry picked from commit 182ff3acbad9850b40d37ad1c23106be6eda8476)
2013-06-26 20:16:05 +00:00
Amith Yamasani
655d0e2029 Single-user restrictions
Introduces a new "blocked" state for each package. This is used to temporarily
disable an app via Settings->Restrictions.

PIN creation and challenge activities for use by Settings and other apps. PIN
is stored by the User Manager and it manages the interval for retry attempts
across reboots.

Change-Id: I4915329d1f72399bbcaf93a9ca9c0d2e69d098dd
2013-06-25 16:03:55 -07:00
Christopher Tate
4ce55a3987 Fix FLAG_PRIVILEGED numbering
Change-Id: Ia04326acb51a76c0f1931fce94f0501d4ce7faba
2013-06-24 16:44:39 -07:00
Craig Mautner
07f36c738e Merge "Add activity token to display system." 2013-06-24 18:31:54 +00:00
Craig Mautner
48d0d18867 Add activity token to display system.
First step in adding activity specific information to displays.
Replace CompatibilityInfoHolder with DisplayAdjustmentsHolder that
holds an activity token in addition to the CompatibilityInfo.

Change-Id: Ie113cd8dd9c62e0b5311204e039a4829096bea68
2013-06-22 15:30:13 -07:00
Svetoslav Ganov
4b9a4d1687 Print - platform APIs
Related changes:
    Skia (inlcude PDF APIs): https://googleplex-android-review.googlesource.com/#/c/305814/
    Canvas to PDF: https://googleplex-android-review.googlesource.com/#/c/319367/
    Settings (initial version): https://googleplex-android-review.googlesource.com/#/c/306077/
    Build: https://googleplex-android-review.googlesource.com/#/c/292437/
    Sample print services: https://googleplex-android-review.googlesource.com/#/c/281785/

Change-Id: I104d12efd12577f05c7b9b2a5e5e49125c0f09da
2013-06-21 18:43:17 -07:00
Georgi Nikolov
3b8b276644 Merge "Add javadoc comments explaining SYNC_EXTRAS that did not have documentation" 2013-06-21 17:27:12 +00:00
Georgi Nikolov
b3395575a3 Add javadoc comments explaining SYNC_EXTRAS that did not have documentation
Change-Id: I3500f03076694fe5981fd5ec82e7f29062dfec53
2013-06-20 13:49:25 -07: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
Dianne Hackborn
439e9bc85d Fix some things.
Change-Id: I7dacf11cdb356cad5f9bc013b19f2e14f31cb75f
2013-06-12 19:13:49 -07:00
Dianne Hackborn
df1c0bf774 Add scheme specific part to IntentFilter.
Change-Id: I063d086cdc742800b8e31ddf2942f2e9230e2785
2013-06-12 18:08:17 -07:00
Eino-Ville Talvala
b2675542c2 Initial commit of new camera API, mostly just the interface.
- New core API classes in android.hardware.photography
- android.media.Image and android.media.ImageReader classes for
  application access to direct hardware image buffers.
- Additions to android.graphics.ImageFormat to describe new image
  types needed by new camera API.
- Some documentation included; very little implementation.

Bug: 9111736
Change-Id: I0680f35944d1cb8845b7dc0c67edc8c0f0864573
2013-06-07 21:29:45 +00:00
Trevor Johns
05d60beb89 docs: Fix minor typo in android.content.SyncResult
Change "storage later" to "storage layer" in docs for
SyncResult.databaseError.

Change-Id: I5fa07c2e58c65dbe00b1341f0cca99d47d2dd264
2013-06-05 19:23:50 -07:00
Dirk Dougherty
eb47aac14c am 0f70bcfc: am 8ebfb8c9: am fdc0c861: am b18c7254: am a404a629: am 6fe992d8: am 4fad5c17: Merge "Doc change: restore warning not to abort NEW_OUTGOING_CALL." into jb-mr1.1-docs
* commit '0f70bcfce3eb291e95e2a70f9d353efa862796da':
  Doc change: restore warning not to abort NEW_OUTGOING_CALL.
2013-06-01 09:52:14 -07:00
Dirk Dougherty
0f70bcfce3 am 8ebfb8c9: am fdc0c861: am b18c7254: am a404a629: am 6fe992d8: am 4fad5c17: Merge "Doc change: restore warning not to abort NEW_OUTGOING_CALL." into jb-mr1.1-docs
* commit '8ebfb8c9c34caa80cd0d2451d950170c1b522f2a':
  Doc change: restore warning not to abort NEW_OUTGOING_CALL.
2013-06-01 08:35:13 -07:00
Dirk Dougherty
8ebfb8c9c3 am fdc0c861: am b18c7254: am a404a629: am 6fe992d8: am 4fad5c17: Merge "Doc change: restore warning not to abort NEW_OUTGOING_CALL." into jb-mr1.1-docs
* commit 'fdc0c8618b4e51c322f747202ff94508124e7c9c':
  Doc change: restore warning not to abort NEW_OUTGOING_CALL.
2013-06-01 08:32:11 -07:00
Dirk Dougherty
fdc0c8618b am b18c7254: am a404a629: am 6fe992d8: am 4fad5c17: Merge "Doc change: restore warning not to abort NEW_OUTGOING_CALL." into jb-mr1.1-docs
* commit 'b18c725442e498a6447de37c3b9428b09837eda9':
  Doc change: restore warning not to abort NEW_OUTGOING_CALL.
2013-06-01 08:28:48 -07:00
Dirk Dougherty
b18c725442 am a404a629: am 6fe992d8: am 4fad5c17: Merge "Doc change: restore warning not to abort NEW_OUTGOING_CALL." into jb-mr1.1-docs
* commit 'a404a62951ad8a2d657a587feb12780e725296e3':
  Doc change: restore warning not to abort NEW_OUTGOING_CALL.
2013-06-01 08:26:32 -07:00
Adam Powell
04fe6ebb9f Fix a bug resolving the correct icon/logo in action bars
Remove some abstraction-breaking magic in ActionBarView and replace it
with proper resolution of the icon/logo when creating a window. The
old implementation relied on the ActionBarView's context being an
Activity.

Bug 9171554

Change-Id: Idbbb1942622195dcb55e8119f2d64287b07bb509
2013-05-31 15:00:24 -07:00
Dirk Dougherty
4fad5c176a Merge "Doc change: restore warning not to abort NEW_OUTGOING_CALL." into jb-mr1.1-docs 2013-05-31 21:08:45 +00:00
Adam Powell
087d2b2df7 Merge "Optimizations for ResolverActivity" 2013-05-30 01:43:32 +00:00
Adam Powell
0256c6f8d3 Optimizations for ResolverActivity
Load app icons using AsyncTask instead of during list item binding.

Make sorting resolved components by display name case insensitive.

Change-Id: I8e69781ed021035b9f0dac349791b3d8a674cf60
2013-05-29 18:14:08 -07:00
Dirk Dougherty
8f114bb2ae am 2bf15756: am 91ea7882: am f64588a2: am de8ac602: am 963e3ec5: am 71d1af4a: am a284e201: Merge "Doc change: adjust description of NEW_OUTGOING_CALL." into jb-mr1.1-docs
* commit '2bf15756cc416644a4777d76a94947bee75d8b3b':
  Doc change: adjust description of NEW_OUTGOING_CALL.
2013-05-29 15:25:32 -07:00
Dirk Dougherty
932fbcc817 Doc change: restore warning not to abort NEW_OUTGOING_CALL.
Change-Id: Icdd4ae184b2a989ac2967420cb5b471aac70808f
2013-05-29 15:19:14 -07:00
Dirk Dougherty
2bf15756cc am 91ea7882: am f64588a2: am de8ac602: am 963e3ec5: am 71d1af4a: am a284e201: Merge "Doc change: adjust description of NEW_OUTGOING_CALL." into jb-mr1.1-docs
* commit '91ea7882cdba6bef7918fcd4ff645a9693fdc861':
  Doc change: adjust description of NEW_OUTGOING_CALL.
2013-05-29 15:18:45 -07:00
Dirk Dougherty
91ea7882cd am f64588a2: am de8ac602: am 963e3ec5: am 71d1af4a: am a284e201: Merge "Doc change: adjust description of NEW_OUTGOING_CALL." into jb-mr1.1-docs
* commit 'f64588a2ce6a0e4e76d7d48c47f82785553b13f3':
  Doc change: adjust description of NEW_OUTGOING_CALL.
2013-05-29 11:42:03 -07:00
Dirk Dougherty
f64588a2ce am de8ac602: am 963e3ec5: am 71d1af4a: am a284e201: Merge "Doc change: adjust description of NEW_OUTGOING_CALL." into jb-mr1.1-docs
* commit 'de8ac602e3d74dbcb87dfc4c1cc54fb0553e5f17':
  Doc change: adjust description of NEW_OUTGOING_CALL.
2013-05-28 22:23:11 -07:00
Dirk Dougherty
de8ac602e3 am 963e3ec5: am 71d1af4a: am a284e201: Merge "Doc change: adjust description of NEW_OUTGOING_CALL." into jb-mr1.1-docs
* commit '963e3ec55f2ecbb132a627c8d0f6c19d83bc60b8':
  Doc change: adjust description of NEW_OUTGOING_CALL.
2013-05-28 22:21:09 -07:00
Santos Cordon
57f0de1291 am d8754689: am c72949c6: am 7999c228: am 7fb15ce7: Update documentation of NEW_OUTGOING_CALL
* commit 'd8754689595ab4b5e4e43a89178080d344374869':
  Update documentation of NEW_OUTGOING_CALL
2013-05-28 22:18:48 -07:00
Santos Cordon
d875468959 am c72949c6: am 7999c228: am 7fb15ce7: Update documentation of NEW_OUTGOING_CALL
* commit 'c72949c6bc6f5654f09482309d9d3ac03aadd67d':
  Update documentation of NEW_OUTGOING_CALL
2013-05-28 22:16:51 -07:00
Dirk Dougherty
a284e2013a Merge "Doc change: adjust description of NEW_OUTGOING_CALL." into jb-mr1.1-docs 2013-05-29 05:16:01 +00:00
Dirk Dougherty
367ce906c8 Doc change: adjust description of NEW_OUTGOING_CALL.
Change-Id: If2bcfa7410759e08958029578a9b3d0a60a1de4e
2013-05-28 17:59:38 -07:00
Santos Cordon
7fb15ce74b Update documentation of NEW_OUTGOING_CALL
Adds call-handling as a use case for NEW_OUTGOING_CALL

Change-Id: Ie511438bd8d9aa245881f050d32221c81e898745
2013-05-28 16:00:11 -07:00
Dianne Hackborn
f8b8521598 am 89eed125: am c7322005: am f9b41efe: Merge "Don\'t include flags in configuration change if their value hasn\'t changed."
* commit '89eed125590c6286fa64e9074e95196c8cc4bd27':
  Don't include flags in configuration change if their value hasn't changed.
2013-05-28 13:49:56 -07:00
Dianne Hackborn
c73220050e am f9b41efe: Merge "Don\'t include flags in configuration change if their value hasn\'t changed."
* commit 'f9b41efe17718a21df115d95c47a94d97a767076':
  Don't include flags in configuration change if their value hasn't changed.
2013-05-26 00:02:37 -07:00
Dianne Hackborn
f4bf0ae2a7 New ArrayMap class.
This is a new kind of key/value mapping that stores its data
as an array, so it doesn't need to create an extra Entry object
for every mapping placed in to it.  It is also optimized to reduce
memory overhead in other ways, by keeping the base object small,
being fairly aggressive about keeping the array data structures
small, etc.

There are some unit and performance tests dropped in to some
random places; they will need to be put somewhere else once I
decided what we are going to do with this for the next release
(for example if we make it public the unit tests should go in
to CTS).

Switch IntentResolver to using ArrayMap instead of HashMap.

Also get rid of a bunch of duplicate implementations of binarySearch,
and add an optimization to the various sparse arrays where you can
supply an explicit 0 capacity to prevent it from doing an initial
array allocation; use this new optimization in a few places where it
makes sense.

Change-Id: I01ef2764680f8ae49938e2a2ed40dc01606a056b
2013-05-24 16:36:14 -07:00
Santos Cordon
5c6370a405 am 8e3f01e9: am c1de2404: Merge "Update documentation of NEW_OUTGOING_CALL" into jb-mr2-dev
* commit '8e3f01e90ed51b055e0addb7d5114b732bd514b9':
  Update documentation of NEW_OUTGOING_CALL
2013-05-17 17:19:00 -07:00
Santos Cordon
ba70136713 Update documentation of NEW_OUTGOING_CALL
Adds call-handling as a use case for NEW_OUTGOING_CALL

bug: 8987211
Change-Id: Icd9c53a2dd1a5948a749e133600db21c2560fd1f
2013-05-17 15:58:12 -07:00
Danny Baumann
e7123a6601 Don't include flags in configuration change if their value hasn't changed.
This makes the check in updateFrom() match the logic in diff().

Change-Id: I3ab4e8460f7fbf985ef55b9514a8aa90d401d486
2013-05-15 11:12:42 +02:00
Amith Yamasani
ecd5afe1ef resolved conflicts for merge of 069d7e9b to master
Change-Id: Ia8fd5de3d4cc275fd358132bcb2c198d1e7b6877
2013-05-09 17:07:08 -07:00
Amith Yamasani
6fc1d4e8e6 Cache the scaled avatar drawables in the keyguard user switcher
Loading the avatar icons and drawing them into the sized bitmap
turns out to be quite expensive and the cost increases with number
of users. Caching them shaves off several hundred milliseconds from
Keyguard inflation time during user switching on the lockscreen.

For instance, 15ms vs. 750ms with 3 avatars on a certain 7" tablet.

Bug: 7986933
Change-Id: I3e2065bfa25aa263133ba204ca364c3b04d7c0ff
2013-05-09 14:44:38 -07:00
Dianne Hackborn
3aa49b6fec New UndoManager.
Basic implementation of an undo manager.  Supports
multi-level undo/redo, building on the top undo state
as edits occur, managing multiple distinct entities in
the undo state (such as embedded objects in a document),
and saving/restoring the full undo state.  Still some
work remaining on correctly dealing with dependencies
between undo states that hold multiple owners.

Also do a simple implementation of undo state in TextView
to see how things actually work.  The implementation here
is very primitive: it needs a lot more work to correctly
identify when to merge undo ops, is not trying to do
anything smart with style spans, etc.

Change-Id: Ie30f4e133351e2f569ffb48c6c44a2b19cadee27
2013-05-07 15:05:09 -07:00