123 Commits

Author SHA1 Message Date
Adam Lesinski
9f97de1335 am a5a93f55: am 7f416631: Merge "Check feature bits before loading optional services" into klp-modular-dev
* commit 'a5a93f559d337ad5b79716b05ea43707eb779dc8':
  Check feature bits before loading optional services
2014-02-06 20:25:51 +00:00
Adam Lesinski
7f41663141 Merge "Check feature bits before loading optional services" into klp-modular-dev 2014-02-06 20:13:21 +00:00
Craig Mautner
d1c2c54211 Test for Configuration differences before changing.
Changing Configuration first and then testing for changes yields a
result indicating no change.

Fixes bug 12904769.

Change-Id: If7e39e843f15b1143d9877497d595511afabd020
2014-02-06 10:31:41 -08:00
Craig Mautner
af04b113dc am 14d74b82: am 1bf2b873: Defer detach until animations are complete.
* commit '14d74b82363e1a72b967590ee7118b239b276fb4':
  Defer detach until animations are complete.
2014-02-06 02:56:44 +00:00
Craig Mautner
643ca1e9a3 am 481b54be: am dc548483: Move activities from DisplayContent to TaskStack
* commit '481b54be1acb990bab3933b6248964e351bdcd99':
  Move activities from DisplayContent to TaskStack
2014-02-06 02:56:37 +00:00
Craig Mautner
14d74b8236 am 1bf2b873: Defer detach until animations are complete.
* commit '1bf2b873470d2ba8a4ac218da73516cc2b20aa76':
  Defer detach until animations are complete.
2014-02-06 01:00:35 +00:00
Craig Mautner
481b54be1a am dc548483: Move activities from DisplayContent to TaskStack
* commit 'dc548483ae90ba26ad9e2e2cb79f4673140edb49':
  Move activities from DisplayContent to TaskStack
2014-02-06 01:00:32 +00:00
Dianne Hackborn
6eb0fdb99b Merge "Improve logging of first wake lock, history size." 2014-02-06 00:41:49 +00:00
Dianne Hackborn
3d658bf20e Improve logging of first wake lock, history size.
We now try to have a better label for the first wake lock
that is acquired in the log.  This is done in two ways:

- The alarm manager now sorts the alarms it is going to
  execute so that wakeup alarms are first, which are more
  important w.r.t. which one should be logged.
- There is a new power manager facility to make a wake lock
  as "unimportant for logging," which just means in battery
  stats that a wake lock acquired after that can be considered
  the actual one to log.  This is only used by the alarm manager
  to mark its TIME_TICK alarms as unimportant for logging.

Also reworked the battery history code to be cleaner and a bit
smaller.  There is no longer a separate EVENT command, instead
the event code and tag are just another thing that can be included
in an UPDATE command.

The bits used in the first history int are also re-arrange, so
that only the ones that really change a fair amount in the state
bits are up at the top and there is no longer space used for
the command code (since now it is always just UPDATE).  This
allows us to have more room for the time delta at the bottom,
to better avoid situations where we need to write an int delta.

Change-Id: I1bb860ae5b558a248800b090b03a84fbf7acd68a
2014-02-05 16:40:51 -08:00
Craig Mautner
1bf2b87347 Defer detach until animations are complete.
Allowing the detach of ActivityStack from DisplayContent to happen
immediately was causing all sorts of problems associated with not
having a Display to complete the animations.

Waiting for animations to complete before either the detach or the
display removal fixes those problems.

Change-Id: I8a5663bfac5c3c1084ff4fcc451e0e38e8080265
2014-02-05 15:37:40 -08:00
Craig Mautner
dc548483ae Move activities from DisplayContent to TaskStack
Now that activities and tasks can be detached from a display do not
keep their state within the DisplayContent class. All such state is
now moved to the TaskStack class with this change.

Change-Id: Ie6b1811e9ec3f545782bad8c3461bd4f2d336b93
2014-02-05 13:35:24 -08:00
Adam Lesinski
898c13df7b Check feature bits before loading optional services
At startup, we check with PackageManager whether a system service is
available before attempting to load it. A system service is available
if its associated feature (similar to hardware features) is present.
This does not remove unavailable services from the compiled jar.

Change-Id: I13571805083aa4e65519a74acb52efd17b9fb3d7
2014-02-05 19:26:40 +00:00
Jake Hamby
dbe576ebd1 Merge "Add new RIL commands to read/write NV items and reset NV config." 2014-02-05 03:56:03 +00:00
Craig Mautner
9e4adfb358 resolved conflicts for merge of 32360147 to master
Change-Id: I97cc95f66df50006469f8debd286966cc21edb60
2014-02-04 15:55:19 -08:00
Craig Mautner
323601475e am df88d730: Add IIntentSender to ActivityContainer.startActivity
* commit 'df88d73092c62a1a3cd2b2056ca63ae2e70cc238':
  Add IIntentSender to ActivityContainer.startActivity
2014-02-04 23:38:28 +00:00
Craig Mautner
df88d73092 Add IIntentSender to ActivityContainer.startActivity
PendingIntents and IntentSenders can now be launched. Still does not
work once the host activity has been paused and resumed.

Window manager TaskStacks now exist independently of Displays and app
windows persist after Displays are removed below them. Attaching the
stack to a new Display does not yet restore the windows to it.

Fixes bug 12747909.

Change-Id: I509007ee23fda400b353f483cf6ecce08177763b
2014-02-04 15:10:13 -08:00
Jake Hamby
8f9b33e776 Add new RIL commands to read/write NV items and reset NV config.
Add new RIL commands and generic code cleanups.

The only changes required for OMA DM support are the
addition of five new methods in ITelephony.aidl for
reading/writing NV items and performing NV config and
radio resets (requires MODIFY_PHONE_STATE), along with
the new RIL request IDs in RILConstants.java.

Bug: 12864208
Change-Id: I958d2571580d98a49936ef2e6822e5ac086acbe2
2014-02-03 15:52:18 -08:00
Christopher Tate
31b4834b6d Merge "Introduce "IdleService" API to expose idle-time maintenance to apps" 2014-02-03 20:35:01 +00:00
Christopher Tate
d417d625d2 Introduce "IdleService" API to expose idle-time maintenance to apps
When an application wishes to do low-priority background work when the
device is otherwise idle (e.g. in a desk dock overnight), it declares
a service in its manifest that requires this permission:

     android:permission="android.permission.BIND_IDLE_SERVICE

to launch, and which publishes this intent filter:

    <intent-filter>
        <action android:name="android.service.idle.IdleService" />
    </intent-filter>

This string is declared in the API as IdleService.SERVICE_INTERFACE.

The service must be implemented by extending the new "IdleService"
class, which provides the API through which the system will communicate
with the app.

IdleService declares three methods, two of which are lifecycle callbacks
to the service, and the third of which is for the service itself to
invoke when appropriate.  The lifecycle callbacks are

    public abstract boolean onIdleStart();
    public abstract void onIdleStop();

The first of these is a notification to the service that an idle
maintenance interval has begun.  The service can then spin off
whatever non-UI work it wishes.  When the interval is over, or if
the OS determines that idle services should be shut down immediately,
the onIdleStop() method will be invoked.  The service must shut down
any background processing immediately when this method is called.

Both of these methods must return immediately.  However, the OS
holds a wakelock on the application's behalf for the entire period
between the onIdleStart() and onIdleStop() callbacks.  This means
that for system-arbitrated idle-time operation, the application does
not need to do any of its own wakelock management, and does not need
to hold any wakelock permissions.

The third method in IdleService is

    public final void finishIdle();

Calling this method notifies the OS that the application has finished
whatever idle-time operation it needed to perform, and the OS is thus
free to release the wakelock and return to normal operation (or to
allow other apps to run their own idle services).

Currently the idle window granted to each idle service is ten minutes.
The OS is rather conservative about when these services are run; low
battery or any user activity will suppress them, and the OS will not
choose to run them particularly often.

Idle services are granted their execution windows in round-robin
fashion.

Bug 9680213

Change-Id: Idd6f35940c938c31b94aa4269a67870abf7125b6
2014-01-31 15:41:40 -08:00
Narayan Kamath
dfd1aa4331 resolved conflicts for merge of 2cd0563c to klp-modular-dev-plus-aosp
Change-Id: Ia28df1c1aa084959ed9289bfe90e7f6a4bffb8a2
2014-01-31 12:57:24 +00:00
Hui Lu
945d69d7b8 am 3cab7fc1: Merge "Add proxy as another network." into klp-modular-dev
* commit '3cab7fc1b8f06166df3a58cf10d4a0db36bde788':
  Add proxy as another network.
2014-01-31 08:11:57 +00:00
Brian Carlstrom
a76be8ba7a Merge "frameworks/base: Rename persist.sys.dalvik.vm.lib to allow new default" 2014-01-31 00:21:16 +00:00
Brian Carlstrom
fdb98d4770 frameworks/base: Rename persist.sys.dalvik.vm.lib to allow new default
(cherry picked from commit c6c633608ad4cd77ed21227b0bdb11eb79797c31)

Bug: 12798969
Change-Id: Ibb7ed86867e4dca53ad7fe33326b08e6f5e664c4
2014-01-30 15:56:37 -08:00
Hui Lu
3cab7fc1b8 Merge "Add proxy as another network." into klp-modular-dev 2014-01-30 22:58:48 +00:00
Hui Lu
1c5624a012 Add proxy as another network.
Change-Id: I70cb6ac5604c4f0d6a752a291c40de2445ae98bb
2014-01-30 17:26:18 -05:00
Patrick Tjin
31068163b6 Formatting fix
Remove whitespace from end of Sync Status table

Change-Id: I5b0bf3380e0c67c769ec9c334f1374713c94aa94
2014-01-30 13:28:46 -08:00
Narayan Kamath
583b7b1671 am 39a789bf: am 7ae1726d: am aa9ba887: am 6e09eb4c: Merge "AArch64: Make graphics classes 64-bit compatible"
* commit '39a789bf6efd5c3478a442e60e896cae371fd04c':
  AArch64: Make graphics classes 64-bit compatible
2014-01-28 19:26:29 +00:00
Craig Mautner
e0d1e295f1 am af17925f: am 45b68ac3: am 09325627: am 245b58d6: am baf2c7a4: Merge "[ActivityManager]: Fix the activity visibility state not sync between ActivityManager and WindowManager"
* commit 'af17925f94c3a293022a4c41fc284a0a9312dcb6':
  [ActivityManager]: Fix the activity visibility state not sync between ActivityManager and WindowManager
2014-01-28 18:19:50 +00:00
Craig Mautner
af17925f94 am 45b68ac3: am 09325627: am 245b58d6: am baf2c7a4: Merge "[ActivityManager]: Fix the activity visibility state not sync between ActivityManager and WindowManager"
* commit '45b68ac3a7acb7af95fdfc5c0e31560b3c28c9f8':
  [ActivityManager]: Fix the activity visibility state not sync between ActivityManager and WindowManager
2014-01-28 18:17:31 +00:00
Ashok Bhat
36bef0bf30 AArch64: Make graphics classes 64-bit compatible
This a merger of two commits submitted to AOSP by
the following authors:

ashok.bhat@arm.com, david.butcher@arm.coma
craig.barber@arm.com, kevin.petit@arm.com and
marcus.oakland@arm.com

Due to the very large number of internal conflicts, I
have chosen to cherry-pick this change instead
of letting it merge through AOSP because the merge
conflict resolution would be very hard to review.

Commit messages below:

================================================
AArch64: Make graphics classes 64-bit compatible

Changes in this patch include

[x] Long is used to store native pointers as they can
    be 64-bit.

[x] Some minor changes have been done to conform with
    standard JNI practice (e.g. use of jint instead of int
    in JNI function prototypes)

[x] AssetAtlasManager is not completely 64-bit compatible
    yet. Specifically mAtlasMap member has to be converted
    to hold native pointer using long. Added a TODO to
    AssetAtlasManager.java to indicate the change required.

Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>

==================================================================

AArch64: Use long for pointers in graphics/Camera

For storing pointers, long is used in
android/graphics/Camera class, as native
pointers can be 64-bit.

In addition, some minor changes have been done
to conform with standard JNI practice (e.g. use of
jint instead of int in JNI function prototypes)

Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>

===================================================================

Change-Id: Id5793fa0ebc17ee8b1eecf4b3f327977fdccff71
2014-01-28 10:02:43 +00:00
Christopher Tate
63c92ed41e Merge "Update PackageMonitor to recognize new 'replacing' semantics" 2014-01-27 21:09:47 +00:00
Robert Greenwalt
36ca232441 Merge "Clean up dhcp no-op logging" 2014-01-27 19:50:10 +00:00
Christopher Tate
8b3e3ecc3d Update PackageMonitor to recognize new 'replacing' semantics
The ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE broadcast now uses the
EXTRA_REPLACING intent extra when it is sent as part of an upgrade operation
on a forward-locked application.  Update PackageMonitor to recognize this
new information and express it appropriately to the observer.

Bug 11988313

Change-Id: I34dfaa965dd322f4fa8945e7b83c9f2e8cf5269a
2014-01-27 11:38:45 -08:00
Narayan Kamath
7023df08f1 Revert "AArch64: Make graphics classes 64-bit compatible"
This reverts commit 18b4cbeedef21c1fa666a110a157bab66edff976.

Change-Id: I0c52983a3ab1ace3ff743de546a43eca28e5cb0e
2014-01-27 14:22:45 +00:00
Ashok Bhat
18b4cbeede AArch64: Make graphics classes 64-bit compatible
This a merger of two commits submitted to AOSP by
the following authors:

ashok.bhat@arm.com, david.butcher@arm.coma
craig.barber@arm.com, kevin.petit@arm.com and
marcus.oakland@arm.com

Due to the very large number of internal conflicts, I
have chosen to cherry-pick this change instead
of letting it merge through AOSP because the merge
conflict resolution would be very hard to review.

Commit messages below:

================================================
AArch64: Make graphics classes 64-bit compatible

Changes in this patch include

[x] Long is used to store native pointers as they can
    be 64-bit.

[x] Some minor changes have been done to conform with
    standard JNI practice (e.g. use of jint instead of int
    in JNI function prototypes)

[x] AssetAtlasManager is not completely 64-bit compatible
    yet. Specifically mAtlasMap member has to be converted
    to hold native pointer using long. Added a TODO to
    AssetAtlasManager.java to indicate the change required.

Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>

==================================================================

AArch64: Use long for pointers in graphics/Camera

For storing pointers, long is used in
android/graphics/Camera class, as native
pointers can be 64-bit.

In addition, some minor changes have been done
to conform with standard JNI practice (e.g. use of
jint instead of int in JNI function prototypes)

Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>

===================================================================

Change-Id: Ib3eab85ed97ea3e3c227617c20f8d213f17d4ba0
2014-01-27 13:28:16 +00:00
Craig Mautner
921f4f9264 am 38eda9c4: Remove unnecessary logging.
* commit '38eda9c42bf327f6f521c766ea716305e5f71c05':
  Remove unnecessary logging.
2014-01-25 01:30:58 +00:00
Craig Mautner
38eda9c42b Remove unnecessary logging.
Fixes bug 12593710.

Change-Id: I55c33bb4d6c9e17e810be7cc033e01fb9d2d6cf7
2014-01-24 17:26:52 -08:00
Dianne Hackborn
31d9989e75 Merge "Add app version codes to procstats." 2014-01-24 23:30:51 +00:00
Dianne Hackborn
8472e6189c Add app version codes to procstats.
Now the per-package proc stats data is also per-app-version-code.

In addition to changing the data structure to have one more
SparseArray and passing a version code all over, this also required
improving how we reset the stats so that we can prune a multi-package
process record back to a single package.  Otherwise, as you install
updates to apps, the proc stats data would continue to explode as
the data for each of those app's processes got turned to a
multi-package due to tracking the old and new versions at the
same time.

This also bumps the checkin version code, since the package entries
also include a new field for the app version code.

Change-Id: I80de36addb0a75c7b08aef747c6f6c8012d01ee4
2014-01-23 18:00:11 -08:00
Robert Greenwalt
d01f8422da Clean up dhcp no-op logging
bug:10553167
Change-Id: I1f6feb9a44e17d45ffc9f28b37bf5690230a3ade
2014-01-23 16:05:25 -08:00
Christopher Tate
85642f8b23 am 222496f8: am 5d734dbc: am e1d18f6e: am 0e3df216: am cc81bcec: Merge "Only send storage intents after boot complete"
* commit '222496f82fb78473a876da5dc395714b0fa5b99c':
  Only send storage intents after boot complete
2014-01-23 00:05:29 +00:00
Christopher Tate
222496f82f am 5d734dbc: am e1d18f6e: am 0e3df216: am cc81bcec: Merge "Only send storage intents after boot complete"
* commit '5d734dbc56cd2d4350f4a35f1bedbb6b40247e5c':
  Only send storage intents after boot complete
2014-01-23 00:01:01 +00:00
Dianne Hackborn
39e79006cf Merge "Battery stats improvements." 2014-01-22 22:18:13 +00:00
Dianne Hackborn
099bc627c4 Battery stats improvements.
- Adjust total power use when there is unaccounted power so that our
  percentages don't end up > 100%.
- Fix accounting of isolated uids to be against the owning real app
  uids.
- Rework how we put cpu use into the battery stats to no longer need
  this uid name cache that can confuse the uid it is associated with.
- Finish implementing events in the history, adding a string pool and
  reading/writing/dumping them.
- Add first two events: processes starting and finishing.
- Fix alarm manager reporting of wakeup alarms to be adjusted by the
  WorkSource associated with the alarm, so they are blamed on the
  correct app.
- New "--history" dump option allows you to perform a checkin of
  only the history data.
- Fixed BitDescription bug that would cause incorrect printing of
  changes in some states.

Change-Id: Ifbdd0740132ed178033851c58f165adc0d50f716
2014-01-22 14:09:02 -08:00
Christopher Tate
79bea304ea am 46c95dfc: am b450505c: am a7a9327b: am 5474f085: am 9fc157a4: Merge "FLAG_PRIVILEGED disappears if privileged app is updated and rebooted"
* commit '46c95dfc1009607184ea023921e1f262f38cd61e':
  FLAG_PRIVILEGED disappears if privileged app is updated and rebooted
2014-01-22 01:58:58 +00:00
Christopher Tate
46c95dfc10 am b450505c: am a7a9327b: am 5474f085: am 9fc157a4: Merge "FLAG_PRIVILEGED disappears if privileged app is updated and rebooted"
* commit 'b450505c2e0d0dfd67bc228961a00a6eaaf092df':
  FLAG_PRIVILEGED disappears if privileged app is updated and rebooted
2014-01-22 01:55:07 +00:00
Jeff Brown
509cc13b70 am e2c9cd58: Merge "Refactor display manager service to new pattern." into klp-modular-dev
* commit 'e2c9cd583f4f706b48270b8cbe84df627c69af24':
  Refactor display manager service to new pattern.
2014-01-18 01:53:32 +00:00
Dianne Hackborn
84aa8ab3c6 Merge "Add --checkin to package manager dump." 2014-01-17 21:38:22 +00:00
Dianne Hackborn
60dc0d97fc Add --checkin to package manager dump.
Change-Id: Ibafd82f40dd4fa6a5b700a8b6725b007a528a92f
2014-01-17 13:29:21 -08:00
Jeff Brown
4ccb823a9f Refactor display manager service to new pattern.
Transform DisplayManagerService into a SystemService and start cleaning
up other local services that it uses from window manager and input manager.

Clean up service thread initialization.

Remove unnecessary static variables from ActivityManagerService.

It's starting to become clear that we really need a better way to manage
service dependencies.  Boot phases don't quite cut it.

Change-Id: If319dbd7cbfbd4812fe55ece969e818d4b20755b
2014-01-16 22:16:42 -08:00