mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-05 20:45:49 +01:00
don't try to determine if I'm on an emulator
What I have doesn't work, and there's no consensus online what might
This commit is contained in:
parent
e5470c458a
commit
57b0a0f98d
2 changed files with 0 additions and 30 deletions
|
@ -368,9 +368,6 @@ public class MQTTUtils extends Thread implements IMqttActionListener, MqttCallba
|
|||
params.put( "tmpKey", getTmpKey(mContext) );
|
||||
params.put( "frstV", Utils.getFirstVersion( mContext ) );
|
||||
params.put( "relayDID", DevID.getRelayDevID( mContext ) );
|
||||
if ( XWApp.onEmulator() ) {
|
||||
params.put( "emu", true );
|
||||
}
|
||||
|
||||
Log.d( TAG, "registerOnce(): sending %s", params );
|
||||
HttpsURLConnection conn
|
||||
|
|
|
@ -138,33 +138,6 @@ public class XWApp extends Application
|
|||
return context.getString( R.string.app_name );
|
||||
}
|
||||
|
||||
public static boolean onEmulator()
|
||||
{
|
||||
if ( null == s_onEmulator ) {
|
||||
// https://ray-chong.medium.com/android-emulator-detection-4d0f994aab5e
|
||||
boolean onEmulator =
|
||||
Build.MANUFACTURER.contains("Genymotion")
|
||||
|| Build.MODEL.contains("google_sdk")
|
||||
|| Build.MODEL.toLowerCase().contains("droid4x")
|
||||
|| Build.MODEL.contains("Emulator")
|
||||
|| Build.MODEL.contains("Android SDK built for x86")
|
||||
|| Build.HARDWARE == "goldfish"
|
||||
|| Build.HARDWARE == "vbox86"
|
||||
|| Build.HARDWARE.toLowerCase().contains("nox")
|
||||
|| Build.FINGERPRINT.startsWith("generic")
|
||||
|| Build.PRODUCT == "sdk"
|
||||
|| Build.PRODUCT == "google_sdk"
|
||||
|| Build.PRODUCT == "sdk_x86"
|
||||
|| Build.PRODUCT == "vbox86p"
|
||||
|| Build.PRODUCT.toLowerCase().contains("nox")
|
||||
|| Build.BOARD.toLowerCase().contains("nox")
|
||||
|| (Build.BRAND.startsWith("generic") && Build.DEVICE.startsWith("generic"))
|
||||
;
|
||||
s_onEmulator = new Boolean( onEmulator );
|
||||
}
|
||||
return s_onEmulator;
|
||||
}
|
||||
|
||||
public static Context getContext()
|
||||
{
|
||||
Assert.assertNotNull( s_context );
|
||||
|
|
Loading…
Add table
Reference in a new issue