summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Remove unused code"Romain Guy2012-01-191-11/+0
|\
| * Remove unused codeRomain Guy2012-01-191-11/+0
| | | | | | | | Change-Id: Ife0a43f3cfe64a1e74401b10bf74d37cbeefb5af
* | Fix broken drawCircle LayoutLib.Xavier Ducrohet2012-01-181-1/+1
| | | | | | | | Change-Id: I5e23bbe0119e385fa2f77854a8f88128351d3759
* | Improve heuristics for orientation detection.Jeff Brown2012-01-171-47/+69
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Except as otherwise indicated, orientation change happens once the predicted rotation has been stable for 40ms. Noise is suppressed by a low-pass filter with a 200ms time constant which seems to be about as small as is practical given the quality of the sensor data. 2. If the magnitude exceeds a threshold (excessive noise or freefall), resets the predicted orientation. Doesn't happen very often even when shaking the device. This heuristic mainly protects the detector from spurious tilt due to inaccurate determination of the gravity vector. 3. If the device was previously in a flat posture (on a table for at least 1000ms), then it must move out of that posture for at least 500ms before the next orientation change will happen. This heuristic suppresses most spurious rotations that happen while picking up the device. 4. If the device is tilted away from the user by 20 degrees within a span of 300ms, the device is said to be swinging and at least 300ms must elapse after the device stops swinging before the next orientation change will happen. This heuristic suppresses some but not all spurious rotations that happen while putting down a device. Unfortunately, this heuristic sometimes triggers a false positive when turning the device very rapidly due to accelerometer noise. The 300ms pause is a compromise so that occasional mispredicted swings don't significantly delay the rotation. Bug: 5796249 Change-Id: Id7b36c4c563e35b70d6a7ac36d04f3c3d6ea5811
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-2/+2
| | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
* Merge "Minor tweak to console output."Dan Morrill2012-01-061-0/+169
|\
| * Minor tweak to console output.Dan Morrill2012-01-061-0/+169
| | | | | | | | Change-Id: I494910eda1d02f6bcff945b9a13c83767f2248b6
* | Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGESteve Block2012-01-062-3/+3
|/ | | | | | | See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
* Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGESteve Block2012-01-041-1/+1
| | | | | | | See https://android-git.corp.google.com/g/156801 Bug: 5449033 Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
* Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGESteve Block2012-01-032-57/+57
| | | | | | | See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
* Add a new ui mode for "appliance"Joe Onorato2011-12-151-0/+5
| | | | | | | | The idea is that this is a device which is more-or-less headless. It might have some limited interaction capabilities, but it's not something that you want to rely on having. Change-Id: Ib92f53a120bf83de781728011721a4859def7d9f
* Add aapt support for implicitly-granted permissionsKenny Root2011-12-081-0/+19
| | | | | | Bug: 2363582 Bug: 2877343 Change-Id: Iff7b496fb845e45fe1be2317089a96f7d63ed223
* Merge "Upgrade layoutlib generation code to use ASM 4.0"Tor Norbye2011-12-069-242/+413
|\
| * Upgrade layoutlib generation code to use ASM 4.0Tor Norbye2011-12-059-242/+413
| | | | | | | | Change-Id: I46b3854a05677dc7cadd217efb001dbb25631fbd
* | Use a Choreographer to schedule animation and drawing.Jeff Brown2011-12-051-2/+5
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both animations and drawing need to march to the beat of the same drum, but the animation system doesn't know abgout the view system and vice-versa so neither one can drive the other. We introduce the Choreographer as a drummer to keep everyone in time and ensure a magnificent performance. This patch enabled VSync based animations and drawing by default. Two system properties are provided for testing purposes to control the behavior. "debug.choreographer.vsync": Enables vsync based animation timing. Defaults to true. When false, animations are timed by posting delayed messages to a message queue in the same way they used to be before this patch. "debug.choreographer.animdraw": Enables the use of the animation timer to drive drawing such that drawing is synchronized with animations (in other words, with vsync or the timing loop). Defaults to true. When false, layout traversals and drawing are posted to the message queue for execution without any delay or synchronization in the same way they used to be before this patch. Stubbed out part of the layoutlib animation code because it depends on the old timing loop (opened bug 5712395) Change-Id: I186d9518648e89bc3e809e393e9a9148bbbecc4d
* am 496f6e2a: am b54980d1: Merge "Fix issue #5588689: Black camera preview ↵Dianne Hackborn2011-11-281-1/+5
|\ | | | | | | | | | | | | after coming back from gmail" into ics-mr1 * commit '496f6e2ad656c5bb8a277e191554d16abd290b58': Fix issue #5588689: Black camera preview after coming back from gmail
| * Fix issue #5588689: Black camera preview after coming back from gmailDianne Hackborn2011-11-281-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Set theme-tag in render log when failing to find styleTor Norbye2011-11-011-1/+1
| | | | | | | | Change-Id: I20461a7113eb25469deca13dca870936bdb33a29
* | AAPT fix printf %zd crash on Windows.Raphael2011-10-272-5/+21
| | | | | | | | | | | | | | | | | | There's no printf %zd on Mingw/Cygwin so the verbose printf crashes aapt. SDK bugs: 20395, 20986 Change-Id: I5b8ac36749263205a19f1448b1aaca90d5a2e06d
* | Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-262-18/+18
|/ | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* add -ldl to host executablesIliyan Malchev2011-10-204-4/+4
| | | | | | | | 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>
* Add hasNavigationBar() to the window manager.Daniel Sandler2011-10-191-0/+4
| | | | | | | | | | | | | | | | 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
* Whoops, remove left-over debug output.Dianne Hackborn2011-10-161-1/+1
| | | | Change-Id: Ib30571b22a6750629f975319a403d38de5e9462c
* New aapt feature to do smarter filtering of configurations.Dianne Hackborn2011-10-1613-286/+615
| | | | | | | | | | | | | | | | | | | 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
* Fix ownership of CursorWindows across processes.Jeff Brown2011-10-091-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge "Fix issue #5371530: SYSTEMUI_FLAG_HIDE_NAVIGATION reasserts itself ↵Dianne Hackborn2011-10-062-4/+5
|\ | | | | | | immediately"
| * Fix issue #5371530: SYSTEMUI_FLAG_HIDE_NAVIGATION reasserts itself immediatelyDianne Hackborn2011-10-062-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Fix build.Jeff Brown2011-10-051-1/+1
|/ | | | Change-Id: I7bb00b8ee0da952f3697b23dccf32dde55733b7a
* LayoutLib: fix support for textScaleX.Xavier Ducrohet2011-10-041-1/+1
| | | | Change-Id: I821191a40012e9727b4a3573d580483c3ae1de48
* Layoutlib: Typeface support for loading fonts manually.Xavier Ducrohet2011-10-042-6/+61
| | | | | | | If the font being loaded is a system font, then we can find the font file and manually load it. Change-Id: I95473b1f1b88df64316b77c41ed05d4d09ab61ed
* Layoutlib now parses system_fonts.xml instead of its own.Xavier Ducrohet2011-10-042-179/+135
| | | | | | | | 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
* Layoutlib: add support for ITextServicesManager.Xavier Ducrohet2011-10-0310-12/+139
| | | | | | | | | | | | 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
* Merge "LayoutLib: Fix native delegate for Display."Xavier Ducrohet2011-09-301-2/+2
|\
| * LayoutLib: Fix native delegate for Display.Xavier Ducrohet2011-09-291-2/+2
| | | | | | | | Change-Id: If097cae2309d340162b3bac1d0f6a2289635adca
* | Add package-verifier to aapt dump badgingKenny Root2011-09-291-0/+10
|/ | | | | | Print out the package-verifier information when printing out badging. Change-Id: I9c79c163261d5d4f1094bda76d90b3ff6e1ce540
* am a94489b4: Merge "Don\'t lose product variant strings that also vary ↵Eric Fischer2011-09-282-1/+37
|\ | | | | | | | | | | | | between locales." into ics-factoryrom * commit 'a94489b4394350b1727437818cd4f6d845e97dc0': Don't lose product variant strings that also vary between locales.
| * Don't lose product variant strings that also vary between locales.Eric Fischer2011-09-272-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Prevent unintended rotations. Bug: 4981385"Jeff Brown2011-09-231-78/+54
|\ \
| * | Prevent unintended rotations.Jeff Brown2011-09-231-78/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Fix issue #5173952: Opening a Notification From Lock Screen...Dianne Hackborn2011-09-231-0/+3
|/ / | | | | | | | | | | | | | | | | | | ...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
* | Handle orientation changes more systematically.Jeff Brown2011-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 4981385 Simplify the orientation changing code path in the WindowManager. Instead of the policy calling setRotation() when the sensor determined orientation changes, it calls updateRotation(), which figures everything out. For the most part, the rotation actually passed to setRotation() was more or less ignored and just added confusion, particularly when handling deferred orientation changes. Ensure that 180 degree rotations are disallowed even when the application specifies SCREEN_ORIENTATION_SENSOR_*. These rotations are only enabled when docked upside-down for some reason or when the application specifies SCREEN_ORIENTATION_FULL_SENSOR. Ensure that special modes like HDMI connected, lid switch, dock and rotation lock all cause the sensor to be ignored even when the application asks for sensor-based orientation changes. The sensor is not relevant in these modes because some external factor (or the user) is determining the preferred rotation. Currently, applications can still override the preferred rotation even when there are special modes in play that might say otherwise. We could tweak this so that some special modes trump application choices completely (resulting in a letter-boxed application, perhaps). I tested this sort of tweak (not included in the patch) and it seems to work fine, including transitions between applications with varying orientation. Delete dead code related to animFlags. Handle pausing/resuming orientation changes more precisely. Ensure that a deferred orientation change is performed when a drag completes, even if endDragLw() is not called because the drag was aborted before the drop happened. We pause the orientation change in register() and resume in unregister() because those methods appear to always be called as needed. Change-Id: If0a31de3d057251e581fdee64819f2b19e676e9a
* | Fix build.Dianne Hackborn2011-09-181-1/+2
|/ | | | Change-Id: Ife2b4b207270f8017d3acd80c76eaf1c7a50986d
* Make setAdditionalInputMethodSubtypes asyncsatok2011-09-021-9/+1
| | | | | Bug: 5120261 Change-Id: Ic7869cfaa5361531e08d58d7dfa5ba0feab0613e
* Add new dependency generation option to aidl.Xavier Ducrohet2011-09-013-44/+81
| | | | | | | | | | | | | | | | | | | | | | The SDK build system does not provide an output file and instead uses the -o<FOLDER> option and lets aidl figure out the intermediary folders that represents the packages, and the filename based on the input file (and its package). Because of this the -d<FILE> option to generate a dependency file is not convenient. Instead the new option, -a (no parameters), automatically generate a dependency files next to the output file. Also, when compiling parcelable aidl files, without the -b option, a dependency file is still generated. This is used by the SDK build system since it cannot parse the file separately and instead tries to compile every .aidl file. The generation of this dependency file (which shows no output) allows to know when any type of aidl file has been compiled. Change-Id: If81dc7e1e0a780592c94d1850a1d1b094d6e7908
* Fix issue #4279860: previous UI flashes before showing lock screen...Dianne Hackborn2011-08-231-0/+4
| | | | | | | | | | ...(when turning display on after recently turning it off) Also clean up when we decide to turn the screen on to improve that transition. There are still problems here with turning it on before the wallpaper gets dispayed. Change-Id: I2bc56c12e5ad75a1ce5a0546f43a845bf0823e66
* LayoutLib: add native delegate for set/getHinting in Paint.Xavier Ducrohet2011-08-221-0/+25
| | | | Change-Id: I1758f8ce861240d72113aa23dcbef5a52abade56
* am d98e1be2: am f4750724: am 9d829f98: am 21e6e2de: Merge "Change generated ↵Xavier Ducrohet2011-08-183-9/+33
|\ | | | | | | | | | | | | dependency file names" * commit 'd98e1be20e1cca5c36c7e0344500d4a5574568aa': Change generated dependency file names
| * am f4750724: am 9d829f98: am 21e6e2de: Merge "Change generated dependency ↵Xavier Ducrohet2011-08-183-9/+33
| |\ | | | | | | | | | | | | | | | | | | file names" * commit 'f4750724cf8db972a052cb388dc9a39fc7aa6dd6': Change generated dependency file names
| | * am 9d829f98: am 21e6e2de: Merge "Change generated dependency file names"Xavier Ducrohet2011-08-183-9/+33
| | |\ | | | | | | | | | | | | | | | | * commit '9d829f98dc19edecb2305b61b9c79517c4f95383': Change generated dependency file names
| | | * Change generated dependency file namesJosiah Gaskin2011-08-163-9/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the name of the generated dependency files to R.java.d and <ApkName>.ap_.d respectively. Change-Id: I17e18770fc0d0a5d31c7b37b40ac1949f45ef13a