Skip to content

Commit

Permalink
Merge pull request #11 from svkirans/gwtphonegap_device
Browse files Browse the repository at this point in the history
dropped the name property from device API as per the latest cordova API.
  • Loading branch information
dankurka committed Feb 28, 2017
2 parents 7ca1125 + 4cacf85 commit 6f1135d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 58 deletions.
Expand Up @@ -17,52 +17,6 @@

public interface Device {

/**
* Get the device's model name.
*
* device.name returns the name of the device's model or product. This value is set by the device
* manufacturer and may be different across versions of the same product.
*
* <h1>Supported Platforms</h1>
*
* <ul>
* <li>Android</li>
* <li>BlackBerry</li>
* <li>BlackBerry Widgets (OS 5.0 and higher)</li>
* <li>iPhone</li>
* </ul>
*
*
* <h1>Android Quirks</h1>
*
* <ul>
* <li>Gets the product name instead of the model name.
* <ul>
* <li>The product name is often the code name given during production.</li>
* <li>e.g. Nexus One returns "Passion", Motorola Droid returns "voles"</li>
* </ul>
* </li>
* </ul>
*
*
* <h1>iPhone Quirks</h1>
*
* <ul>
* <li>Gets the device's custom name instead of the device model name.
* <ul>
* <li>The custom name is set by the owner in iTunes.</li>
* <li>e.g. "Joe's iPhone"</li>
* </ul>
* </li>
* </ul>
*
* @deprecated use {@link #getName()}
*
*
* @return the models device name
*/
@Deprecated
public abstract String getName();

/**
* device.model returns the name of the device's model or product. This value is set by the device
Expand All @@ -83,7 +37,7 @@ public interface Device {
* <li>iPhone</li>
* <ul>
*
* @return the version of phonegap running on the device
* @return the version of phonegap/cordova running on the device
*/
public abstract String getPhoneGapVersion();

Expand Down
Expand Up @@ -19,10 +19,6 @@

public class DeviceBrowserImpl implements Device {

@Override
public String getName() {
return "";
}

@Override
public String getPhoneGapVersion() {
Expand Down
Expand Up @@ -25,13 +25,6 @@
*/
public class DeviceMobileImpl implements Device {

/* (non-Javadoc)
* @see com.googlecode.gwtphonegap.client.device.Device#getName()
*/
@Override
public native String getName()/*-{
return $wnd.device.name;
}-*/;

/* (non-Javadoc)
* @see com.googlecode.gwtphonegap.client.device.Device#getPhoneGapVersion()
Expand Down

0 comments on commit 6f1135d

Please sign in to comment.