Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3E6D3200CF4 for ; Sun, 3 Sep 2017 09:37:27 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3749C164547; Sun, 3 Sep 2017 07:37:27 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7FCE1164546 for ; Sun, 3 Sep 2017 09:37:26 +0200 (CEST) Received: (qmail 98513 invoked by uid 500); 3 Sep 2017 07:37:25 -0000 Mailing-List: contact commits-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list commits@flex.apache.org Received: (qmail 98505 invoked by uid 99); 3 Sep 2017 07:37:25 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Sep 2017 07:37:25 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 87590F32D2; Sun, 3 Sep 2017 07:37:25 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: harbs@apache.org To: commits@flex.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: [flex-asjs] [refs/heads/develop] - Added isMobile() Date: Sun, 3 Sep 2017 07:37:25 +0000 (UTC) archived-at: Sun, 03 Sep 2017 07:37:27 -0000 Repository: flex-asjs Updated Branches: refs/heads/develop a2438456e -> 2609e6109 Added isMobile() Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/2609e610 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/2609e610 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/2609e610 Branch: refs/heads/develop Commit: 2609e61091d3b77d665752a57865278aa625f79d Parents: a243845 Author: Harbs Authored: Sun Sep 3 10:37:21 2017 +0300 Committer: Harbs Committed: Sun Sep 3 10:37:21 2017 +0300 ---------------------------------------------------------------------- .../Core/src/main/flex/org/apache/flex/utils/BrowserInfo.as | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2609e610/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BrowserInfo.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BrowserInfo.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BrowserInfo.as index c902ac7..59f4052 100644 --- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BrowserInfo.as +++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BrowserInfo.as @@ -78,7 +78,7 @@ package org.apache.flex.utils private var _formFactor:String; /** - * The form factor of the device. Pne of: "Mobile", "Tablet", "TV", "iPhone", "iPad", "iPod" or "Desktop". + * The form factor of the device. One of: "Mobile", "Tablet", "TV", "iPhone", "iPad", "iPod" or "Desktop". */ public function get formFactor():String{ return _formFactor; @@ -87,6 +87,10 @@ package org.apache.flex.utils { return OSUtils.getOS(); } + public function isMobile():Boolean + { + return formFactor != "Desktop" && formFactor != "TV"; + } private static var _current:BrowserInfo; public static function current():BrowserInfo {