Skip to content

Commit

Permalink
feat(android): add Ti.Platform.versionPatch
Browse files Browse the repository at this point in the history
Fixes TIMOB-28098
  • Loading branch information
sgtcoolguy committed Aug 31, 2020
1 parent a78e9cc commit 587ddea
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public class PlatformModule extends KrollModule
private List<Processor> processors;
private int versionMajor;
private int versionMinor;
private int versionPatch;
protected int batteryState;
protected double batteryLevel;
protected boolean batteryStateReady;
Expand All @@ -92,6 +93,9 @@ public PlatformModule()
this.versionMajor = Integer.parseInt(versionComponents[0]);
if (versionComponents.length >= 2) {
this.versionMinor = Integer.parseInt(versionComponents[1]);
if (versionComponents.length >= 3) {
this.versionPatch = Integer.parseInt(versionComponents[2]);
}
}
} catch (Exception ex) {
Log.e(TAG, "Failed to parse OS version string.", ex);
Expand Down Expand Up @@ -163,6 +167,12 @@ public int getVersionMinor()
return this.versionMinor;
}

@Kroll.getProperty
public int getVersionPatch()
{
return this.versionPatch;
}

@Kroll.method
@Kroll.getProperty
public double getAvailableMemory()
Expand Down

0 comments on commit 587ddea

Please sign in to comment.