Skip to content

Commit

Permalink
chore: fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
cb1kenobi committed May 22, 2024
2 parents 5dc8e66 + 0c93fa7 commit 5dd8d5b
Show file tree
Hide file tree
Showing 57 changed files with 112 additions and 88 deletions.
16 changes: 8 additions & 8 deletions android/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,10 @@ class AndroidBuilder extends Builder {
// if there are no devices/emulators, error
if (!Object.keys(opts).length) {
if (cli.argv.target === 'device') {
logger.warn('Unable to find any devices, possibily due to missing dependencies.\n');
logger.warn('Unable to find any devices, possibly due to missing dependencies.\n');
logger.log('Continuing with build... (will attempt to install missing dependencies)\n');
} else {
logger.warn('Unable to find any emulators, possibily due to missing dependencies.\n');
logger.warn('Unable to find any emulators, possibly due to missing dependencies.\n');
logger.log('Continuing with build... (will attempt to install missing dependencies)\n');
}
_t.buildOnly = true;
Expand Down Expand Up @@ -745,7 +745,7 @@ class AndroidBuilder extends Builder {
return callback(new Error(msg));
}

// empty the alias array. it is important that we don't destory the original
// empty the alias array. it is important that we don't destroy the original
// instance since it was passed by reference to the alias select list
while (_t.keystoreAliases.length) {
_t.keystoreAliases.pop();
Expand Down Expand Up @@ -1107,7 +1107,7 @@ class AndroidBuilder extends Builder {
}

// we need to translate the sdk to a real api level (i.e. L => 20, MNC => 22) so that
// we can valiate them
// we can validate them
function getRealAPILevel(ver) {
return (ver && targetSDKMap[ver] && targetSDKMap[ver].sdk) || ver;
}
Expand Down Expand Up @@ -1509,7 +1509,7 @@ class AndroidBuilder extends Builder {
process.exit(1);
}

// For CommonJS modules, verfiy we can find the main script to be loaded by require() method.
// For CommonJS modules, verify we can find the main script to be loaded by require() method.
if (!module.native) {
// Look for legacy "<module.id>.js" script file first.
let jsFilePath = path.join(module.modulePath, module.id + '.js');
Expand Down Expand Up @@ -1983,7 +1983,7 @@ class AndroidBuilder extends Builder {
}

if (this.activitiesHash !== manifest.activitiesHash) {
this.logger.info('Forcing rebuild: Android activites in tiapp.xml changed since last build');
this.logger.info('Forcing rebuild: Android activities in tiapp.xml changed since last build');
this.logger.info(` Was: ${manifest.activitiesHash}`);
this.logger.info(` Now: ${this.activitiesHash}`);
return true;
Expand Down Expand Up @@ -2170,7 +2170,7 @@ class AndroidBuilder extends Builder {
}

// Check if the module has a maven repository directory.
// If it does, then we can leverage gradle/maven's depency management system.
// If it does, then we can leverage gradle/maven's dependency management system.
let dependencyString = null;
const repositoryDirPath = path.join(nextModule.modulePath, 'm2repository');
if (await fs.exists(repositoryDirPath)) {
Expand Down Expand Up @@ -2225,7 +2225,7 @@ class AndroidBuilder extends Builder {
gradleProperties.push({ key: 'org.gradle.jvmargs', value: `-Xmx${this.javacMaxMemory}` });
await gradlew.writeGradlePropertiesFile(gradleProperties);

// Copy optional "gradle.properties" file contents from Titainum project to the above generated file.
// Copy optional "gradle.properties" file contents from Titanium project to the above generated file.
// These properties must be copied to the end of the file so that they can override Titanium's default properties.
const customGradlePropertiesFilePath = path.join(this.projectDir, 'platform', 'android', 'gradle.properties');
if (await fs.exists(customGradlePropertiesFilePath)) {
Expand Down
4 changes: 2 additions & 2 deletions android/cli/commands/_buildModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class AndroidModuleBuilder extends Builder {
isApiVersionUpdateRequired = (this.manifest.apiversion !== cliModuleAPIVersion);
}

// Determin if the "manifest" file's "minsdk" needs updating.
// Determine if the "manifest" file's "minsdk" needs updating.
// As of Titanium 9.0.0, modules are built as AARs to an "m2repository". Not supported on older Titanium versions.
let isMinSdkUpdateRequired = false;
const minSupportedSdkVersionMajorNumber = 9;
Expand Down Expand Up @@ -875,7 +875,7 @@ export class AndroidModuleBuilder extends Builder {
await fs.mkdirs(tmpDir);

// Generate a new Titanium app in the temp directory which we'll later copy the "example" files to.
// Note: App must have a diffentent id/package-name. Avoids class name collision with module generating Java code.
// Note: App must have a different id/package-name. Avoids class name collision with module generating Java code.
this.logger.debug(`Staging module project at ${tmpDir.cyan}`);
await runTiCommand(
process.execPath,
Expand Down
2 changes: 1 addition & 1 deletion android/cli/hooks/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export function init(logger, config, cli) {
line = line.replace(/^\w\/(\w+)\s*:/g, '$1:').grey;
}
line = deviceName + line;
// if it begins with something like "E/SQLiteLog( 1659):" it's not a contination, don't log it.
// if it begins with something like "E/SQLiteLog( 1659):" it's not a continuation, don't log it.
} else if (nonTiLogRegexp.test(line)) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion android/cli/lib/android-manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ function isElementNode(node) {
* @param {Object} node The XML node object to check. Can be null/undefined.
* @returns {Boolean}
* Returns true if given node is text between XLM elements or attributes.
* Returns false if not or given an invalild argument.
* Returns false if not or given an invalid argument.
* @private
*/
function isTextNode(node) {
Expand Down
2 changes: 1 addition & 1 deletion android/cli/lib/gradle-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export class GradleWrapper {
}

// Function which returns a stdout/stderr "data" reading function object and outputs it to given "logFunction".
// The "logFunction" argument is expected to be a "logger" object that conatins "logger.info" or "logger.error".
// The "logFunction" argument is expected to be a "logger" object that contains "logger.info" or "logger.error".
// The "logType" is a string "error" or "info" to call the correct logger function
const createReadableDataHandlerUsing = (logFunction, logType) => {
let stringBuffer = '';
Expand Down
2 changes: 1 addition & 1 deletion android/debugger.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ That simply places the message in a queue. One of the two threads spun up after

### Handling messages coming from the Debugger

The second thread spun up after a connection is made simply reads lines from the debugger's stream and does very basic parsing of the message. Once the headers are stripped, we grab the JSON body and call down into C++ to do a V8::Debug::SendCommand to give the command to V8.
The second thread spun up after a connection is made simply reads lines from the debuggers stream and does very basic parsing of the message. Once the headers are stripped, we grab the JSON body and call down into C++ to do a V8::Debug::SendCommand to give the command to V8.

The next step is to call V8::Debug::ProcessDebugMessages(). We do so indirectly by using a Handler.post(Runnable) to ensure this gets called on the main thread.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ protected void initialize()
}

properties = (Map<Object, Object>) JSONValue.parseWithException(new FileReader(jsonPath));
debug("Succesfully loaded existing binding data: " + jsonPath);
debug("Successfully loaded existing binding data: " + jsonPath);
} catch (Exception e) {
// file doesn't exist, we'll just create it later
debug("No binding data found, creating new data file: %s/%s", this.jarJsonPackageName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ public void onDisposing(KrollRuntime runtime)
// Remove this listener from the runtime's static collection.
KrollRuntime.removeOnDisposingListener(this);

// Unregister all currently registerd broadcast receviers.
// Unregister all currently registered broadcast receivers.
// They can no longer be handled by the terminating JavaScript runtime.
while (registeredBroadcastReceiverProxyList.isEmpty() == false) {
unregisterBroadcastReceiver(registeredBroadcastReceiverProxyList.pollFirst());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public TiDatabaseProxy open(Object file)
throw new IllegalArgumentException("Ti.Database.open() was given invalid URL: " + fileString);
}
} else {
// Assume we were given a databas file name only. (This is the most common case.)
// Assume we were given a database file name only. (This is the most common case.)
dbName = fileString;
}
} else if (file != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ protected void eventListenerAdded(String event, int count, KrollProxy proxy)
// FIXME: Why can't we just track some boolean flag for this?
if (currentPositionCallback.size() == 0) {
HashMap<String, LocationProviderProxy> locationProviders = simpleLocationProviders;
// FIXME: why does this differ from how we enable in getCurrentPostion()?
// FIXME: why does this differ from how we enable in getCurrentPosition()?
if (getManualMode()) {
locationProviders = androidModule.manualLocationProviders;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public String getName()
if (property == null) {
Log.e(TAG, "No name found for location provider");

return ""; // this shouldnt be possible
return ""; // this shouldn't be possible
}

return (String) property;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public TiDeviceOrientationMonitor(Handler handler)
if (value instanceof SensorManager) {
this.sensorManager = (SensorManager) value;
} else {
Log.w(TAG, "Unable to aquire SensorManager.");
Log.w(TAG, "Unable to acquire SensorManager.");
}

// Create an event handler for the Android "OrientationEventListener".
Expand Down Expand Up @@ -370,7 +370,7 @@ public void onSensorChanged(SensorEvent event)
break;
}

// Do not continue if the device rotation matrix has not been udpated above.
// Do not continue if the device rotation matrix has not been updated above.
if (!wasRotationMatrixUpdated) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void handleCreationDict(KrollDict properties)
options = new KrollDict();
}

// Determine the collatior setting we need to use.
// Determine the collator setting we need to use.
int strengthId;
int decompositionId = Collator.CANONICAL_DECOMPOSITION;
this.isStrippingAccents = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ public void handleCreationDict(KrollDict properties)
String dateStyleStringId = TiConvert.toString(options.get("dateStyle"));
String timeStyleStringId = TiConvert.toString(options.get("timeStyle"));

// Determine if at least 1 "date" componoent has been configured.
// Determine if at least 1 "date" component has been configured.
boolean hasCustomDateSettings
= (weekdayFormatId != null)
|| (eraFormatId != null)
|| (yearFormatId != null)
|| (monthFormatId != null)
|| (dayFormatId != null);

// Determine if at least 1 "time" componoent has been configured.
// Determine if at least 1 "time" component has been configured.
boolean hasCustomTimeSettings
= (hourFormatId != null)
|| (minuteFormatId != null)
Expand Down Expand Up @@ -315,7 +315,7 @@ public KrollDict[] formatToParts(Date value)
index = endIndex;
}

// Add the substring part enttry to the collection.
// Add the substring part entry to the collection.
KrollDict entry = new KrollDict();
entry.put(TiC.PROPERTY_TYPE, typeName);
entry.put(TiC.PROPERTY_VALUE, substring);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public AudioPlayerProxy()
{
super();

// TODO - we shouldnt need this as this proxy is created only from the runtime - double check
// TODO - we shouldn't need this as this proxy is created only from the runtime - double check
// TODO this needs to happen post-set
//((TiBaseActivity)getActivity()).addOnLifecycleEventListener(this);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ public void onDestroy(Activity activity)
fireComplete(MediaModule.VIDEO_FINISH_REASON_USER_EXITED);
}

// Cancel any Thumbnail requests and releasing TiMediaMetadataRetriver resource
// Cancel any Thumbnail requests and releasing TiMediaMetadataRetriever resource
cancelAllThumbnailImageRequests();
}

Expand Down Expand Up @@ -793,7 +793,7 @@ public void cancelAllThumbnailImageRequests()

/**
* Convenience method for creating a response handler that is used when getting a
* bitmmap.
* bitmap.
*
* @param callback Javascript function that the response handler will invoke
* once the bitmap response is ready
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ public void close() throws IOException

} catch (Exception e) {
e.printStackTrace();
throw new IOException("Error occured when closing socket");
throw new IOException("Error occurred when closing socket");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public boolean openURL(KrollInvocation invocation, String url,
@Kroll.argument(optional = true) Object arg2, @Kroll.argument(optional = true) Object arg3)
{
// If given an optional callback, then call this method recursively without the callback.
// Note: We might also receieve an optional KrollDict argument. This is iOS only and should be ignored.
// Note: We might also receive an optional KrollDict argument. This is iOS only and should be ignored.
KrollFunction callback = null;
if (arg2 instanceof KrollFunction) {
callback = (KrollFunction) arg2;
Expand Down Expand Up @@ -471,7 +471,7 @@ private synchronized List<Processor> getProcessors()
// TODO Sort processors by index, fill in model name by preceding if unknown

} catch (IOException ex) {
// somethign went wrong, create "default" set of processors?
// something went wrong, create "default" set of processors?
this.processors = new ArrayList<>(processorCount);
for (int i = 0; i < processorCount; i++) {
this.processors.add(Processor.unknown(i));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public void setHolder(TableViewHolder holder)
/**
* Override getRect() to amend dimensions.
*
* @return Dictinary of view dimensions.
* @return Dictionary of view dimensions.
*/
@Override
public KrollDict getRect()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ public void setSwipeRefreshEnabled(boolean value)
* Updates this view's width and height based on the given width and height constraints.
* <p>
* Given arguments size and size mode can be extracted by the Android "View.MeasureSpec" class.
* @param widthMeasureSpec Provides the parent's width contraints and size mode.
* @param heightMeasureSpec Provides the parent's height contraints and size mode.
* @param widthMeasureSpec Provides the parent's width constraints and size mode.
* @param heightMeasureSpec Provides the parent's height constraints and size mode.
*/
@Override
public void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ public boolean onTouchEvent(MotionEvent event)

// Request the parent to scroll if one of the following is true:
// - EditText is not scrollable. (ie: All text fits within the box.)
// - EditText is scrollabe, but cannot scroll any further in given direction.
// - EditText is scrollable, but cannot scroll any further in given direction.
if (!isScrollEnabled || !canScrollFurther) {
wasHandled = dispatchNestedPreScroll(deltaX, deltaY, null, null);
wasHandled |= dispatchNestedScroll(0, 0, deltaX, deltaY, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ private void adjustTextFontSize(@NonNull MaterialTextView textView)
{
int value = textView.getWidth();
{
// Exlude the view's padding and borders.
// Exclude the view's padding and borders.
value -= textView.getTotalPaddingLeft() + textView.getTotalPaddingRight();
}
if ((this.layoutParams != null) && (this.layoutParams.optionWidth != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public void processProperties(KrollDict properties)
}

/**
* Called when one of the proxy's properies have changed.
* Called when one of the proxy's properties have changed.
* <p>
* Expected to be called on the main UI thread.
* @param key The unique name of the property.
Expand Down Expand Up @@ -1295,7 +1295,7 @@ public boolean drawTo(Canvas canvas)
Drawable imageDrawable = getMaskedDrawable().getImageDrawable();
Bitmap imageBitmap = getBitmapFrom(imageDrawable);
if (imageBitmap != null) {
// Draw the image drawable's bitmap ourselves with given blend mode. (Most optmized.)
// Draw the image drawable's bitmap ourselves with given blend mode. (Most optimized.)
bufferedCanvas.drawBitmap(imageBitmap, null, targetBounds, bufferedPaint);
} else if (imageDrawable != null) {
// Draw the image via its drawable with given blend mode. (Least optimized.)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public void setParentContentWidth(int width)

/**
* Gets the value set via the setParentContentWidth() method.
* Note that this value is not assignd automatically. The owner must assign it.
* Note that this value is not assigned automatically. The owner must assign it.
* @return Returns the parent view's width, excluding its left/right padding.
*/
public int getParentContentWidth()
Expand All @@ -136,7 +136,7 @@ public void setParentContentHeight(int height)

/**
* Gets the value set via the setParentContentHeight() method.
* Note that this value is not assignd automatically. The owner must assign it.
* Note that this value is not assigned automatically. The owner must assign it.
* @return Returns the parent view's height, excluding its top/bottom padding.
*/
public int getParentContentHeight()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ public void handleKeyboard(KrollDict d)
}

// Update fullscreen edit handling.
// We might have to diable it due to Google bugs with password handling of certain input types.
// We might have to disable it due to Google bugs with password handling of certain input types.
handleFullscreen(d);

// Force keyboard to use English if enabled. (Not all keyboards honor this setting.)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ public ListViewProxy getListViewProxy()
/**
* Override getRect() to amend dimensions.
*
* @return Dictinary of view dimensions.
* @return Dictionary of view dimensions.
*/
@Override
public KrollDict getRect()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ private void reset()
* Set header and footer views of holder.
*
* @param listViewProxy ListView proxy.
* @param properties Properties containing header and footer entires.
* @param properties Properties containing header and footer entries.
* @param updateHeader Boolean to determine if the header should be updated.
* @param updateFooter Boolean to determine if the footer should be updated.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ public void setSeparator(int color, int height)
}

/**
* Starts dragging programatically.
* Starts dragging programmatically.
*
* @param vHolder The dedicated view holder
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ protected boolean hasCustomBackground(TiViewProxy tabProxy)
}

/**
* Method for creating a RippleDrawable to be used as a bacgkround for an item in the Controller.
* Method for creating a RippleDrawable to be used as a background for an item in the Controller.
* Creates the RippleDrawable for two states - the provided state and its negative value.
* If the properties are not set the method falls back to the colorPrimary of the current theme.
* The previous implementation of TabGroup added the ripple effect by default for tabs, thus this
Expand Down
Loading

0 comments on commit 5dd8d5b

Please sign in to comment.