[Android] AndroidDevices: code simplification

Jean-Baptiste Kempf git at videolan.org
Sat May 23 17:39:02 CEST 2015


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat May 23 17:24:40 2015 +0200| [410a4dd450e25a4fd4629493ca7ba4832e7015fb] | committer: Jean-Baptiste Kempf

AndroidDevices: code simplification

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=410a4dd450e25a4fd4629493ca7ba4832e7015fb
---

 vlc-android/src/org/videolan/vlc/util/AndroidDevices.java |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/util/AndroidDevices.java b/vlc-android/src/org/videolan/vlc/util/AndroidDevices.java
index dfcecc6..746382a 100644
--- a/vlc-android/src/org/videolan/vlc/util/AndroidDevices.java
+++ b/vlc-android/src/org/videolan/vlc/util/AndroidDevices.java
@@ -28,12 +28,10 @@ import android.os.Build.VERSION;
 import android.os.Build.VERSION_CODES;
 import android.os.Environment;
 import android.telephony.TelephonyManager;
-import android.text.TextUtils;
 import android.view.InputDevice;
 import android.view.MotionEvent;
 
 import org.videolan.libvlc.LibVlcUtil;
-import org.videolan.vlc.R;
 import org.videolan.vlc.VLCApplication;
 
 import java.io.BufferedReader;
@@ -82,11 +80,7 @@ public class AndroidDevices {
 
     public static boolean isPhone(){
         TelephonyManager manager = (TelephonyManager)VLCApplication.getAppContext().getSystemService(Context.TELEPHONY_SERVICE);
-        if(manager.getPhoneType() == TelephonyManager.PHONE_TYPE_NONE){
-            return false;
-        }else{
-            return true;
-        }
+        return manager.getPhoneType() != TelephonyManager.PHONE_TYPE_NONE;
     }
 
     public static boolean hasTsp(){



More information about the Android mailing list