Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for isAndroid (0.04 sec)

  1. android/guava-tests/test/com/google/common/math/TestPlatform.java

    /**
     * @author Chris Povirk
     */
    @GwtCompatible
    @NullUnmarked
    final class TestPlatform {
      static boolean intsCanGoOutOfRange() {
        return false;
      }
    
      static boolean isAndroid() {
        return System.getProperty("java.runtime.name", "").contains("Android");
      }
    
      private TestPlatform() {}
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Aug 10 19:54:19 UTC 2025
    - 1K bytes
    - Viewed (0)
  2. guava-gwt/test-super/com/google/common/math/super/com/google/common/math/TestPlatform.java

    import com.google.common.annotations.GwtCompatible;
    
    /**
     * @author Chris Povirk
     */
    @GwtCompatible
    final class TestPlatform {
      static boolean intsCanGoOutOfRange() {
        return true;
      }
    
      static boolean isAndroid() {
        return false;
      }
    
      private TestPlatform() {}
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Aug 10 19:54:19 UTC 2025
    - 909 bytes
    - Viewed (0)
  3. okhttp/src/androidMain/kotlin/okhttp3/internal/platform/PlatformRegistry.kt

          return Jdk9Platform.buildIfSupported()
            ?: Platform()
        }
    
        throw IllegalStateException("Expected Android API level 21+ but was ${Build.VERSION.SDK_INT}")
      }
    
      actual val isAndroid: Boolean
        get() = true
    
      var applicationContext: Context?
        get() = (Platform.get() as? ContextAwarePlatform)?.applicationContext
        set(value) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 28 07:33:49 UTC 2025
    - 1.6K bytes
    - Viewed (0)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/platform/Platform.kt

          PublicSuffixDatabase.resetForTests()
        }
    
        fun alpnProtocolNames(protocols: List<Protocol>) = protocols.filter { it != Protocol.HTTP_1_0 }.map { it.toString() }
    
        val isAndroid: Boolean
          get() = PlatformRegistry.isAndroid
    
        /** Attempt to match the host runtime to a capable Platform implementation. */
        private fun findPlatform(): Platform = PlatformRegistry.findPlatform()
    
        /**
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 28 07:33:49 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/math/BigIntegerMathTest.java

      public void testDivNonZeroExact() {
        String runtimeName = System.getProperty("java.runtime.name");
        boolean isAndroid = runtimeName != null && runtimeName.contains("Android");
        for (BigInteger p : NONZERO_BIGINTEGER_CANDIDATES) {
          for (BigInteger q : NONZERO_BIGINTEGER_CANDIDATES) {
            if (isAndroid && p.equals(BAD_FOR_ANDROID_P) && q.equals(BAD_FOR_ANDROID_Q)) {
              // https://issuetracker.google.com/issues/37074172
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 27K bytes
    - Viewed (0)
  6. okhttp/src/androidMain/kotlin/okhttp3/internal/platform/Android10Platform.kt

        t: Throwable?,
      ) {
        if (level == WARN) {
          Log.w(Tag, message, t)
        } else {
          Log.i(Tag, message, t)
        }
      }
    
      companion object {
        val isSupported: Boolean = isAndroid && Build.VERSION.SDK_INT >= 29
    
        fun buildIfSupported(): Platform? = if (isSupported) Android10Platform() else null
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Jul 20 11:25:50 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/math/LongMathTest.java

              }
            }
          }
        }
      }
    
      @AndroidIncompatible // slow
      public void testCheckedMultiply() {
        boolean isAndroid = TestPlatform.isAndroid();
        for (long a : ALL_LONG_CANDIDATES) {
          for (long b : ALL_LONG_CANDIDATES) {
            if (isAndroid && a == -4294967296L && b == 2147483648L) {
              /*
               * Bug in older versions of Android we test against, since fixed: -9223372036854775808L /
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 31.4K bytes
    - Viewed (0)
  8. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

        // Needed because of Platform.resetForTests
        PlatformRegistry.applicationContext = ApplicationProvider.getApplicationContext<Context>()
      }
    
      @Test
      fun testPlatform() {
        assertTrue(Platform.isAndroid)
    
        if (Build.VERSION.SDK_INT >= 29) {
          assertTrue(Platform.get() is Android10Platform)
        } else {
          assertTrue(Platform.get() is AndroidPlatform)
        }
      }
    
      @Test
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 02 14:12:28 UTC 2025
    - 29K bytes
    - Viewed (0)
Back to top