By calling WindowManagerService#reAddWindowLocked(), the window object
in DisplayContent.mWindows is rearranged. If this window has children,
the window objects belonging to WindowState.mChildWindows are also
rearranged together. At this time, while DisplayContent.mWindows is
arranged in ascending order of Z-Order, WindowState.mChildWindows is
arranged in descending order. Therefore, if children
(= WindowState.mChildWindows) are added to DisplayContent.mWindows
in the original order, the order of children is switched. I think
that children must be sorted before they are added.
Change-Id: I28a506f17fcd99c801a3faa17cca66fffb291596
In case of singletone provider, we don't count it in the guset user.
After we remove it from the array, and resize the array, need to move
iterator back.
Change-Id: I99920a6beccc9de0e67ffeb632b1940efaee10b9
When an SD card is removed without the user unmounting, the intent
ACTION_MEDIA_BAD_REMOVAL is fired but is missing the preceeding
ACTION_MEDIA_UNMOUNTED which is needed to keep UI consistency.
Now when bad media removal is detected an ACTION_MEDIA_UNMOUNTED
intent is sent before the ACTION_MEDIA_BAD_REMOVAL.
Change-Id: I133300f42bafab141351e796d7cfc13c15d133e0
When user reset password their password,
if password doesn't match target quality of device,
DPM print a log why can't reset password.
however log message isn't correct information.
in log context, it have to exist current quality
and target quality. this patch can help print correct log.
Change-Id: I5c8fb1c77ddbe1bdbc76e35038c897e2e8efb077
When an application's user data is cleared, the keystore entries need to
be cleared as well. Previously we were only clearing entries when the
application was uninstalled for all users. Now we cover the case of
multiuser as well.
(cherry picked from commit 6fd1c85d7f909580582e5ebc357564331ecef283)
Bug: 8566369
Change-Id: Id4df5e50661b676b8f6507b915764400982c01a0
Only call keystore if outInfo is not null
(cherry picked from commit 3b9933d0c2f2b9a2e973dca296ee45a69087e31c)
Bug: 8568820
Change-Id: I764980fd396dbc637732ad290eea2bd11036ec28
/data/system is no longer the right location for mac_permissions.xml.
Remove it.
Change-Id: Iabefb734b40d6785013bd6f6427931939fd0648b
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
/data/security is now the preferred location for updated policy files.
Add it for mac_permissions.xml.
Separate change will remove the old /data/system location.
Change-Id: I2774661e84c858c9b698ec60e224bbbcdac732f3
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Add a hook into PackageManagerService so that when app IDs are
completely removed, we erase all entries from keystore for those UIDs
that have gone away.
Bug: 3020069
Change-Id: Id4b1d51a5fa4c418865055635a84bebcf5b65ec8
If LockScreen is enhanced using SurfaceView/GLSurfaceView,
deadlock problem between LockScreen and WindowManagerService
can occur because of IWindow.resized() callback.
And it must lead to watchdog and reset.
IWindow.resized() callback is one-way function so calling resized()
callback of a remote IWindow object is never blocked.
However, calling resized() callback of a local IWindow object
(LockScreen is running on the same system_server process)
is always blocked until resized() callback returns.
Because resized() callback of SurfaceView/GLSurfaceView can lead to
WindowManagerService.relayoutWindow() call, deadlock can occur
between relayoutWindow() and performLayoutAndPlaceSurfacesLockedInner().
(Both functions need locking mWindowMap)
So this patch simulate one-way call when calling resized() callback
of a local IWindow object.
Change-Id: I2a6a5c74ed22d8e6b7a3bea3424ff2879d227105
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
Ensure that policy contains a clean seinfo
string. Where clean means no whitespace characters.
Change-Id: I814411cbc8d16eaed99a1389f5487529e36e617b
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
Patch adds the seinfo label per package to the file.
This is of particular interest to the run-as program
which uses the seinfo tag to correctly label the
app security context before running the shell.
Change-Id: I9d7ea47c920b1bc09a19008345ed7fd0aa426e87
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
This patch covers 2 cases. When an app is installed
and the resulting data directory is created for all
existing users. And when a new user is created and
all existing app data directories are created for
the new user.
Change-Id: Iacaba6d9d18d5337e65713960d14efe32006b330
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
This patch set allows the PMS to parse the
mac_permissions.xml file which contains the
seinfo values. Each package that is installed
on the device will be assigned an seinfo value
based on policy. This seinfo value will help label
the app process and data directory. Modifications
include adjustments to ApplicationInfo.java
to store the seinfo tag per package as well as
adjustments to installd to communicate the seinfo
tag to libselinux.
Change-Id: I61ad1ea12fb6a9a6d0b108ec163bc4bf4c954b58
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
The HeartbeatHandler for the System Server Watchdog has been running
on the wrong thread due to a race condition in initialization. It's
designed to run on ServerThread, so that it can catch lockups in the
main looper of the System Server. It has been running on
ActivityManagerThread instead, so it does not detect lockups on the
ServerThread as it should.
ActivityManagerService is calling Watchdog.getInstance() before
ServerThread calls Watchdog.getInstance().init(), so the handler is
being bound to the ActivityManagerThread instead of the ServerThread.
Explicitly bind HeartbeatHandler to ServerThread, so that the Watchdog
catches lockups on this critical thread.
Change-Id: Iccb184ac3adb817feb86ed4ee0e50e443bf74636
The root cause is:
There is a defect in window manager service: When a new
activity that can be ime target is added into window manager
but the Z order of input method window don't need to be
changed, then the target app token of input method window
would not be updated to new one. This defect may cause that
the layer of input method window is calculated incorrectly.
The solution:
Correct the target app token for input method window.
Change-Id: I008311e3c9b1cf5fc320b614d8675c183c506d50
The code currently in place assumes that orientation has a range
of [-pi/2, +pi/2] as may be found with a touch digitizer. However,
when used with a digitzer that can report the full [-pi, +pi] range
of orientations (e.g. a stylus) the calculations here are incorrect.
This patch checks if the post-rotation value is out of range for
the axis, and wraps it back around.
Change-Id: I03a22f7bf9526a5d995df1a18430d6dd24c6d6ee
[Reproduce the Path]
Precondition : Set "Auto-rotate screen" option to ENABLE
Calendar App lunch -> Rotate device to "Landscape" -> Touch "+" button(Add new Schedule)
-> Check the ime icons of the Status bar
Ime invisible status despite being the icon that appears in the statusbar.
Displays an icon in the status bar when the ime was actually visible state is modified to check.
Change-Id: If103ab909c5bfa6391eb51a696fb8b8f0b18808c
Hotplug events say which display they're for and whether the display
was connected or disconnected. Before, this info was ignored, and the
event just triggered a rescan of all displays. If a display was
disconnected and then reconnected quickly, the rescan would treat this
as a no-op or a device property change and wouldn't turn the display
on.
Now the display manager attempts to update its state with the change
the event describes. So a quick disconnect/connect cycle will cause
the display to be turned on since the display manager will have
updated its internal state to reflect the disconnect event, and will
treat the connect event as a new display rather than a device property
change.
Bug: 7491120
Change-Id: Ia83f7c96b7f16f4c1bed2a73e9b56b0bf7ee3984
# By Arun Ravindran
# Via Gerrit Code Review (1) and Shuo Gao (1)
* commit '9434c112d1fef52ade78d7ef818daf981bf63bef':
Services: Adding HSPAP info in Android
The broadcast of ACTION_SHUTDOWN has a timeout of 10 seconds. To
reduce the risk of hitting the timeout and speeding up the
shutdown sequence in ShutdownThread we set the priority of the
BroadcastReceivers to FLAG_RECEIVER_FOREGROUND.
We have seen that this change reduces the shutdown time when
the system is under heavy load.
Change-Id: I22cbf6af8cf6fc4bdefaa1c3da8a7eed7e7b7674
The getServiceInfo() call directly to IPackageManager does not throw an exception.
The return value needed to be checked for null.
Bug: 8031032
Change-Id: I701b9e8cf3b2406a3b35a486183330489b3d46f5