Skip to content

Commit

Permalink
Merge branch '8_1_X' into TIMOB-27256-8_1_X
Browse files Browse the repository at this point in the history
  • Loading branch information
ssekhri authored Aug 19, 2019
2 parents 439c1c7 + 73a5500 commit b2833ee
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 36 deletions.
5 changes: 4 additions & 1 deletion android/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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();
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
9 changes: 5 additions & 4 deletions android/templates/build/AssetCryptImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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
Expand Down
Binary file modified android/titanium/lib/aps-analytics.jar
Binary file not shown.
3 changes: 3 additions & 0 deletions iphone/TitaniumKit/TitaniumKit/Sources/API/TiConsole.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions iphone/TitaniumKit/TitaniumKit/Sources/API/TiConsole.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion iphone/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "titanium-mobile",
"description": "Appcelerator Titanium Mobile",
"version": "8.1.0",
"version": "8.1.1",
"moduleApiVersion": {
"iphone": "2",
"android": "4",
Expand Down
Binary file modified support/android/titanium_prep.linux32
Binary file not shown.
Binary file modified support/android/titanium_prep.linux64
Binary file not shown.
Binary file modified support/android/titanium_prep.macos
Binary file not shown.
Binary file modified support/android/titanium_prep.win32.exe
Binary file not shown.
Binary file modified support/android/titanium_prep.win64.exe
Binary file not shown.

0 comments on commit b2833ee

Please sign in to comment.