1067 Commits

Author SHA1 Message Date
Craig Mautner
e0a3884cb6 Extend stack management to other displays.
- Abandon ActivityContainer.startActivity() in favor of
IActivityManager.startActivityAsUserInContainer().
- Modify Am to test starting an activity on a container.
- Create a DisplayContext as the base context if the activity token
is on a different display.
- Test for home display in more cases when manipulating home stack.
- Rename mDisplayInfos => mActivityDisplays.
- Create new method for moving task to front of stack regardless of
which display it is on.

Change-Id: I4fcb83ae844c5839ee3e2722229623d1a80ed921
2014-01-06 08:51:21 -08:00
Craig Mautner
4a1cb22056 Pair ActivityStacks with Displays
- Introduce concept of ActivityStacks residing on Displays and able
to be decoupled and moved around.
- Add a new interface, IActivityContainer for clients to handle
ActivityStacks.
- Abandon ordering of stacks based on mStackState and instead use
ActivityDisplayInfo.stacks<ActivityStack> ordering.

Progress towards closing bug 12078972.

Change-Id: I7785b61c26dc17f432a4803eebee07c7415fcc1f
2013-12-18 15:08:15 -08:00
Nick Kralevich
fc800d407d am fbd6d5a8: am 09fdc159: am 3ddee4de: Merge "[bootanimation] Drop user loadable bootanimation.zip abiltiy."
* commit 'fbd6d5a8f8f242ab5a079cc6ed12e2ebaa8bb226':
  [bootanimation] Drop user loadable bootanimation.zip abiltiy.
2013-12-16 18:44:04 +00:00
Nick Kralevich
09fdc15955 am 3ddee4de: Merge "[bootanimation] Drop user loadable bootanimation.zip abiltiy."
* commit '3ddee4dec9b7ae2265c356f5809eae73e1ef8796':
  [bootanimation] Drop user loadable bootanimation.zip abiltiy.
2013-12-16 10:36:39 -08:00
Robert Craig
cee6a096b1 [bootanimation] Drop user loadable bootanimation.zip abiltiy.
A prior change removed the ability of
the shell to push to /data/local. Because
of this, the bootanimation code no longer
supports users loading custom bootanimation.zip
files. This patch drops the access attempt
from the code.

Change-Id: Ie30dd73699c8296be00dc6fbf14691e08baa6410
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2013-12-16 09:42:51 -05:00
Nick Kralevich
411954aef0 am a6416309: am 1e137549: am efa5c88f: Merge "Don\'t try to set service.bootanim.exit"
* commit 'a64163093e6e55f8bbb0153e783fb0ab635e9e60':
  Don't try to set service.bootanim.exit
2013-12-11 22:08:05 +00:00
Narayan Kamath
0bc3607c28 am 9f09408e: am 336bf2fb: am d21752df: Merge "Reimplement ZipFileRO in terms of libziparchive."
* commit '9f09408e3939c5afdb3f9dafc41afd249303ed7f':
  Reimplement ZipFileRO in terms of libziparchive.
2013-12-11 22:02:25 +00:00
Nick Kralevich
1e137549fe am efa5c88f: Merge "Don\'t try to set service.bootanim.exit"
* commit 'efa5c88f37165d02e3e11882026c7660c879ff61':
  Don't try to set service.bootanim.exit
2013-12-11 13:53:29 -08:00
Nick Kralevich
e58d09a552 Don't try to set service.bootanim.exit
init has never allowed the bootanimation code to
set service.bootanim.exit, and has always generated the
dmesg error message

  <3>[   17.644615] init: sys_prop: permission denied uid:1003  name:service.bootanim.exit

Since setting this property has no effect and never worked, delete
the code which tries to do it.

Change-Id: Idacc5467d85479a8cf974702af8895011be585ea
2013-12-11 13:10:55 -08:00
Narayan Kamath
336bf2fb49 am d21752df: Merge "Reimplement ZipFileRO in terms of libziparchive."
* commit 'd21752dff45c7d8856e63026cfddc303a302df14':
  Reimplement ZipFileRO in terms of libziparchive.
2013-12-11 03:45:58 -08:00
Narayan Kamath
d21752dff4 Merge "Reimplement ZipFileRO in terms of libziparchive." 2013-12-11 11:41:10 +00:00
Craig Mautner
bdc748af8c DO NOT MERGE: Eliminate StackBox.
StackBox is too constraining. Adding size and position to TaskStacks
directly makes stack positioning and management more flexible and
prepares for ActivityView.

Change-Id: I33c6b4e1c23a5a8069fd507c160bcb34e4d287b2
2013-12-09 15:15:34 -08:00
Narayan Kamath
afd31e0829 Reimplement ZipFileRO in terms of libziparchive.
This lets us share zip archive processing code with both
the runtime (Art, dalvik) and critical java code
(StrictJarFile).

This change also moves several utility methods to ZipUtils
and dedups code across several zip inflation methods.

One of the side effects of this change is that several
processing loops are now O(n) instead of O(n^2).

bug: 10193060

Change-Id: I3c7188496837a47246c4f342e45485a70fef3169
2013-12-09 16:23:16 +00:00
The Android Open Source Project
dbccd44a63 Merge commit 'b873a17ce7be0a9771c24999adca6964431728f6' into HEAD
Change-Id: I938755073e70602cc8f51ce9bd420fdcf870cecd
2013-11-22 11:18:57 -08:00
Christopher Tate
c8ea38fe18 am e3705342: am b0183f0a: Harden against transiently unavailable backup transports
* commit 'e3705342671d08b5cd94a0d69ef8099a2c3211f8':
  Harden against transiently unavailable backup transports
2013-11-19 11:48:50 -08:00
Christopher Tate
b0183f0ae3 Harden against transiently unavailable backup transports
The init & clear operations are particularly important to ensure
delivery when at all possible, so we retry those periodically
if the transport is unavailable when we first attempt them.

Now with 100% less build break.

Bug 11716868

Change-Id: I2af4e93788068cfac97c0a48d3568c561eefa23d
2013-11-19 11:24:46 -08:00
Sascha Prueter
a9249322d5 am c7f7d1bf: am f7044fec: Merge "Trying to unbreak build..." into klp-dev
* commit 'c7f7d1bf18dded61bcbf4015a4cfc9cf1ee45bd4':
  Trying to unbreak build...
2013-11-18 23:31:11 -08:00
Sascha Prueter
d5965cb506 Trying to unbreak build...
Revert "Harden against transiently unavailable backup transports"

This reverts commit 8f98252afea3fd0e68693635ec21b6004a52fa69.

Change-Id: I3aabb80f1a5932d530bce6b82d4b30c6cd1cdd5a
2013-11-19 06:51:21 +00:00
Christopher Tate
fa331b1dfb am 1e964ed8: am d6bbc544: Merge "Harden against transiently unavailable backup transports" into klp-dev
* commit '1e964ed808798a56664853e2aeffdc47c676ac5a':
  Harden against transiently unavailable backup transports
2013-11-18 18:48:29 -08:00
Christopher Tate
8f98252afe Harden against transiently unavailable backup transports
The init & clear operations are particularly important to ensure
delivery when at all possible, so we retry those periodically
if the transport is unavailable when we first attempt them.

Bug 11716868

Change-Id: I4860fe3d4e99618b2cd194c83162bd7cbd5a83a9
2013-11-18 16:12:38 -08:00
Jeff Sharkey
be20c89731 am 601fbc7a: am 24fe066e: Merge "Fix am argument ordering documentation." into klp-dev
* commit '601fbc7a82f325971905b6083e1c54776aa87a6d':
  Fix am argument ordering documentation.
2013-11-14 11:08:19 -08:00
Jeff Sharkey
7625c84045 Fix am argument ordering documentation.
Bug: 11690520
Change-Id: I84b10a6eb6e6404212ab9737e7cee1f1ad4d5309
2013-11-14 10:57:55 -08:00
Elliott Hughes
ed84dea928 am 8f592378: am 69920427: Merge "Fix a variety of small publicly-reported bugs."
* commit '8f592378a1ea7f31d57253dc202f42707ef4da36':
  Fix a variety of small publicly-reported bugs.
2013-10-29 13:35:04 -07:00
Elliott Hughes
c367d48c55 Fix a variety of small publicly-reported bugs.
Possible NULL dereference in cmds/bootanimation/BootAnimation.cpp.
https://code.google.com/p/android/issues/detail?id=61556

Missing fclose in core/jni/android_os_Debug.cpp.
https://code.google.com/p/android/issues/detail?id=61546

Bad loop guards in core/jni/android_util_Process.cpp.
https://code.google.com/p/android/issues/detail?id=61557

Assignment to wrong variable in libs/androidfw/AssetManager.cpp.
https://code.google.com/p/android/issues/detail?id=61560

Missing delete[]s in libs/androidfw/ObbFile.cpp.
https://code.google.com/p/android/issues/detail?id=61549

Leaks on error in tools/aapt/Images.cpp.
https://code.google.com/p/android/issues/detail?id=61552

Two missing fclose calls in tools/aapt/Resource.cpp.
https://code.google.com/p/android/issues/detail?id=61553

Missing fclose in tools/aidl/aidl.cpp.
https://code.google.com/p/android/issues/detail?id=61554

Change-Id: I5820f3824e72d07a9acb776cf0af3e7443f5694a
2013-10-29 13:12:55 -07:00
Jean-Michel Trivi
9633629b79 am 65d57713: am bacb5422: Merge "Also rely on enabled notification listeners for RemoteController registration" into klp-dev
* commit '65d577139c8093f2a601069bbe05d2e622e0d340':
  Also rely on enabled notification listeners for RemoteController registration
2013-10-07 10:10:08 -07:00
Jean-Michel Trivi
f108cdd9ee Also rely on enabled notification listeners for RemoteController registration
Registration of a RemoteController may succeed only if:
 - the caller has the MEDIA_CONTENT_CONTROL permission,
 - or if the RemoteController.OnClientUpdateListener it
   registers if one of the enabled notification listeners.

For using the "enabled notification listener" functionality,
 the CL involved:
 - making OnClientUpdateListener an interface so a 3rd-party
   application may have its implementation extend
   NotificationListenerService, which is required for a
   listener to be enabled by the user.
 - add the concept of "enabled" status in an
   IRemoteControlDisplay, so a RemoteController (which
   encapsulates the IRemoteControlDisplay implementation)
   may be registered, but later temporarily disabled by
   the user, as a result of a user action in the security
   settings, or a user switch.
 - making MediaFocusControl, the component tied to
   AudioService, monitor changes in enabled notification
   listeners, and act upon enable/disable changes.

Bug 8209392

Change-Id: Ia8dfa2156c65668b2b0d4ae92048005912652d84
2013-10-04 17:50:44 -07:00
Nick Kralevich
b18e0d1433 am 78466f3e: am 69aa2f8a: Merge "revert ADDR_COMPAT_LAYOUT workaround."
* commit '78466f3eb59e804f9a6e770dbc8d764faa91ccb8':
  revert ADDR_COMPAT_LAYOUT workaround.
2013-09-18 16:04:24 -07:00
Nick Kralevich
d53afd2b05 revert ADDR_COMPAT_LAYOUT workaround.
Stop working around bad applications by setting ADDR_COMPAT_LAYOUT.
ADDR_COMPAT_LAYOUT is undesirable because it reduces the amount of
address space available to an application.

The Android emulator, in both 4.3 and 4.4, does not set
ADDR_COMPAT_LAYOUT. Anyone needing to test their application on a
version of Android without ADDR_COMPAT_LAYOUT can use the emulator
and reproduce the failures.

Change-Id: I8f753acc205798bd7f031026c7ece12d26de562c
2013-09-18 14:29:46 -07:00
Dianne Hackborn
35f72be50b Implement issue #10691359: Kill long-running processes
We now have the activity manager kill long-running processes
during idle maintanence.

This involved adding some more information to the activity manager
about the current memory state, so that it could know if it really
should bother killing anything.  While doing this, I also improved
how we determine when memory is getting low by better ignoring cases
where processes are going away for other reasons (such as now idle
maintenance).  We now won't raise our memory state if either a process
is going away because we wanted it gone for another reason or the
total number of processes is not decreasing.

The idle maintanence killing also uses new per-process information
about whether the process has ever gone into the cached state since
the last idle maintenance, and the initial pss and current pss size
over its run time.

Change-Id: Iceaa7ffb2ad2015c33a64133a72a272b56dbad53
2013-09-16 14:05:34 -07:00
Andy McFadden
c0046f2167 Add #! to 'am' shell script
Shell script needs to start with #! for exec().

Bug 10606037

Change-Id: I594da6f0433e838dcf5b45b991188ceaa52d9bd1
2013-09-04 15:39:51 -07:00
Michael Wright
2132198d05 Fix check for default source in input command
Change-Id: I30b062e78c7d4de59a5530999e6332ba3053f7c9
2013-08-22 15:01:15 -07:00
Derek Sollenberger
5827cb5059 Changes needed to support Skia at r10377.
Change-Id: Id1e1c8c5938ee1a33c6fa3caabd2c28e89243eb4
2013-08-01 12:52:21 -04:00
Mathias Agopian
b251f3d0c6 get rid of HAL pixelformats 5551 and 4444
Change-Id: I6a6c4c656d80280eb85f90f99f35721ffca285df
2013-07-26 14:58:00 -07:00
Mathias Agopian
6f7b589171 get rid of PIXEL_FORMAT_A_8
Change-Id: Ia750811f08ddebdd5818da211fd03d61b75f8e97
2013-07-25 17:25:02 -07:00
Dianne Hackborn
57a7f5954c Add "adb shell am restart" command.
So you can restart the system without being root.

Change-Id: I89770f497833ecbe2b69e3a0cfafae7ef472a9f5
2013-07-23 11:51:22 -07:00
Michael Wright
77a2dabf01 Fix swipe end location
Change-Id: I997ca30dc5399b36e13516c4aeadbdf6fa357df7
2013-07-22 13:58:45 -07:00
Michael Wright
5712ca7f2e Merge "Allow duration without source to be set for input commands" 2013-07-19 22:44:01 +00:00
Michael Wright
9d83b4783c Allow duration without source to be set for input commands
Change-Id: Ib04badeddf0e9d6ff1b275da34ad259f59c1cbbd
2013-07-17 16:04:03 -07:00
Jeff Brown
ef69117979 Remove dead code in system server initialization.
System server always forks from Zygote so we no longer need
the system_server executable which was probably broken anyhow.
This makes the initialization sequence slightly more intelligible.

Likewise, we don't need the GrimReaper anymore because init
will automatically take care of restarting the system when the
service manager dies.

Change-Id: I02c88d9392f7c8133d9cde9d0d978da89ed80452
2013-07-15 15:08:39 -07:00
Marco Nelissen
f2ca6e2717 Add stopservice command to am
Change-Id: I639ad418750c0e1825b330b3bd56e5628926e7f1
2013-07-11 09:32:30 -07:00
Amith Yamasani
5fa9f2b127 Merge "Single-user restrictions" 2013-06-26 23:04:32 +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
Evan Charlton
4d7dc1a2b1 Fix a typo
s/will/while/ for the --no-window-animation explanation.

Change-Id: Ia068809d385cc4f54f9603a8713a581fd4f59440
2013-06-25 14:49:08 -07:00
Craig Mautner
fd1ce8d5a7 Add new API getStackBoxInfo
Change-Id: Ie2861e5e31bb3876cfe2d5c3d04ff58bb3955634
2013-06-17 18:34:28 -07:00
Dianne Hackborn
cbfd23ee6f Add new API to retrieve a dumpsys of a single package.
Adds a platform API, and pm command.  Fixes some issues with
dumping per-package data in package manager, makes battery
stats able to dump per-package state.

Change-Id: I76ee6d059f0ba17f7a7061886792b1b716d46d2d
2013-06-11 14:26:53 -07:00
Craig Mautner
5a449154d1 Convert API refs to StackBox from ActivityStack.
- Removed IActivityManager.getStacks() since getStackBoxes() is better.
- Made createStacks operate relative to StackBox instead of TaskStack.
- Made resizeStack into resizeStackBox.

Change-Id: I7a0e1f4e34f399b4fd1180c60cc3989f9c2433f3
2013-05-24 16:12:57 -07:00
Craig Mautner
5ff1210172 Add retrieval of StackBox info for more flexibility
First step in permitting StackBoxes to be manipulated by user.
Necessary for Configuration changes coming down.

Change-Id: I4029926a35e4fdc59a5759fd9e4bae10bb308413
2013-05-24 12:50:15 -07:00
Craig Mautner
1602ec2188 Log stack issues and start resize effort.
- Modify Am.java to accept 'stack resize' command.

- Add logging for assigning home stack to non-home task to track down
bug. And maybe fix bug.

- Add template parameter to ArrayList.

Change-Id: Ia73182afc20e9e4430ddadebae034cecb3798eec
2013-05-13 14:39:39 -07:00
Guang Zhu
befa8b5553 Revert "Log stack issues and start resize effort."
Bug: 8935057

This reverts commit b0245edae86b5811ea743c0f4cea095488304b1a.
2013-05-12 23:10:39 -07:00
Craig Mautner
b0245edae8 Log stack issues and start resize effort.
- Modify Am.java to accept 'stack resize' command.

- Add logging for assigning home stack to non-home task to track down
bug. And maybe fix bug.

- Add template parameter to ArrayList.

Change-Id: If904c3ead623464ff5863b7241c68c1b7573bcf4
2013-05-12 10:27:38 -07:00