You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2013/06/18 02:01:51 UTC
git commit: [CB-3710] Fixed device plugin on android. removed
android-specific JS (no need). Fixed malformed version attrib at the top.
Updated Branches:
refs/heads/master 4c4514a89 -> 24745d51b
[CB-3710] Fixed device plugin on android. removed android-specific JS (no need). Fixed malformed version attrib at the top.
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/commit/24745d51
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/tree/24745d51
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/diff/24745d51
Branch: refs/heads/master
Commit: 24745d51b79a5dbaad870ca6a3b1d6f9495a72b5
Parents: 4c4514a
Author: Fil Maj <ma...@gmail.com>
Authored: Mon Jun 17 17:01:38 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Mon Jun 17 17:01:38 2013 -0700
----------------------------------------------------------------------
plugin.xml | 8 +------
www/android/device.js | 60 ----------------------------------------------
www/device.js | 4 +---
3 files changed, 2 insertions(+), 70 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/24745d51/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 1215975..a668046 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -2,8 +2,7 @@
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
-id="org.apache.cordova.core.device">
- version="0.1.0">
+id="org.apache.cordova.core.device" version="0.1.0">
<name>Device</name>
<js-module src="www/device.js" name="device">
@@ -19,11 +18,6 @@ id="org.apache.cordova.core.device">
</config-file>
<source-file src="src/android/Device.java" target-dir="src/org/apache/cordova/core" />
-
- <js-module src="www/android/device.js" name="device2">
- <merges target="device" />
- </js-module>
-
</platform>
<!-- ios -->
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/24745d51/www/android/device.js
----------------------------------------------------------------------
diff --git a/www/android/device.js b/www/android/device.js
deleted file mode 100644
index a6b7453..0000000
--- a/www/android/device.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var channel = require('cordova/channel'),
- utils = require('cordova/utils'),
- exec = require('cordova/exec'),
- app = require('cordova/plugin/android/app');
-
-module.exports = {
- /*
- * DEPRECATED
- * This is only for Android.
- *
- * You must explicitly override the back button.
- */
- overrideBackButton:function() {
- console.log("Device.overrideBackButton() is deprecated. Use App.overrideBackbutton(true).");
- app.overrideBackbutton(true);
- },
-
- /*
- * DEPRECATED
- * This is only for Android.
- *
- * This resets the back button to the default behavior
- */
- resetBackButton:function() {
- console.log("Device.resetBackButton() is deprecated. Use App.overrideBackbutton(false).");
- app.overrideBackbutton(false);
- },
-
- /*
- * DEPRECATED
- * This is only for Android.
- *
- * This terminates the activity!
- */
- exitApp:function() {
- console.log("Device.exitApp() is deprecated. Use App.exitApp().");
- app.exitApp();
- }
-};
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device/blob/24745d51/www/device.js
----------------------------------------------------------------------
diff --git a/www/device.js b/www/device.js
index 2b377d8..0271b70 100644
--- a/www/device.js
+++ b/www/device.js
@@ -24,6 +24,7 @@ var argscheck = require('cordova/argscheck'),
utils = require('cordova/utils'),
exec = require('cordova/exec');
+channel.createSticky('onCordovaInfoReady');
// Tell cordova channel to wait on the CordovaInfoReady event
channel.waitForInitialization('onCordovaInfoReady');
@@ -45,9 +46,6 @@ function Device() {
channel.onCordovaReady.subscribe(function() {
me.getInfo(function(info) {
var buildLabel = info.cordova;
- if (buildLabel != CORDOVA_JS_BUILD_LABEL) {
- buildLabel += ' JS=' + CORDOVA_JS_BUILD_LABEL;
- }
me.available = true;
me.platform = info.platform;
me.version = info.version;