summaryrefslogtreecommitdiffstats
path: root/tools/layoutlib/bridge
Commit message (Collapse)AuthorAgeFilesLines
...
| | | * Update platformDir search in tests. [DO NOT MERGE]Deepanshu Gupta2015-08-251-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When trying to find the SDK Platform Dir for LayoutLib tests, also test if the dir from which the tests are run is module dir. Change-Id: Id5c6038d07ebbb122e38f907ad488ed1f2bcde32 (cherry picked from commit 612a05e7e15184b21437731b9aa5db2d1d4fc54c)
| | * | am 2f50403f: am afedbc47: Make Context.getClassLoader() work. [DO NOT MERGE]Deepanshu Gupta2015-08-263-4/+23
| | |\ \ | | | |/ | | | | | | | | | | | | * commit '2f50403fe0a8a035757b047af00c7520fadb9015': Make Context.getClassLoader() work. [DO NOT MERGE]
| | | * Make Context.getClassLoader() work. [DO NOT MERGE]Deepanshu Gupta2015-08-253-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Context.getClassLoader() is used by the LayoutInflater and can be used by custom views. However, when called from the LayoutInflater, this needs to return only the Framework classes. This is so that the IDE gets a chance to instantiate the custom views, which helps in better error reporting and better fallback in case of exceptions, like MockView. To workaround this need of the same method returning different results based on where it's called from, the method call in LayoutInflater is renamed to getFrameworkClassLoader() and the new method is injected in Context. The implementation of getFrameworkClassLoader() maintains the existing behaviour of getClassLoader(). Context.getClassLoader() is now modified to return classes from both Framework and the app namespace. Also, update the list of packages to search for Framework views. Change-Id: I1a6be4aa1fc5c1c5520b5440a348a52f10b6eb3b (cherry picked from commit f8ea750455eec81e4e6d877b3e18e29a86d4ec95)
| | * | am de3ac8f9: am 92480a9a: Fix include tag rendering. [DO NOT MERGE]Deepanshu Gupta2015-08-262-11/+11
| | |\ \ | | | |/ | | | | | | | | | | | | * commit 'de3ac8f9fc5987ac1f1223da02b4275fdbae3d56': Fix include tag rendering. [DO NOT MERGE]
| | | * Fix include tag rendering. [DO NOT MERGE]Deepanshu Gupta2015-08-252-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A missing catch clause caused rendering to be failed when there is an include tag that doesn't specify layout_width and layout_height. Also improve the error messages to make debugging easier next time. Change-Id: I617762636973a010b34da167c7b5fcd328b7d178 (cherry picked from commit 21b564573327b1ed2f7e06146b8a01c47ede3089)
| | * | am 50e1406a: am f6b08547: Show better error message for color attr not ↵Deepanshu Gupta2015-08-261-0/+5
| | |\ \ | | | |/ | | | | | | | | | | | | | | | | | | | | found. [DO NOT MERGE] * commit '50e1406a4ad668179a9a3d28c58d68c0eee44237': Show better error message for color attr not found. [DO NOT MERGE]
| | | * Show better error message for color attr not found. [DO NOT MERGE]Deepanshu Gupta2015-08-251-0/+5
| | | | | | | | | | | | | | | | | | | | Change-Id: I1ca32989522d30fec336eb607ee81f9e5cb5f48f (cherry picked from commit 5f1bf496948fb6383ae17e5467a26a00489d7564)
| | * | am 81990c3f: am b1370c26: Fix build: udpate parser factory method [DO NOT MERGE]Deepanshu Gupta2015-08-261-2/+11
| | |\ \ | | | |/ | | | | | | | | | | | | * commit '81990c3f988369c755590288b93508e30024c56c': Fix build: udpate parser factory method [DO NOT MERGE]
| | | * Fix build: udpate parser factory method [DO NOT MERGE]Deepanshu Gupta2015-08-251-2/+11
| | | | | | | | | | | | | | | | | | | | Change-Id: I78ad55bc924427b44451ec32fbd1032d6cd77544 (cherry picked from commit 3dc19883c571a829c36aa603c04a55c91b00dd57)
| | * | am 0a07bb95: am aa729889: Don\'t keep LayoutlibCallback reference. [DO NOT ↵Deepanshu Gupta2015-08-263-86/+14
| | |\ \ | | | |/ | | | | | | | | | | | | | | | | | | | | MERGE] * commit '0a07bb95a1dd94c3457860a934d3ee546919cff2': Don't keep LayoutlibCallback reference. [DO NOT MERGE]
| | | * Don't keep LayoutlibCallback reference. [DO NOT MERGE]Deepanshu Gupta2015-08-253-86/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch to the newer API that enables keeping a reference only to the ParserFactory which is a much leaner object as compared to LayoutlibCallback. Conflicts: tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/android/BridgeXmlBlockParserTest.java Change-Id: I9b7afd93226db23786a00b2951cbf5ae5b8f3e5f (cherry picked from commit f2d408b51debadca830eefbf8131185ac55ce699)
| | * | am bbbdc2ad: am 5c90c4f4: Remove kxml dependency [DO NOT MERGE]Deepanshu Gupta2015-08-267-43/+151
| | |\ \ | | | |/ | | | | | | | | | | | | * commit 'bbbdc2ad8939c28828a8441c0b24812c53a9eb66': Remove kxml dependency [DO NOT MERGE]
| | | * Remove kxml dependency [DO NOT MERGE]Deepanshu Gupta2015-08-257-43/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create XmlPullParser using callback provided by the client. This enables clients to choose which XmlPullParser implementation they want. Change-Id: I9ad97a4777820cdbe5c8fc3716f74ddec9065c70 (cherry picked from commit 78af25584633462e4ab8cf9bafe10f43e7cb2d83)
* | | | power: Add CM performance managerSteve Kondik2015-11-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of: power: Add CPU boosting interface * Boosts CPU using Power HAL for the given duration. * Duration is given in microseconds. * Power HAL must implement POWER_HINT_CPU_BOOST. Add CPU boosting hooks * Send boost hint during scrolling * Still relevant on even high-end hardware perf: Send a boost hint when a key on the navbar is pressed * A lot of stuff happens, especially when invoking recents. * Get ahead of the storm by sending a boost hint before kicking off the animations. perf: Send boost hint during initial launch perf: Per-app performance profiles * Performance Profiles is going to grow into a much more powerful feature which can apply advanced optimizations or power saving techniques depending on both the state of the hardware as well as the current applications in use. * Refactor the original code and move it into PowerManager so that it's managed from the same place. * Implement "automatic performance profiles". This feature will automatically select a profile when specific activities are running. Currently this list is static and engages performance mode for several benchmarks (trollface). * Added support for a new power hint, POWER_HINT_SET_PROFILE. Currently, these profiles are fired using a property trigger in init. This is easy, but the PowerHAL can do more. * Moved the setting to Settings.Secure and also wrapped calls to the service in the DEVICE_POWER permission. Nobody should mess with this stuff except the system. * Powersave profile will automatically activate Android's built-in low power mode. * Original patch by Jorge Ruesga TODO: * Implement API for per-app configuration by user * Quicksettings tile perf: Boost during animations * Reduce animation jank by preemptively boostin the CPUs. * Original idea taken from CodeAurora, modified for CM perf control. systemui: Boost when expanding the notification shade power: Add a new power hint for application launches * Some devices may prefer a different behavior when launching apps, particularly to avoid priority inversion issues. Add support for a new LAUNCH_BOOST hint which can be handled in the PowerHAL. power: Boost improvements * Boost when opening the panelview * Adjust launch boost to handle relaunch correctly PowerManager: change performance profile when disabling battery saver We need to be sure to update the performance profile when the system disables battery saver mode. This fixes the perf tile becoming out of sync - changing it to low power mode triggers power saver, but turning power saver off does not trigger the tile. Ref: CYNGNOS-1156 Signed-off-by: Roman Birg <roman@cyngn.com> base: cache power profiles support Signed-off-by: Jorge Ruesga <jorge@ruesga.com> perf: Add support for additional power profiles * Add support for bias power (efficiency) and bias performance (quick) modes if supported by a device. Change-Id: Id3a53eaacdaf6ae93ee899835cfcb21279d35ad4
* | | | Clear Theme in System UIAndy Mast2015-10-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When SystemUI first starts an android theme object is created which contains references to the currently applied CM theme. When the theme is changed to system, the theme remains in memory with old references to the prior applied theme. (See mPackages in ResTable::Theme) This patch introduces a recreate theme method into Context so that SystemUI can recreate its own theme object. Change-Id: I086a76afa6f456a69c0390573bc8af2eafa4fb4e
* | | | keyboard: re-add code to detect lid state and handle lightsMichael Gernoth2015-10-181-0/+11
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Depends on libhardware patch for the light ids: http://review.cyanogenmod.org/77944 This squashes the following commits from cm-11.0 and updates them for cm-12.0: From: Dave Daynard <nardholio@gmail.com> Date: Tue, 19 Nov 2013 18:22:45 -0500 Subject: keyboard: re-add code to detect lid state keyboard: re-add code to detect lid state This was lost in the cm-11 merge. Without this, a change in lid state isn't generated to light up the keyboard backlight Change-Id: Ief35cebcb62da13afe1ae7531d69ab58e196be9e From: YuanQY <yuanqingyun@gmail.com> Date: Fri, 8 Feb 2013 10:59:22 +0800 Subject: Keyboard light: Fix the physical keyboard not light when Keyboard light: Fix the physical keyboard not light when it's visiable. Change-Id: I595afd3cb6b422a17ae0f6ec20aa51979db13810 From: tbalden <illespal@gmail.com> Date: Sun, 31 Mar 2013 18:33:53 +0200 Subject: keyboard: adding functional alt/shift lights keyboard: adding functional alt/shift lights This is useful for devices that has QWERTY keyboard and leds for the Alt/Shift (Fn/Caps) keys, like htc doubleshot. Change-Id: I66ebc2d881438f5b51db77eaa885421e65a7da0d
* | | Merge "Make DelegateManager thread safe" into mnc-devDiego Perez2015-08-111-6/+10
|\ \ \
| * | | Make DelegateManager thread safeDiego Perez2015-08-071-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have been seeing crashes on the Theme editor related to an assertion on getDelegate when the object does not exist (http://b.android.com/181951). When debugging, the crash was happening without seeing a previous call to removeJavaReference. This seems to completely remove that crash. Since the DelegateManager can be called at least from two threads (main thread and the finalizer), it should be thread safe. Bug: http://b.android.com/181951 Change-Id: I1b28f863ff198f8592f170a98f9de391b2ac3ea2
* | | | LayoutLib: Switch SimpleDateFormat to icu.Deepanshu Gupta2015-08-062-0/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use ICU's implementation of SimpleDateFormat in LayoutLib. The format patterns used are not supported by java.text.SimpleDateFormat. The change required adding a mechanism for promoting visibility of fields in the framework in the create tool. TODO: Add additional tests in the create tool for this new functionality. Change-Id: Id0f4be41f9731c42a28919c32cc5ef271a656982
* | | | Replace Locale.getDefault with custom impl.Deepanshu Gupta2015-08-062-0/+16
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | In LayoutLib the default locale should always be the locale set the rendering params. This change replaces all calls to Locale.getDefault in the framework with calls to AndroidLocale.getDefault() which tries to find the locale from the current context, but falls back to the original call. Change-Id: I496b35dcfc17fd61fedee21c7495541ab870b1fc
* | | Make getInt in BridgeTypedArray accept empty String.Deepanshu Gupta2015-08-041-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The XML editor already warns about the empty strings in places where an int value is required. There's no need to show another warning for it in the rendering panel. Also, the rendering might have also failed when the empty string is encountered. Try an continue the rendering, because no rendering state is really bad. Change-Id: I85106f37e4462f237e85f0b065b4ce8a4bfabf4d
* | | Fix layout mirroring.Deepanshu Gupta2015-08-041-0/+1
| | | | | | | | | | | | Change-Id: I7db398aa2d11dac1210e84922138f78f0c23bb9b
* | | Merge "Restore session params "no decoration" flag" into mnc-devDiego Perez2015-08-031-3/+6
|\ \ \
| * | | Restore session params "no decoration" flagDiego Perez2015-08-031-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This seems to have removed from a previous version and the theme editor relies on it to remove the decoration around the preview. Change-Id: Ifab99e9c1689bfe44ca593e8c66c24e57c3e8c4c
* | | | Revert to using AppTheme for LayoutLib tests.Deepanshu Gupta2015-08-032-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use AppTheme for all tests other than testExpand. AppTheme contains an attribute needed by testArrayCheck. Also, since the AppTheme extends Theme.Material.Light.DarkActionBar, other tests should be unaffected. Also, update the golden image for the testArrayCheck. Change-Id: Ib5f53f3b029c5aceef2b622e5ac63952d6b1972a
* | | | Fix Matrix_Delegate.native_getValues()Deepanshu Gupta2015-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The bug manifested itself by not rendering the wifi icon in the status bar. Change-Id: I7debf3eef387965d774bf66e856812e67c8552a7
* | | | Update test image for upated nav icons.Deepanshu Gupta2015-07-311-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The image shows the nav icons to be separated by a significant distance. This is because the switch to wide-screen layout happens based on shortest width. The layout has a small shortest width and hence it uses the phone layout for a horizontal nav bar and it doesn't look nice. Real devices will never have this config, so it's okay. Change-Id: Ic494ee7fdfb1116db39bcab6d6ee7a1e514b23df
* | | | Fix typo: s/FullScreen/Fullscreen/ in LayoutLib.Deepanshu Gupta2015-07-311-1/+1
| | | | | | | | | | | | | | | | Change-Id: Ia8d223ae01f08df945ab05615b07075b98a54a32
* | | | Fix bugs introduced in 78aa664.Deepanshu Gupta2015-07-311-9/+8
|/ / / | | | | | | | | | | | | | | | | | | | | | Fix a couple of bugs (ArrayIndexOutOfBoundsException due to miscalculation and a typo - swapped src and dst) introduced in the CL: 78aa664 Poor implementation of Path.approximate() Change-Id: Iff7dbbf66d2714df51699ddb9a4169c38feefa7b
* | | Fix build.Dianne Hackborn2015-07-311-2/+2
| | | | | | | | | | | | Change-Id: I9c6b6cd354039ff2914837cfe97a783564ded66f
* | | Merge changes I4c215676,Ib476302c,I0aede288,I9241dec7,Ibe7167a6, ... into ↵Deepanshu Gupta2015-07-308-44/+111
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mnc-dev * changes: Update status bar time. Fix imports. Add MockView constructor used by LayoutInflater. Poor implementation of Path.approximate() Include EpicenterTranslateClipReveal in LayoutLib Fix theme namespace in tests. LayoutLib: fix layout when nav bar is absent. LayoutLib: Fix Status/Navigation Bar color.
| * | | Update status bar time.Deepanshu Gupta2015-07-291-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | Copy the value from the demo mode (commit 33b60bb45f) Change-Id: I4c215676e7ae26a68aa370e99db005226d8a05d9
| * | | Fix imports.Deepanshu Gupta2015-07-293-23/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also remove null checks on return value of ReflectionUtils.getMethod() as the method always return non null. Change-Id: Ib476302c2cf0504a0f54db4e795955ad10e5df3f
| * | | Add MockView constructor used by LayoutInflater.Deepanshu Gupta2015-07-291-0/+4
| | | | | | | | | | | | | | | | Change-Id: I0aede28866c1b87fb66c8a416c5026a9b2cb04fe
| * | | Poor implementation of Path.approximate()Deepanshu Gupta2015-07-291-3/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Include a very poor implementation of Path.approximate() in LayoutLib that only returns the first and last coordinate of the path. This avoids crashing the rendering when certain assumptions are made on the value returned from the method. Also change the error to a warning. Change-Id: I9241dec734d4df90a9eebd1e6de8b3e443eee3c8
| * | | Fix theme namespace in tests.Deepanshu Gupta2015-07-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests used framework theme (Material), but the ResourceResolver was created with project theme. This caused tests to fail becasue of missing resources. Change-Id: Ia17ee19054f6689f85e3423e83c1f47a2cc4364f
| * | | LayoutLib: fix layout when nav bar is absent.Deepanshu Gupta2015-07-281-12/+19
| | | | | | | | | | | | | | | | Change-Id: I0d3ee6fd5a4656156a630d3b298533ea13eb8415
| * | | LayoutLib: Fix Status/Navigation Bar color.Deepanshu Gupta2015-07-271-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the color value for status bar or navigation bar is declared directly in the theme (i.e. doesn't reference a color resource via @color/foo), the ResourceType for the attribute is not assigned by the IDE. LayoutLib used to ignore resources that were not of type color. This change fixes the issue by also checking the resources without a type. Change-Id: I94735ec225415282db06ab9db5c3233ad89c052f
* | | | Remove dependencies on the package installer's package nameSvet Ganov2015-07-291-0/+5
|/ / / | | | | | | | | | | | | | | | bug:22700053 Change-Id: I8540eb8577fbec84e1a67e31e1c31ba654c828a4
* | | Merge "Set support flag for custom layouts for RecyclerView." into mnc-devDeepanshu Gupta2015-07-231-1/+1
|\ \ \
| * | | Set support flag for custom layouts for RecyclerView.Deepanshu Gupta2015-07-231-1/+1
| | | | | | | | | | | | | | | | Change-Id: I3a0349c0482ae45e226b2016a0f24707c85edff4
* | | | Merge changes I9c294329,Ie4db5d28 into mnc-devDeepanshu Gupta2015-07-2312-509/+581
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | * changes: LayoutLib: translucent sys ui bars Move the layout code out of RenderSessionImpl.
| * | | LayoutLib: translucent sys ui barsDeepanshu Gupta2015-07-236-62/+113
| | | | | | | | | | | | | | | | Change-Id: I9c294329fc78418c505a5115bc9c07da29595af2
| * | | Move the layout code out of RenderSessionImpl.Deepanshu Gupta2015-07-2311-490/+511
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, switch to using a RelativeLayout from a LinearLayout. The change will help in future when enabling transparent status and nav bar. Change-Id: Ie4db5d28313f1c5ef775603788598a56409f92c7
* | | | Merge "CalendarView rendering: use R.styleable to find attr." into mnc-devDeepanshu Gupta2015-07-231-19/+123
|\ \ \ \ | |/ / /
| * | | CalendarView rendering: use R.styleable to find attr.Deepanshu Gupta2015-07-231-19/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not all attr are added to R.attr. This results in some attr not being found and hence a broken rendering. Fix the issue by adding all attr referenced in R.styleable to the map of attr before adding any remaining values from R.attr. Change-Id: I1ebf8a394b9e1edbf7490e011833d20a00d38317
* | | | resolved conflicts for merge of 112d8a36 to mnc-devDiego Perez2015-07-219-11/+132
|\ \ \ \ | |/ / / |/| / / | |/ / Change-Id: Ic9511a57db8a96f54dba0704800789a8602b9dd2
| * | am d6f2a9ef: am 7720eb18: Merge "Render to measured size when using expand ↵Diego Perez2015-07-218-11/+131
| |\ \ | | |/ | | | | | | | | | | | | | | | mode" into lmp-mr1-dev * commit 'd6f2a9efbb0e0525f6cf970fd9c9b9b7082b19f9': Render to measured size when using expand mode
| | * Merge "Render to measured size when using expand mode" into lmp-mr1-devDiego Perez2015-07-218-11/+131
| | |\
| | | * Render to measured size when using expand modeDiego Perez2015-06-028-11/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using RenderingMode.V_SCROLL or RenderingMode.H_SCROLL, if the screen size is smaller than the measured size but as large as the desired size, the layout will render incorrectly and won't expand. This changes that to expand to at least the size of the screen. Added tests for the V_SCROLL and H_SCROLL modes. Bug: http://b.android.com/174928 Change-Id: I22686903560775e2e4f362af1d7b50c9b985467d