diff --git a/android/cli/commands/_build.js b/android/cli/commands/_build.js index b2c6ec8c5ff..f46ca2100a0 100644 --- a/android/cli/commands/_build.js +++ b/android/cli/commands/_build.js @@ -927,7 +927,7 @@ AndroidBuilder.prototype.validate = function validate(logger, config, cli) { if (cli.argv['source-maps']) { this.sourceMaps = true; // if they haven't, respect the tiapp.xml value if set one way or the other - } else if (cli.tiapp.hasOwnProperty['source-maps']) { // they've explicitly set a value in tiapp.xml + } else if (Object.prototype.hasOwnProperty.call(cli.tiapp, 'source-maps')) { // they've explicitly set a value in tiapp.xml this.sourceMaps = cli.tiapp['source-maps'] === true; // respect the tiapp.xml value } else { // otherwise turn on by default for non-production builds this.sourceMaps = this.deployType !== 'production'; @@ -1973,6 +1973,9 @@ AndroidBuilder.prototype.loginfo = function loginfo(next) { this.logger.info(__('Profiler disabled')); } + this.logger.info(__('Transpile javascript: %s', (this.transpile ? 'true' : 'false').cyan)); + this.logger.info(__('Generate source maps: %s', (this.sourceMaps ? 'true' : 'false').cyan)); + next(); }; diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiListView.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiListView.java index c13c4b87579..d66e1d90fb2 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiListView.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiListView.java @@ -55,7 +55,7 @@ import android.widget.AbsListView.OnScrollListener; import android.widget.BaseAdapter; import android.widget.EditText; -import android.widget.RelativeLayout; +import android.widget.LinearLayout; import android.widget.TextView; public class TiListView extends TiUIView implements OnSearchChangeListener @@ -83,7 +83,7 @@ public class TiListView extends TiUIView implements OnSearchChangeListener private View footerView; private String searchText; private boolean caseInsensitive; - private RelativeLayout searchLayout; + private LinearLayout searchLayout; private static final String TAG = "TiListView"; /* We cache properties that already applied to the recycled list item in ViewItem.java @@ -663,57 +663,48 @@ public void processProperties(KrollDict d) private void layoutSearchView(TiViewProxy searchView) { TiUIView search = searchView.getOrCreateView(); - RelativeLayout layout = new RelativeLayout(proxy.getActivity()); - layout.setGravity(Gravity.NO_GRAVITY); + LinearLayout layout = new LinearLayout(proxy.getActivity()); + layout.setOrientation(LinearLayout.VERTICAL); layout.setPadding(0, 0, 0, 0); addSearchLayout(layout, searchView, search); setNativeView(layout); } - private void addSearchLayout(RelativeLayout layout, TiViewProxy searchView, TiUIView search) + private void addSearchLayout(LinearLayout layout, TiViewProxy searchView, TiUIView search) { - RelativeLayout.LayoutParams p = createBasicSearchLayout(); - p.addRule(RelativeLayout.ALIGN_PARENT_TOP); - + // Fetch the height of the SearchBar/SearchView. TiDimension rawHeight; if (searchView.hasProperty(TiC.PROPERTY_HEIGHT)) { rawHeight = TiConvert.toTiDimension(searchView.getProperty(TiC.PROPERTY_HEIGHT), 0); } else { rawHeight = TiConvert.toTiDimension(MIN_SEARCH_HEIGHT, 0); } - p.height = rawHeight.getAsPixels(layout); - View nativeView = search.getNativeView(); - layout.addView(nativeView, p); + // Add the search view to the top of the vertical layout. + LinearLayout.LayoutParams params = + new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, rawHeight.getAsPixels(layout)); + layout.addView(search.getNativeView(), params); - p = createBasicSearchLayout(); - p.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM); - p.addRule(RelativeLayout.BELOW, nativeView.getId()); + // Add the ListView to the bottom of the vertical layout. + params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, + LinearLayout.LayoutParams.MATCH_PARENT); ViewParent parentWrapper = wrapper.getParent(); if (parentWrapper != null && parentWrapper instanceof ViewGroup) { // get the previous layout params so we can reset with new layout - ViewGroup.LayoutParams lp = wrapper.getLayoutParams(); + ViewGroup.LayoutParams lastParams = wrapper.getLayoutParams(); ViewGroup parentView = (ViewGroup) parentWrapper; // remove view from parent parentView.removeView(wrapper); // add new layout - layout.addView(wrapper, p); - parentView.addView(layout, lp); + layout.addView(wrapper, params); + parentView.addView(layout, lastParams); } else { - layout.addView(wrapper, p); + layout.addView(wrapper, params); } this.searchLayout = layout; } - private RelativeLayout.LayoutParams createBasicSearchLayout() - { - RelativeLayout.LayoutParams p = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, - RelativeLayout.LayoutParams.MATCH_PARENT); - p.addRule(RelativeLayout.ALIGN_PARENT_LEFT); - p.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); - return p; - } private void setHeaderOrFooterView(Object viewObj, boolean isHeader) { if (viewObj instanceof TiViewProxy) { diff --git a/android/templates/build/AssetCryptImpl.java b/android/templates/build/AssetCryptImpl.java index 8e8cf58d6e0..418fc491e8f 100644 --- a/android/templates/build/AssetCryptImpl.java +++ b/android/templates/build/AssetCryptImpl.java @@ -5,17 +5,18 @@ import java.util.HashMap; import java.io.ByteArrayInputStream; import java.io.InputStream; -import java.nio.CharBuffer; -import java.nio.Buffer; import java.nio.ByteBuffer; -import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; import java.lang.reflect.Method; import java.lang.System; import java.util.Collection; + import org.appcelerator.kroll.util.KrollAssetHelper; import org.appcelerator.kroll.common.Log; import org.appcelerator.titanium.TiApplication; + import android.os.Debug; +import android.util.Base64; public class AssetCryptImpl implements KrollAssetHelper.AssetCrypt { @@ -49,7 +50,7 @@ public String readAsset(String path) if (bytes == null) { return null; } - return new String(bytes); + return new String(bytes, StandardCharsets.UTF_8); } @Override diff --git a/android/titanium/lib/aps-analytics.jar b/android/titanium/lib/aps-analytics.jar index f1f0dd8e56c..837389e6017 100644 Binary files a/android/titanium/lib/aps-analytics.jar and b/android/titanium/lib/aps-analytics.jar differ diff --git a/iphone/TitaniumKit/TitaniumKit/Sources/API/TiConsole.h b/iphone/TitaniumKit/TitaniumKit/Sources/API/TiConsole.h index e3b6010900a..0efaeffcc05 100644 --- a/iphone/TitaniumKit/TitaniumKit/Sources/API/TiConsole.h +++ b/iphone/TitaniumKit/TitaniumKit/Sources/API/TiConsole.h @@ -14,6 +14,9 @@ JSExportAs(timeLog, -(void)timeLog : (id)args withData : (NSArray *)logData); +JSExportAs(log, + -(void)log + : (id)unused); @end // This is a version of the API module which has custom support for log() to diff --git a/iphone/TitaniumKit/TitaniumKit/Sources/API/TiConsole.m b/iphone/TitaniumKit/TitaniumKit/Sources/API/TiConsole.m index 38ab785fba1..b39694462e9 100644 --- a/iphone/TitaniumKit/TitaniumKit/Sources/API/TiConsole.m +++ b/iphone/TitaniumKit/TitaniumKit/Sources/API/TiConsole.m @@ -9,9 +9,10 @@ @implementation TiConsole -- (void)log:(id)level withMessage:(id)args +- (void)log:(id)unused { - [self info:level]; + NSArray *currentArgs = [JSContext currentArguments]; + [self logMessage:currentArgs severity:@"info"]; } - (void)time:(NSString *)label diff --git a/iphone/cli/commands/_build.js b/iphone/cli/commands/_build.js index 137844137fd..5cc3ca0e8c0 100644 --- a/iphone/cli/commands/_build.js +++ b/iphone/cli/commands/_build.js @@ -1810,7 +1810,7 @@ iOSBuilder.prototype.validate = function validate(logger, config, cli) { if (cli.argv['source-maps']) { this.sourceMaps = true; // if they haven't, respect the tiapp.xml value if set one way or the other - } else if (cli.tiapp.hasOwnProperty['source-maps']) { // they've explicitly set a value in tiapp.xml + } else if (Object.prototype.hasOwnProperty.call(cli.tiapp, 'source-maps')) { // they've explicitly set a value in tiapp.xml this.sourceMaps = cli.tiapp['source-maps'] === true; // respect the tiapp.xml value } else { // otherwise turn on by default for non-production builds this.sourceMaps = this.deployType !== 'production'; @@ -2609,6 +2609,9 @@ iOSBuilder.prototype.loginfo = function loginfo() { } else { this.logger.info(__('Set to copy files instead of symlinking')); } + + this.logger.info(__('Transpile javascript: %s', (this.transpile ? 'true' : 'false').cyan)); + this.logger.info(__('Generate source maps: %s', (this.sourceMaps ? 'true' : 'false').cyan)); }; iOSBuilder.prototype.readBuildManifest = function readBuildManifest() { diff --git a/package-lock.json b/package-lock.json index a26dc76724c..0af3b709cf7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "titanium-mobile", - "version": "8.1.0", + "version": "8.1.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a0b7e8fabfb..f6cf84f7252 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "titanium-mobile", "description": "Appcelerator Titanium Mobile", - "version": "8.1.0", + "version": "8.1.1", "moduleApiVersion": { "iphone": "2", "android": "4", diff --git a/support/android/titanium_prep.linux32 b/support/android/titanium_prep.linux32 index 42f239e48ed..77d60fe6612 100755 Binary files a/support/android/titanium_prep.linux32 and b/support/android/titanium_prep.linux32 differ diff --git a/support/android/titanium_prep.linux64 b/support/android/titanium_prep.linux64 index 7a185c80e8a..5cbfe0f1b17 100755 Binary files a/support/android/titanium_prep.linux64 and b/support/android/titanium_prep.linux64 differ diff --git a/support/android/titanium_prep.macos b/support/android/titanium_prep.macos index 7d5cc148f43..aed913c7d3c 100755 Binary files a/support/android/titanium_prep.macos and b/support/android/titanium_prep.macos differ diff --git a/support/android/titanium_prep.win32.exe b/support/android/titanium_prep.win32.exe index 9b31a919f96..de207c3223b 100755 Binary files a/support/android/titanium_prep.win32.exe and b/support/android/titanium_prep.win32.exe differ diff --git a/support/android/titanium_prep.win64.exe b/support/android/titanium_prep.win64.exe index 07d8f92b5b0..6a5e3e72386 100755 Binary files a/support/android/titanium_prep.win64.exe and b/support/android/titanium_prep.win64.exe differ