Added support for predefined namespace http://schemas.android.com/apk/res/auto
that aapt tool recognizes and treats as namespace with package name
taken from current application's AndroidManifest.xml, //manifest/package attribute.
Signed-off-by: inazaruk <ievgenii.nazaruk@gmail.com>
(cherry picked from commit e348909c1966c3d192841cc131a32be6ed90da18)
Change-Id: I4bff836c42a309bac36e5d1ce1899131b3c4c194
XmlPullAttribute can query for attributes and return them in a given
format. We need to make sure they are first resolved before
trying to convert them to int/float/boolean/...
Change-Id: I2aaced022a0382e501978c396e49d6191d53bdc8
Instead of using a simple ImageView for the icon, this uses the platform
layout/action_bar_home which uses a custom class to position and resize
the icon (and also supports the Up icon that we don't yet support).
This ensures that the icon is properly positionned and sized like
on devices.
(cherry picked from commit 7396348dfcfb45b7ad055f4c18cabbe5e8270d26)
Change-Id: Ifd3bc318089b70ba843519523e366e59d434e919
This patchset introduces a new standard namespace http://schemas.android.com/tools
which will be used for tools specific XML attributes.
Any attributes using this namespace will not be compiled into the binary XML file.
The namespace node is also not written at all, and its string is not collected
to ensure that there is no impact on the devices.
(cherry picked from commit a5d5e9d906583ebeb590ca200ca9840302a5cd1a)
Change-Id: I62937b8bc34c07ac544930aa8eadd7797e0179d5
This fixes a bug where the device fails to lock when DevicePolicyManagerService
requests the device to be locked and the screen was off because the user hit
the power button.
The change allows DPMS to directly invoke screen lock, bypasssing the screen state.
Change-Id: Iecdda6fc61e9c519119de495be23c69c3b983921
There's no printf %zd on Mingw/Cygwin so the verbose
printf crashes aapt.
SDK bugs: 20395, 20986
Bug: 5742142
(cherry picked from commit f51125d8429ffa71c57ba6fbdca9effc72642a9b)
Change-Id: I7545734ce8ce4a1f3e95f8a255daa8a909f870a1
Make surface management between SurfaceView and the window manager
much more controlled, to ensure that SurfaceView always gets to report
the current surface is destroyed before the window manager actually
destroys it.
Also a small tweak to allow windows that have a wallpaper background
to still have a preview window. This makes launching home after it
has been killed feel much more responsive.
Change-Id: I0d22cf178a499601a770cb1dbadef7487e392d85
This fixes the build on Linux when RefBase is compiled with reference tracking
enabled.
Change-Id: I3e931e0b463ce836f6fdb30c37068d77144631a3
Signed-off-by: Iliyan Malchev <malchev@google.com>
It is no longer sufficient to check the value of
internal.R.bool.config_showNavigationBar to determine if a
navigation bar (separate from the status bar) is shown on a
device, because the emulator needs to be able to override
this value (now possible by setting qemu.hw.mainkeys to "1"
or "0", for navbar or no navbar, respectively).
This logic is now contained in PhoneWindowManager, and any
clients wishing to know whether the system has a software
nav bar should consult the new hasNavigationBar() method.
Bug: 5404945
Change-Id: I119d32a8c84b88b2ef46f63244e7f11dc5de0359
This adds a --preferred-configurations flag that specifies the
specific configurations you would like to have.
It is smarter than "-c" because it will avoid stripping a
configuration if that would result in there being no value
for the resource.
It is dumber than "-c" because it can't process as many kinds
of resources. It is really only intended for bitmaps and use
with density configs.
This required re-arranging AaptAssets to group files together
by config again, like they used to be. I think this hasn't
broken anything. Hopefully.
Change-Id: I4e9d12ff6e6dbd1abb8fd4cb1814c6674b19d0e5
Bug: 5332296
Ensure that there is always an owner for each CursorWindow
and that references to each window are acquired/released
appropriately at all times.
Added synchronization to CursorToBulkCursorAdaptor to
prevent the underlying Cursor and CursorWindow from being
remotely accessed in ways that might violate invariants,
resulting in leaks or other problems.
Ensured that CursorToBulkCursorAdaptor promptly releases
its references to the Cursor and CursorWindow when closed
so they don't stick around longer than they should, even
if the remote end hangs onto the IBulkCursor for some reason.
CursorWindow respects Parcelable.FLAG_WRITE_RETURN_VALUE
as an indication that one reference to the CursorWindow is
being released. Correspondingly, CursorToBulkCursorAdaptor
acquires a reference to the CursorWindow before returning
it to the caller. This change also prevents races from
resulting in the transfer of an invalid CursorWindow over
the wire.
Ensured that BulkCursorToCursorAdaptor promptly releases
its reference to the IBulkCursor when closed and throws
on attempts to access the cursor while closed.
Modified ContentProviderNative to handle both parts of
the wrapping and unwrapping of Cursors into IBulkCursors.
This makes it a lot easier to ensure that the right
things happen on both ends. Also, it turns out that
the only caller of IContentProvider.bulkQuery was
ContentProviderNative itself so there was no need
to support bulkQuery on ContentProviderProxy and it was
just getting in the way.
Implement CloseGuard on CursorWindow.
Change-Id: Ib3c8305d3cc62322f38a06698d404a2989bb6ef9
This cleans up how ui flags are managed between the client and window manager.
It still reports the global UI mode state to the callback, but we now only clear
certain flags when the system goes out of a state (currently this just means the
hide nav bar mode), and don't corrupt other flags in the application when the
global state changes.
Also introduces a sequence number between the app and window manager, to avoid
using bad old data coming from the app during these transitions.
Change-Id: I40bbd12d9b7b69fc0ff1c7dc0cb58a933d4dfb23
Also parse fallback_fonts.
This lets layoutlib automatically use the same fonts as the base
platforms, for instance it now uses the new ICS fonts.
Change-Id: Id6e778dc0e3f2a9112601e0eaf8499a9713ec433
This include a fix in layoutlib_create to properly handle
delegating a static method of an inner class (was broken and
only worked on non static method).
Added a few comments here and there to *_Accessor classes so
that it's a bit more obvious what they are for and how they are
used.
Change-Id: Ifc31dd1a006393bb0c08e22b6a17f500dd62e090
Localized strings with product variants were not being included in the APK,
apparently because the check to ensure that a different variation of the
string had not already been included in the APK was matching the version
of it from the default, untranslated configuration.
Now check to make sure that the string not only exists but also exists in
the correct configuration.
Bug 5372711
Change-Id: I52975570b75e0f11827dc6bcf1cb4a987d0541aa
Bug: 4981385
Changed the orientation listener to notify the policy whenever
its proposed orientation changes, and changes the window manager
to notify the orientation listener when the actual orientation
changes. This allows us to better handle the case where the
policy has rejected a given proposal at one time (because the
current application forced orientation) but might choose
to accept the same proposal at another time.
It's important that the proposal always be up to date. A proposal
becomes irrelevant as soon as the phone posture changes such
that we can no longer determine the orientation with confidence
(such as when a device is placed flat on a table).
Simplified the orientation filtering. Now we just wait 200ms
for the device to be still before issuing a proposal. The idea
is that if the device is moving around a lot, we assume that
the device is being picked up or put down or otherwise in
the process of being moved. We don't want to change the rotation
until that's all settled down. However, we do want to tolerate
a certain amount of environmental noise.
(The previous confidence algorithm was also designed along
these lines but it was less direct about waiting for things
to settle. Instead it simply made orientation changes take
longer than usual while unsettled, but the extra delay was often
too much or too little. This one should be easier to tune.)
Change-Id: I09e6befea1f0994b6b15d424f3182859c0d9a530
...Should Skip Unsecure Lockscreen (ICS)
Also while I am in there, clean up logging of intent objects to include
even less sensitive information, while showing the true Intent in dump
output (since apps can't get to that).
Change-Id: I35fed714645b21e4304ba38a11ebb9c4c963538e