89 Commits

Author SHA1 Message Date
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
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
Doug Zongker
35974112ec Merge "boot into recovery via the pre-recovery service" 2014-01-16 22:41:11 +00:00
Jeff Brown
265e87b408 Fix build.
Change-Id: I7e0000a5a98e443f27b90884a85bd6106c1f7b9b
2014-01-16 14:12:54 -08:00
Doug Zongker
3b0218b0ae boot into recovery via the pre-recovery service
Change PowerManagerService to start the pre-recovery service rather
than rebooting directly, when requested to reboot into recovery.  Add
a new RECOVERY permission which a caller needs (in addition to REBOOT)
in order to go to recovery.

Bug: 12188746
Change-Id: I39121b701c4724558fe751adfbad79f8567faa43
2014-01-16 12:54:59 -08:00
Jeff Brown
09d30981f8 resolved conflicts for merge of 6f357d32 to master
Change-Id: I1979e6ed1acddbe656f5010114fd900f10865e75
2014-01-16 11:44:20 -08:00
Jeff Brown
d3ee63b6c6 am 02cc684e: Delete unused power manager functionality.
* commit '02cc684e42b13454ba1a013340b41696323a4c2a':
  Delete unused power manager functionality.
2014-01-16 19:32:58 +00:00
Jeff Brown
6f357d3284 Start untangling system server early bootstrapping.
Refactored SystemServer to get rid of a bunch of legacy cruft related
to how the ServerThread used to be started up.

Create system context first when system server starts.  This removes
the tangled initialization order dependency that forced us to start
the activity manager service before most anything else.

Moved factory test related constants into the FactoryTest class.

Partially migrated Installer, ActivityManagerService, and
PowerManagerService to the new SystemService pattern.  There's more
work to be done here, particularly around the lifecycle of the
power manager.

Bug: 12172368
Change-Id: Ia527dd56e3b3fd90f9eeb41289dbe044921230d4
2014-01-16 11:24:58 -08:00
Jeff Brown
02cc684e42 Delete unused power manager functionality.
timeSinceScreenWasLastOn() was used by Watchdog previously but is no
longer so we can remove it.

Change-Id: I91c324b6c98c1aeb85f64b0296a41240e6c2ef4f
2014-01-16 11:24:58 -08:00
John Spurlock
ac2c9bf4ce Merge "Defend against malformed broadcast in NotificationManager." 2014-01-16 16:14:09 +00:00
John Spurlock
5d2eeb111a Defend against malformed broadcast in NotificationManager.
Bug:12583158
Change-Id: I4b10e19b9a23ff8e950006b3b3496bd6800346ea
2014-01-16 10:46:36 -05:00
Craig Mautner
441b57bce9 am 593a4e6f: Fix NPE when destroyActivity occurs after detach.
* commit '593a4e6f982cecddc3f2f6107044b5e12fab3e20':
  Fix NPE when destroyActivity occurs after detach.
2014-01-16 15:22:27 +00:00
Craig Mautner
fc8fa54f80 am e9ddaa0b: Merge "Cleanup after ActivityView" into klp-modular-dev
* commit 'e9ddaa0b183d979be782a63970929cebd861b7c9':
  Cleanup after ActivityView
2014-01-16 15:22:15 +00:00
Craig Mautner
593a4e6f98 Fix NPE when destroyActivity occurs after detach.
*** FATAL EXCEPTION IN SYSTEM PROCESS: ActivityManager
 java.lang.NullPointerException
 	at com.android.server.am.ActivityStack.removeTask(ActivityStack.java:3627)
 	at com.android.server.am.ActivityStack.removeActivityFromHistoryLocked(ActivityStack.java:2693)
 	at com.android.server.am.ActivityStack.activityDestroyedLocked(ActivityStack.java:2878)
 	at com.android.server.am.ActivityStack$ActivityStackHandler.handleMessage(ActivityStack.java:296)
 	at android.os.Handler.dispatchMessage(Handler.java:102)
 	at android.os.Looper.loop(Looper.java:136)
 	at com.android.server.am.ActivityManagerService$AThread.run(ActivityManagerService.java:1868)

Change-Id: Ifaf0fe6c62d1f63897d57dc96b4d86d8111b45db
2014-01-15 17:59:22 -08:00
Craig Mautner
34b73dfaa3 Cleanup after ActivityView
- Release Surface and VirtualDisplay when shutting down ActivityView.
- Shut down child stacks when relaunching parent activity.

Change-Id: I60314b2b43bd2da5406cf6ec871293b5baca157c
2014-01-15 17:47:51 -08:00
Dianne Hackborn
c8345b32c9 Merge "Add battery power use reporting to batterystats service." 2014-01-16 01:39:06 +00:00
Dianne Hackborn
a7c837f043 Add battery power use reporting to batterystats service.
Move the BatteryStatsHelper class (which computes power use based
on the raw battery stats) out of the settings app and in to the
framework.  It is now used by batterystats dump output to print
the computed power information from its current stats.

This involved a lot of refactoring of the BatteryStatsHelper code
to remove all of the UI dependencies.  I also did a bunch of cleanup
in it, such as making all power computations be in terms of mAh.

Change-Id: I8ccf2c9789dc9ad34904917ef57050371a59dc28
2014-01-15 16:20:44 -08:00
Craig Mautner
3a43aa9cef am 9cfb2e5f: Merge "Retain stacks even if they are empty." into klp-modular-dev
* commit '9cfb2e5f4c95c16d8ca531808f60486f214f9039':
  Retain stacks even if they are empty.
2014-01-15 01:10:51 +00:00
Craig Mautner
9cfb2e5f4c Merge "Retain stacks even if they are empty." into klp-modular-dev 2014-01-15 01:07:15 +00:00
Dianne Hackborn
6873e17d4b am 305c61a1: am 3a8a8ddd: am 8c359bf4: am c174288d: Fix issue #12031685: Sticky Service Breakage in Android 4.4.1
* commit '305c61a1c6816549b225719518df5b29a17f0f42':
  Fix issue #12031685: Sticky Service Breakage in Android 4.4.1
2014-01-14 01:53:07 +00:00
Craig Mautner
8ad31fb08d am 5c44c51c: Merge "Use new DisplayManager flag to show own content only." into klp-modular-dev
* commit '5c44c51c2a0b5a2268de07fab6854623188b5a7c':
  Use new DisplayManager flag to show own content only.
2014-01-14 00:05:41 +00:00
Craig Mautner
5c44c51c2a Merge "Use new DisplayManager flag to show own content only." into klp-modular-dev 2014-01-14 00:00:00 +00:00
Craig Mautner
529cbcd0af Use new DisplayManager flag to show own content only.
Change-Id: I8b2666e5849e57b5eb2ed73ed3d5e39da2dbd55d
2014-01-13 12:55:33 -08:00
Craig Mautner
04a0ea60ac Retain stacks even if they are empty.
Previously stacks would be removed when the last ActivityRecord was
removed. This causes problems for ActivityContainers which persist and
permit activities to be launched into an empty stack.

Change-Id: Ia79ac65d17c42eff3a7b1321980c21b29996001b
2014-01-13 12:51:26 -08:00
Daniel Cashman
94827c3484 am 21a801d0: am 0d30e07d: am 3d5ea26f: am 4503409a: Merge "Clear cached locations when location providers disabled Bug: 12118307" into klp-dev
* commit '21a801d0885d65f128b84a593140b07fd0d4e980':
  Clear cached locations when location providers disabled Bug: 12118307
2014-01-13 19:00:37 +00:00
Jeff Sharkey
4bc9432f28 am 38c65b1f: am 6fba240b: am 6d3700b3: am 47235e8b: am 90cadb35: Merge "MountService listeners can not be unregistered"
* commit '38c65b1f70042bc8e37e91106692158f0ce98703':
  MountService listeners can not be unregistered
2014-01-13 18:51:24 +00:00
Jeff Sharkey
38c65b1f70 am 6fba240b: am 6d3700b3: am 47235e8b: am 90cadb35: Merge "MountService listeners can not be unregistered"
* commit '6fba240b72e9ae2bc66c98b058e78aecd568ae3f':
  MountService listeners can not be unregistered
2014-01-13 18:47:41 +00:00
Craig Mautner
80a6e776e0 am cf6e0d68: Merge "Add display synchronously." into klp-modular-dev
* commit 'cf6e0d686f42036992bdac4f47d37bc8c0775027':
  Add display synchronously.
2014-01-13 05:44:18 +00:00
Craig Mautner
cf6e0d686f Merge "Add display synchronously." into klp-modular-dev 2014-01-13 05:33:51 +00:00
Craig Mautner
ad25fa36cb Add display synchronously.
Adding the virtual display to window manager through a handler message
causes timing issues. Add the display directly to fix it.

Change-Id: I3ad6b16ce6dff2a48abd120a8e873e11a028e2c3
2014-01-12 21:26:09 -08:00
Craig Mautner
663fb7a09e am da9b87a7: am 5d8936b4: am 27581792: am 54f99137: am 3747768b: Merge "Fix visibility of multiple non-fullscreen activities."
* commit 'da9b87a70994ed00868dd4405243932fe7e267f2':
  Fix visibility of multiple non-fullscreen activities.
2014-01-11 00:12:50 +00:00
Craig Mautner
da9b87a709 am 5d8936b4: am 27581792: am 54f99137: am 3747768b: Merge "Fix visibility of multiple non-fullscreen activities."
* commit '5d8936b4cfdb14941536e533c2cc376e99b9f7d5':
  Fix visibility of multiple non-fullscreen activities.
2014-01-11 00:09:22 +00:00
Craig Mautner
7ef6c04afd am d7c97a79: Merge "Remove misleading warnings." into klp-modular-dev
* commit 'd7c97a798f25d54a00adc0cfb2af4dedd5a4e3f2':
  Remove misleading warnings.
2014-01-10 23:10:20 +00:00
Craig Mautner
d7c97a798f Merge "Remove misleading warnings." into klp-modular-dev 2014-01-10 23:06:50 +00:00
Craig Mautner
330a6bd8a6 Remove misleading warnings.
Error messages that are obsolete and/or incorrect.

Fixes bug 12421138.

Change-Id: I43f095048757f7ae9bff47abed594dd34d8387ce
2014-01-10 15:05:29 -08:00
Craig Mautner
d4abbb964b am 93884a5b: Fix invalid stackId bug.
* commit '93884a5b35ec97a0f44795950363188d9a21137a':
  Fix invalid stackId bug.
2014-01-10 21:32:21 +00:00