15996 Commits

Author SHA1 Message Date
Naofumi Harada
719b3b8075 FLAG_PRIVILEGED disappears if privileged app is updated and rebooted
Since Kitkat, an app pre-loaded under /system/priv-app/ has
FLAG_PRIVILEGED. However, if the app updated and the device
rebooted, privileged flag is unset from pkgFlags. This patch
fix issue to assign privileged flag when scanning the updated
packages.

Bug: 12640283

Change-Id: Ic24b5882f65dabdfae9cc39da3d68661bed4fc31
2014-01-21 07:41:11 +00:00
Johan Redestig
0464c07a9e Only send storage intents after boot complete
It is not possible to send a broadcast before the system
boot is completed. If you do it anyway you will get an
IllegalStateException: Cannot broadcast before boot completed.

If a memory card is inserted or removed while the phone is
booting up, there is a risk that the MountService will try to
broadcast a storage intent too early, and cause the device
to crash.

Use FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT to avoid
problems with too early broadcasts.

Change-Id: Ied36a13d235df37c9788e45a35de40d919ae0cd0
2014-01-18 22:46:56 +01: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
Christopher Tate
684d6f9f4d Adapt to underlying changes in the PBKDF2 implementation
We need to specify "PBKDF2WithHmacSHA1And8bit" now in order to get precisely
the same output as was previously generated with "PBKDF2WithHmacSHA1".  We
also now try both when it's ambiguous which was used to generate the archive
checksums.

Bug 12494407

Change-Id: I5443f31a5e13c24f44445768b6e9a6eea221ede6
2014-01-16 14:25:43 -08: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
Dianne Hackborn
305c61a1c6 am 3a8a8ddd: am 8c359bf4: am c174288d: Fix issue #12031685: Sticky Service Breakage in Android 4.4.1
* commit '3a8a8ddd7cff03e39d4cb104ddb1d0401b6c7ede':
  Fix issue #12031685: Sticky Service Breakage in Android 4.4.1
2014-01-14 01:47:15 +00:00
Dianne Hackborn
3a8a8ddd7c am 8c359bf4: am c174288d: Fix issue #12031685: Sticky Service Breakage in Android 4.4.1
* commit '8c359bf473b4c31407613dbc1473ba49b0297898':
  Fix issue #12031685: Sticky Service Breakage in Android 4.4.1
2014-01-13 17:45:16 -08:00
Dianne Hackborn
c174288d34 Fix issue #12031685: Sticky Service Breakage in Android 4.4.1
Got a little too aggressive about cleaning up service state; need to
avoid removing services from an app until we are in the second loop
doing the final cleanup, otherwise we can leave services around with
restarting their process.

Also fix crash:

W/BinderNative(  667): Uncaught exception from death notification
W/BinderNative(  667): java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
W/BinderNative(  667): 	at android.util.ArraySet.valueAt(ArraySet.java:301)
W/BinderNative(  667): 	at com.android.server.am.ActiveServices.killServicesLocked(ActiveServices.java:2069)
W/BinderNative(  667): 	at com.android.server.am.ActivityManagerService.cleanUpApplicationRecordLocked(ActivityManagerService.java:12412)
W/BinderNative(  667): 	at com.android.server.am.ActivityManagerService.handleAppDiedLocked(ActivityManagerService.java:3596)
W/BinderNative(  667): 	at com.android.server.am.ActivityManagerService.appDiedLocked(ActivityManagerService.java:3744)
W/BinderNative(  667): 	at com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied(ActivityManagerService.java:1024)
W/BinderNative(  667): 	at android.os.BinderProxy.sendDeathNotice(Binder.java:493)
W/BinderNative(  667): 	at dalvik.system.NativeStart.run(Native Method)
2014-01-13 17:10:03 -08: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
Daniel Cashman
21a801d088 am 0d30e07d: am 3d5ea26f: am 4503409a: Merge "Clear cached locations when location providers disabled Bug: 12118307" into klp-dev
* commit '0d30e07d23e9a2bcea4c1b3e61e12e68f5111fe2':
  Clear cached locations when location providers disabled Bug: 12118307
2014-01-13 18:57:19 +00:00
Daniel Cashman
0d30e07d23 am 3d5ea26f: am 4503409a: Merge "Clear cached locations when location providers disabled Bug: 12118307" into klp-dev
* commit '3d5ea26fbb92b1b780cd9763c0731288f48341a3':
  Clear cached locations when location providers disabled Bug: 12118307
2014-01-13 10:52:54 -08: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
Jeff Sharkey
6fba240b72 am 6d3700b3: am 47235e8b: am 90cadb35: Merge "MountService listeners can not be unregistered"
* commit '6d3700b394c7137ef95580d35223a402a3dd0e7c':
  MountService listeners can not be unregistered
2014-01-13 18:44:43 +00:00
Jeff Sharkey
6d3700b394 am 47235e8b: am 90cadb35: Merge "MountService listeners can not be unregistered"
* commit '47235e8b5ce6c622a1182933404cf5a17fcd35dc':
  MountService listeners can not be unregistered
2014-01-13 10:42:07 -08:00
Jeff Sharkey
90cadb3515 Merge "MountService listeners can not be unregistered" 2014-01-13 18:35:32 +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
5d8936b4cf am 27581792: am 54f99137: am 3747768b: Merge "Fix visibility of multiple non-fullscreen activities."
* commit '275817929a584b220a54b5c8206c7a7425da16d4':
  Fix visibility of multiple non-fullscreen activities.
2014-01-11 00:05:55 +00:00
Craig Mautner
275817929a am 54f99137: am 3747768b: Merge "Fix visibility of multiple non-fullscreen activities."
* commit '54f991375a9c7c2a256e6aec7d4a223be8d36b39':
  Fix visibility of multiple non-fullscreen activities.
2014-01-10 16:03:06 -08: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