Advertisement
AndrewHaxalot

Untitled

Apr 9th, 2014
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.71 KB | None | 0 0
  1. // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
  2. // Jad home page: http://www.geocities.com/kpdus/jad.html
  3. // Decompiler options: braces fieldsfirst space lnc
  4.  
  5. package com.facebook.location;
  6.  
  7. import android.location.Location;
  8. import android.os.Parcel;
  9. import android.os.Parcelable;
  10. import com.google.common.base.Preconditions;
  11.  
  12. // Referenced classes of package com.facebook.location:
  13. // l, m
  14.  
  15. public class Coordinates
  16. implements Parcelable
  17. {
  18.  
  19. public static final android.os.Parcelable.Creator CREATOR = new l();
  20. private final double a;
  21. private final double b;
  22. private final Double c;
  23. private final Float d;
  24. private final Float e;
  25. private final Float f;
  26. private final Float g;
  27.  
  28. private Coordinates(Parcel parcel)
  29. {
  30. a = parcel.readDouble();
  31. b = parcel.readDouble();
  32. c = (Double)parcel.readValue(null);
  33. d = (Float)parcel.readValue(null);
  34. e = (Float)parcel.readValue(null);
  35. f = (Float)parcel.readValue(null);
  36. g = (Float)parcel.readValue(null);
  37. }
  38.  
  39. Coordinates(Parcel parcel, byte byte0)
  40. {
  41. this(parcel);
  42. }
  43.  
  44. Coordinates(m m1)
  45. {
  46. boolean flag;
  47. if (m1.a() != null && m1.b() != null)
  48. {
  49. flag = true;
  50. } else
  51. {
  52. flag = false;
  53. }
  54. Preconditions.checkArgument(flag);
  55. a = m1.a().doubleValue();
  56. b = m1.b().doubleValue();
  57. c = m1.c();
  58. d = m1.d();
  59. e = m1.e();
  60. f = m1.f();
  61. g = m1.g();
  62. }
  63.  
  64. public static Coordinates a(Location location)
  65. {
  66. if (location == null)
  67. {
  68. return null;
  69. } else
  70. {
  71. return newBuilder().a(Double.valueOf(location.getLatitude())).b(Double.valueOf(location.getLongitude())).c(Double.valueOf(location.getAltitude())).a(Float.valueOf(location.getAccuracy())).c(Float.valueOf(location.getBearing())).d(Float.valueOf(location.getSpeed())).h();
  72. }
  73. }
  74.  
  75. public static m newBuilder()
  76. {
  77. return new m();
  78. }
  79.  
  80. public final Location a()
  81. {
  82. Location location = new Location("");
  83. location.setLatitude(a);
  84. location.setLongitude(b);
  85. if (c != null)
  86. {
  87. location.setAltitude(c.doubleValue());
  88. }
  89. if (d != null)
  90. {
  91. location.setAccuracy(d.floatValue());
  92. }
  93. if (g != null)
  94. {
  95. location.setSpeed(g.floatValue());
  96. }
  97. return location;
  98. }
  99.  
  100. public final double b()
  101. {
  102. return a;
  103. }
  104.  
  105. public final double c()
  106. {
  107. return b;
  108. }
  109.  
  110. public final Double d()
  111. {
  112. return c;
  113. }
  114.  
  115. public int describeContents()
  116. {
  117. return 0;
  118. }
  119.  
  120. public final boolean e()
  121. {
  122. return c != null;
  123. }
  124.  
  125. public final Float f()
  126. {
  127. return d;
  128. }
  129.  
  130. public final boolean g()
  131. {
  132. return d != null;
  133. }
  134.  
  135. public final Float h()
  136. {
  137. return e;
  138. }
  139.  
  140. public final boolean i()
  141. {
  142. return e != null;
  143. }
  144.  
  145. public final Float j()
  146. {
  147. return f;
  148. }
  149.  
  150. public final boolean k()
  151. {
  152. return f != null;
  153. }
  154.  
  155. public final Float l()
  156. {
  157. return g;
  158. }
  159.  
  160. public final boolean m()
  161. {
  162. return g != null;
  163. }
  164.  
  165. public void writeToParcel(Parcel parcel, int i1)
  166. {
  167. parcel.writeDouble(a);
  168. parcel.writeDouble(b);
  169. parcel.writeValue(c);
  170. parcel.writeValue(d);
  171. parcel.writeValue(e);
  172. parcel.writeValue(f);
  173. parcel.writeValue(g);
  174. }
  175.  
  176. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement