CoordinatorLayout.java 70.2 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369
package android.support.design.widget;

import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.Region.Op;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Build.VERSION;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;
import android.os.SystemClock;
import android.support.annotation.ColorInt;
import android.support.annotation.DrawableRes;
import android.support.annotation.FloatRange;
import android.support.annotation.IdRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.RestrictTo;
import android.support.annotation.VisibleForTesting;
import android.support.design.R.style;
import android.support.design.R.styleable;
import android.support.v4.content.ContextCompat;
import android.support.v4.graphics.drawable.DrawableCompat;
import android.support.v4.os.ParcelableCompat;
import android.support.v4.os.ParcelableCompatCreatorCallbacks;
import android.support.v4.util.Pools.Pool;
import android.support.v4.util.Pools.SynchronizedPool;
import android.support.v4.util.SimpleArrayMap;
import android.support.v4.view.AbsSavedState;
import android.support.v4.view.GravityCompat;
import android.support.v4.view.MotionEventCompat;
import android.support.v4.view.NestedScrollingParent;
import android.support.v4.view.NestedScrollingParentHelper;
import android.support.v4.view.OnApplyWindowInsetsListener;
import android.support.v4.view.ViewCompat;
import android.support.v4.view.WindowInsetsCompat;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.SparseArray;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.BaseSavedState;
import android.view.View.MeasureSpec;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewGroup.MarginLayoutParams;
import android.view.ViewGroup.OnHierarchyChangeListener;
import android.view.ViewParent;
import android.view.ViewTreeObserver;
import android.view.ViewTreeObserver.OnPreDrawListener;
import g;
import java.lang.annotation.Annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.reflect.Constructor;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import m;
import r;
import v;
import y;

public class CoordinatorLayout
  extends ViewGroup
  implements NestedScrollingParent
{
  static final String a;
  static final Class<?>[] b;
  static final ThreadLocal<Map<String, Constructor<Behavior>>> c;
  static final Comparator<View> d;
  private static final Pools.Pool<Rect> h;
  WindowInsetsCompat e;
  boolean f;
  ViewGroup.OnHierarchyChangeListener g;
  private final List<View> i = new ArrayList();
  private final g<View> j = new g();
  private final List<View> k = new ArrayList();
  private final List<View> l = new ArrayList();
  private final int[] m = new int[2];
  private Paint n;
  private boolean o;
  private boolean p;
  private int[] q;
  private View r;
  private View s;
  private View t;
  private b u;
  private boolean v;
  private Drawable w;
  private OnApplyWindowInsetsListener x;
  private final NestedScrollingParentHelper y = new NestedScrollingParentHelper(this);
  
  static
  {
    Object localObject = CoordinatorLayout.class.getPackage();
    if (localObject != null)
    {
      localObject = ((Package)localObject).getName();
      a = (String)localObject;
      if (Build.VERSION.SDK_INT < 21) {
        break label82;
      }
    }
    label82:
    for (d = new c();; d = null)
    {
      b = new Class[] { Context.class, AttributeSet.class };
      c = new ThreadLocal();
      h = new Pools.SynchronizedPool(12);
      return;
      localObject = null;
      break;
    }
  }
  
  public CoordinatorLayout(Context paramContext)
  {
    this(paramContext, null);
  }
  
  public CoordinatorLayout(Context paramContext, AttributeSet paramAttributeSet)
  {
    this(paramContext, paramAttributeSet, 0);
  }
  
  public CoordinatorLayout(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
  {
    super(paramContext, paramAttributeSet, paramInt);
    r.a(paramContext);
    paramAttributeSet = paramContext.obtainStyledAttributes(paramAttributeSet, R.styleable.CoordinatorLayout, paramInt, R.style.Widget_Design_CoordinatorLayout);
    paramInt = paramAttributeSet.getResourceId(R.styleable.CoordinatorLayout_keylines, 0);
    if (paramInt != 0)
    {
      paramContext = paramContext.getResources();
      this.q = paramContext.getIntArray(paramInt);
      float f1 = paramContext.getDisplayMetrics().density;
      int i2 = this.q.length;
      paramInt = i1;
      while (paramInt < i2)
      {
        paramContext = this.q;
        paramContext[paramInt] = ((int)(paramContext[paramInt] * f1));
        paramInt += 1;
      }
    }
    this.w = paramAttributeSet.getDrawable(R.styleable.CoordinatorLayout_statusBarBackground);
    paramAttributeSet.recycle();
    d();
    super.setOnHierarchyChangeListener(new a());
  }
  
  @NonNull
  private static Rect a()
  {
    Rect localRect2 = (Rect)h.acquire();
    Rect localRect1 = localRect2;
    if (localRect2 == null) {
      localRect1 = new Rect();
    }
    return localRect1;
  }
  
  static Behavior a(Context paramContext, AttributeSet paramAttributeSet, String paramString)
  {
    if (TextUtils.isEmpty(paramString)) {
      return null;
    }
    String str;
    if (paramString.startsWith(".")) {
      str = paramContext.getPackageName() + paramString;
    }
    label224:
    for (;;)
    {
      try
      {
        paramString = (Map)c.get();
        if (paramString != null) {
          break label224;
        }
        paramString = new HashMap();
        c.set(paramString);
        Constructor localConstructor2 = (Constructor)paramString.get(str);
        Constructor localConstructor1 = localConstructor2;
        if (localConstructor2 == null)
        {
          localConstructor1 = Class.forName(str, true, paramContext.getClassLoader()).getConstructor(b);
          localConstructor1.setAccessible(true);
          paramString.put(str, localConstructor1);
        }
        paramContext = (Behavior)localConstructor1.newInstance(new Object[] { paramContext, paramAttributeSet });
        return paramContext;
      }
      catch (Exception paramContext)
      {
        throw new RuntimeException("Could not inflate Behavior subclass " + str, paramContext);
      }
      str = paramString;
      if (paramString.indexOf('.') < 0)
      {
        str = paramString;
        if (!TextUtils.isEmpty(a)) {
          str = a + '.' + paramString;
        }
      }
    }
  }
  
  private static LayoutParams a(View paramView)
  {
    LayoutParams localLayoutParams = (LayoutParams)paramView.getLayoutParams();
    View localView;
    if (!localLayoutParams.b)
    {
      Class localClass = paramView.getClass();
      paramView = null;
      for (;;)
      {
        localView = paramView;
        if (localClass == null) {
          break;
        }
        paramView = (DefaultBehavior)localClass.getAnnotation(DefaultBehavior.class);
        localView = paramView;
        if (paramView != null) {
          break;
        }
        localClass = localClass.getSuperclass();
      }
      if (localView == null) {}
    }
    try
    {
      localLayoutParams.setBehavior((Behavior)localView.value().newInstance());
      localLayoutParams.b = true;
      return localLayoutParams;
    }
    catch (Exception paramView)
    {
      for (;;)
      {
        Log.e("CoordinatorLayout", "Default behavior class " + localView.value().getName() + " could not be instantiated. Did you forget a default constructor?", paramView);
      }
    }
  }
  
  private static void a(int paramInt1, Rect paramRect1, Rect paramRect2, LayoutParams paramLayoutParams, int paramInt2, int paramInt3)
  {
    int i2 = paramLayoutParams.gravity;
    int i1 = i2;
    if (i2 == 0) {
      i1 = 17;
    }
    int i3 = GravityCompat.getAbsoluteGravity(i1, paramInt1);
    i1 = GravityCompat.getAbsoluteGravity(c(paramLayoutParams.anchorGravity), paramInt1);
    switch (i1 & 0x7)
    {
    default: 
      paramInt1 = paramRect1.left;
      switch (i1 & 0x70)
      {
      default: 
        i1 = paramRect1.top;
        label114:
        i2 = paramInt1;
        switch (i3 & 0x7)
        {
        default: 
          i2 = paramInt1 - paramInt2;
        case 5: 
          label154:
          paramInt1 = i1;
          switch (i3 & 0x70)
          {
          }
          break;
        }
        break;
      }
      break;
    }
    for (paramInt1 = i1 - paramInt3;; paramInt1 = i1 - paramInt3 / 2)
    {
      paramRect2.set(i2, paramInt1, i2 + paramInt2, paramInt1 + paramInt3);
      return;
      paramInt1 = paramRect1.right;
      break;
      paramInt1 = paramRect1.left;
      paramInt1 = paramRect1.width() / 2 + paramInt1;
      break;
      i1 = paramRect1.bottom;
      break label114;
      i1 = paramRect1.top + paramRect1.height() / 2;
      break label114;
      i2 = paramInt1 - paramInt2 / 2;
      break label154;
    }
  }
  
  private static void a(@NonNull Rect paramRect)
  {
    paramRect.setEmpty();
    h.release(paramRect);
  }
  
  private void a(LayoutParams paramLayoutParams, Rect paramRect, int paramInt1, int paramInt2)
  {
    int i2 = getWidth();
    int i1 = getHeight();
    i2 = Math.max(getPaddingLeft() + paramLayoutParams.leftMargin, Math.min(paramRect.left, i2 - getPaddingRight() - paramInt1 - paramLayoutParams.rightMargin));
    i1 = Math.max(getPaddingTop() + paramLayoutParams.topMargin, Math.min(paramRect.top, i1 - getPaddingBottom() - paramInt2 - paramLayoutParams.bottomMargin));
    paramRect.set(i2, i1, i2 + paramInt1, i1 + paramInt2);
  }
  
  private static void a(View paramView, int paramInt)
  {
    LayoutParams localLayoutParams = (LayoutParams)paramView.getLayoutParams();
    if (localLayoutParams.d != paramInt)
    {
      ViewCompat.offsetLeftAndRight(paramView, paramInt - localLayoutParams.d);
      localLayoutParams.d = paramInt;
    }
  }
  
  private void a(View paramView, boolean paramBoolean, Rect paramRect)
  {
    if ((paramView.isLayoutRequested()) || (paramView.getVisibility() == 8))
    {
      paramRect.setEmpty();
      return;
    }
    if (paramBoolean)
    {
      v.a(this, paramView, paramRect);
      return;
    }
    paramRect.set(paramView.getLeft(), paramView.getTop(), paramView.getRight(), paramView.getBottom());
  }
  
  private boolean a(MotionEvent paramMotionEvent, int paramInt)
  {
    boolean bool1 = false;
    int i3 = 0;
    int i4 = MotionEventCompat.getActionMasked(paramMotionEvent);
    List localList = this.k;
    localList.clear();
    boolean bool2 = isChildrenDrawingOrderEnabled();
    int i5 = getChildCount();
    int i1 = i5 - 1;
    if (i1 >= 0)
    {
      if (bool2) {}
      for (i2 = getChildDrawingOrder(i5, i1);; i2 = i1)
      {
        localList.add(getChildAt(i2));
        i1 -= 1;
        break;
      }
    }
    if (d != null) {
      Collections.sort(localList, d);
    }
    i5 = localList.size();
    int i2 = 0;
    MotionEvent localMotionEvent = null;
    i1 = i3;
    View localView;
    LayoutParams localLayoutParams;
    Behavior localBehavior;
    if (i2 < i5)
    {
      localView = (View)localList.get(i2);
      localLayoutParams = (LayoutParams)localView.getLayoutParams();
      localBehavior = localLayoutParams.getBehavior();
      if (((bool1) || (i1 != 0)) && (i4 != 0))
      {
        if (localBehavior == null) {
          break label488;
        }
        if (localMotionEvent != null) {
          break label485;
        }
        long l1 = SystemClock.uptimeMillis();
        localMotionEvent = MotionEvent.obtain(l1, l1, 3, 0.0F, 0.0F, 0);
        label199:
        switch (paramInt)
        {
        }
      }
    }
    label304:
    label466:
    label475:
    label485:
    label488:
    for (;;)
    {
      i2 += 1;
      break;
      localBehavior.onInterceptTouchEvent(this, localView, localMotionEvent);
      continue;
      localBehavior.onTouchEvent(this, localView, localMotionEvent);
      continue;
      bool2 = bool1;
      if (!bool1)
      {
        bool2 = bool1;
        if (localBehavior == null) {}
      }
      switch (paramInt)
      {
      default: 
        bool2 = bool1;
        if (bool1)
        {
          this.r = localView;
          bool2 = bool1;
        }
        bool1 = bool2;
        if (localLayoutParams.a == null) {
          localLayoutParams.h = false;
        }
        boolean bool3 = localLayoutParams.h;
        if (localLayoutParams.h)
        {
          bool2 = true;
          if ((!bool2) || (bool3)) {
            break label466;
          }
        }
        break;
      }
      for (i1 = 1;; i1 = 0)
      {
        if (bool2)
        {
          bool2 = bool1;
          if (i1 == 0) {
            break label475;
          }
        }
        break;
        bool1 = localBehavior.onInterceptTouchEvent(this, localView, paramMotionEvent);
        break label304;
        bool1 = localBehavior.onTouchEvent(this, localView, paramMotionEvent);
        break label304;
        boolean bool4 = localLayoutParams.h;
        if (localLayoutParams.a != null) {}
        for (bool2 = localLayoutParams.a.blocksInteractionBelow(this, localView);; bool2 = false)
        {
          bool2 |= bool4;
          localLayoutParams.h = bool2;
          break;
        }
      }
      bool2 = bool1;
      localList.clear();
      return bool2;
      break label199;
    }
  }
  
  private int b(int paramInt)
  {
    if (this.q == null)
    {
      Log.e("CoordinatorLayout", "No keylines defined for " + this + " - attempted index lookup " + paramInt);
      return 0;
    }
    if ((paramInt < 0) || (paramInt >= this.q.length))
    {
      Log.e("CoordinatorLayout", "Keyline index " + paramInt + " out of range for " + this);
      return 0;
    }
    return this.q[paramInt];
  }
  
  private void b()
  {
    if (this.r != null)
    {
      Behavior localBehavior = ((LayoutParams)this.r.getLayoutParams()).getBehavior();
      if (localBehavior != null)
      {
        long l1 = SystemClock.uptimeMillis();
        MotionEvent localMotionEvent = MotionEvent.obtain(l1, l1, 3, 0.0F, 0.0F, 0);
        localBehavior.onTouchEvent(this, this.r, localMotionEvent);
        localMotionEvent.recycle();
      }
      this.r = null;
    }
    int i2 = getChildCount();
    int i1 = 0;
    while (i1 < i2)
    {
      ((LayoutParams)getChildAt(i1).getLayoutParams()).h = false;
      i1 += 1;
    }
    this.o = false;
  }
  
  private static void b(View paramView, int paramInt)
  {
    LayoutParams localLayoutParams = (LayoutParams)paramView.getLayoutParams();
    if (localLayoutParams.e != paramInt)
    {
      ViewCompat.offsetTopAndBottom(paramView, paramInt - localLayoutParams.e);
      localLayoutParams.e = paramInt;
    }
  }
  
  private static int c(int paramInt)
  {
    int i1 = paramInt;
    if (paramInt == 0) {
      i1 = 8388659;
    }
    return i1;
  }
  
  private void c()
  {
    this.i.clear();
    Object localObject1 = this.j;
    int i2 = ((g)localObject1).b.size();
    int i1 = 0;
    Object localObject2;
    while (i1 < i2)
    {
      localObject2 = (ArrayList)((g)localObject1).b.valueAt(i1);
      if (localObject2 != null)
      {
        ((ArrayList)localObject2).clear();
        ((g)localObject1).a.release(localObject2);
      }
      i1 += 1;
    }
    ((g)localObject1).b.clear();
    int i4 = getChildCount();
    i2 = 0;
    while (i2 < i4)
    {
      View localView = getChildAt(i2);
      Object localObject3 = a(localView);
      if (((LayoutParams)localObject3).c == -1)
      {
        ((LayoutParams)localObject3).g = null;
        ((LayoutParams)localObject3).f = null;
        this.j.a(localView);
        i1 = 0;
      }
      for (;;)
      {
        if (i1 >= i4) {
          break label779;
        }
        if (i1 != i2)
        {
          localObject3 = getChildAt(i1);
          localObject1 = a((View)localObject3);
          int i3;
          if (localView != ((LayoutParams)localObject1).g)
          {
            i3 = ViewCompat.getLayoutDirection(this);
            int i5 = GravityCompat.getAbsoluteGravity(((LayoutParams)localView.getLayoutParams()).insetEdge, i3);
            if ((i5 != 0) && ((GravityCompat.getAbsoluteGravity(((LayoutParams)localObject1).dodgeInsetEdges, i3) & i5) == i5))
            {
              i3 = 1;
              label224:
              if ((i3 == 0) && ((((LayoutParams)localObject1).a == null) || (!((LayoutParams)localObject1).a.layoutDependsOn(this, (View)localObject3, localView)))) {
                break label689;
              }
            }
          }
          else
          {
            i3 = 1;
          }
          for (;;)
          {
            if (i3 != 0)
            {
              if (!this.j.b.containsKey(localObject3)) {
                this.j.a(localObject3);
              }
              g localg = this.j;
              if ((!localg.b.containsKey(localView)) || (!localg.b.containsKey(localObject3)))
              {
                throw new IllegalArgumentException("All nodes must be present in the graph before being added as an edge");
                if (((LayoutParams)localObject3).f != null)
                {
                  if (((LayoutParams)localObject3).f.getId() == ((LayoutParams)localObject3).c) {
                    break label408;
                  }
                  i1 = 0;
                }
                for (;;)
                {
                  if (i1 != 0) {
                    break label497;
                  }
                  ((LayoutParams)localObject3).f = findViewById(((LayoutParams)localObject3).c);
                  if (((LayoutParams)localObject3).f == null) {
                    break label615;
                  }
                  if (((LayoutParams)localObject3).f != this) {
                    break label510;
                  }
                  if (!isInEditMode()) {
                    break label499;
                  }
                  ((LayoutParams)localObject3).g = null;
                  ((LayoutParams)localObject3).f = null;
                  break;
                  label408:
                  localObject2 = ((LayoutParams)localObject3).f;
                  for (localObject1 = ((LayoutParams)localObject3).f.getParent();; localObject1 = ((ViewParent)localObject1).getParent())
                  {
                    if (localObject1 == this) {
                      break label487;
                    }
                    if ((localObject1 == null) || (localObject1 == localView))
                    {
                      ((LayoutParams)localObject3).g = null;
                      ((LayoutParams)localObject3).f = null;
                      i1 = 0;
                      break;
                    }
                    if ((localObject1 instanceof View)) {
                      localObject2 = (View)localObject1;
                    }
                  }
                  label487:
                  ((LayoutParams)localObject3).g = ((View)localObject2);
                  i1 = 1;
                }
                label497:
                break;
                label499:
                throw new IllegalStateException("View can not be anchored to the the parent CoordinatorLayout");
                label510:
                localObject2 = ((LayoutParams)localObject3).f;
                for (localObject1 = ((LayoutParams)localObject3).f.getParent();; localObject1 = ((ViewParent)localObject1).getParent())
                {
                  if ((localObject1 == this) || (localObject1 == null)) {
                    break label605;
                  }
                  if (localObject1 == localView)
                  {
                    if (isInEditMode())
                    {
                      ((LayoutParams)localObject3).g = null;
                      ((LayoutParams)localObject3).f = null;
                      break;
                    }
                    throw new IllegalStateException("Anchor must not be a descendant of the anchored view");
                  }
                  if ((localObject1 instanceof View)) {
                    localObject2 = (View)localObject1;
                  }
                }
                label605:
                ((LayoutParams)localObject3).g = ((View)localObject2);
                break;
                label615:
                if (isInEditMode())
                {
                  ((LayoutParams)localObject3).g = null;
                  ((LayoutParams)localObject3).f = null;
                  break;
                }
                throw new IllegalStateException("Could not find CoordinatorLayout descendant view with id " + getResources().getResourceName(((LayoutParams)localObject3).c) + " to anchor view " + localView);
                i3 = 0;
                break label224;
                label689:
                i3 = 0;
                continue;
              }
              localObject2 = (ArrayList)localg.b.get(localView);
              localObject1 = localObject2;
              if (localObject2 == null)
              {
                localObject2 = (ArrayList)localg.a.acquire();
                localObject1 = localObject2;
                if (localObject2 == null) {
                  localObject1 = new ArrayList();
                }
                localg.b.put(localView, localObject1);
              }
              ((ArrayList)localObject1).add(localObject3);
            }
          }
        }
        i1 += 1;
      }
      label779:
      i2 += 1;
    }
    this.i.addAll(this.j.a());
    Collections.reverse(this.i);
  }
  
  private static int d(int paramInt)
  {
    int i1 = paramInt;
    if (paramInt == 0) {
      i1 = 8388661;
    }
    return i1;
  }
  
  private void d()
  {
    if (Build.VERSION.SDK_INT < 21) {
      return;
    }
    if (ViewCompat.getFitsSystemWindows(this))
    {
      if (this.x == null) {
        this.x = new OnApplyWindowInsetsListener()
        {
          public final WindowInsetsCompat onApplyWindowInsets(View paramAnonymousView, WindowInsetsCompat paramAnonymousWindowInsetsCompat)
          {
            boolean bool2 = true;
            int i = 0;
            CoordinatorLayout localCoordinatorLayout = CoordinatorLayout.this;
            if (!y.a(localCoordinatorLayout.e, paramAnonymousWindowInsetsCompat))
            {
              localCoordinatorLayout.e = paramAnonymousWindowInsetsCompat;
              if ((paramAnonymousWindowInsetsCompat != null) && (paramAnonymousWindowInsetsCompat.getSystemWindowInsetTop() > 0))
              {
                bool1 = true;
                localCoordinatorLayout.f = bool1;
                if ((localCoordinatorLayout.f) || (localCoordinatorLayout.getBackground() != null)) {
                  break label164;
                }
              }
              label164:
              for (boolean bool1 = bool2;; bool1 = false)
              {
                localCoordinatorLayout.setWillNotDraw(bool1);
                if (paramAnonymousWindowInsetsCompat.isConsumed()) {
                  break label180;
                }
                int j = localCoordinatorLayout.getChildCount();
                paramAnonymousView = paramAnonymousWindowInsetsCompat;
                while (i < j)
                {
                  paramAnonymousWindowInsetsCompat = localCoordinatorLayout.getChildAt(i);
                  if (!ViewCompat.getFitsSystemWindows(paramAnonymousWindowInsetsCompat)) {
                    break label177;
                  }
                  CoordinatorLayout.Behavior localBehavior = ((CoordinatorLayout.LayoutParams)paramAnonymousWindowInsetsCompat.getLayoutParams()).getBehavior();
                  if (localBehavior == null) {
                    break label177;
                  }
                  paramAnonymousWindowInsetsCompat = localBehavior.onApplyWindowInsets(localCoordinatorLayout, paramAnonymousWindowInsetsCompat, paramAnonymousView);
                  paramAnonymousView = paramAnonymousWindowInsetsCompat;
                  if (paramAnonymousWindowInsetsCompat.isConsumed()) {
                    break;
                  }
                  paramAnonymousView = paramAnonymousWindowInsetsCompat;
                  i += 1;
                }
                bool1 = false;
                break;
              }
              for (;;)
              {
                localCoordinatorLayout.requestLayout();
                return paramAnonymousView;
                label177:
                break;
                label180:
                paramAnonymousView = paramAnonymousWindowInsetsCompat;
              }
            }
            return paramAnonymousWindowInsetsCompat;
          }
        };
      }
      ViewCompat.setOnApplyWindowInsetsListener(this, this.x);
      setSystemUiVisibility(1280);
      return;
    }
    ViewCompat.setOnApplyWindowInsetsListener(this, null);
  }
  
  final void a(int paramInt)
  {
    int i4 = ViewCompat.getLayoutDirection(this);
    int i5 = this.i.size();
    Rect localRect1 = a();
    Rect localRect2 = a();
    Rect localRect3 = a();
    int i2 = 0;
    View localView;
    Object localObject1;
    int i1;
    Object localObject2;
    Object localObject3;
    if (i2 < i5)
    {
      localView = (View)this.i.get(i2);
      localObject1 = (LayoutParams)localView.getLayoutParams();
      if ((paramInt != 0) || (localView.getVisibility() != 8))
      {
        i1 = 0;
        int i6;
        int i7;
        int i3;
        if (i1 < i2)
        {
          localObject2 = (View)this.i.get(i1);
          Rect localRect5;
          if (((LayoutParams)localObject1).g == localObject2)
          {
            localObject2 = (LayoutParams)localView.getLayoutParams();
            if (((LayoutParams)localObject2).f != null)
            {
              localObject3 = a();
              localRect4 = a();
              localRect5 = a();
              v.a(this, ((LayoutParams)localObject2).f, (Rect)localObject3);
              a(localView, false, localRect4);
              i6 = localView.getMeasuredWidth();
              i7 = localView.getMeasuredHeight();
              a(i4, (Rect)localObject3, localRect5, (LayoutParams)localObject2, i6, i7);
              if ((localRect5.left == localRect4.left) && (localRect5.top == localRect4.top)) {
                break label337;
              }
            }
          }
          label337:
          for (i3 = 1;; i3 = 0)
          {
            a((LayoutParams)localObject2, localRect5, i6, i7);
            i6 = localRect5.left - localRect4.left;
            i7 = localRect5.top - localRect4.top;
            if (i6 != 0) {
              ViewCompat.offsetLeftAndRight(localView, i6);
            }
            if (i7 != 0) {
              ViewCompat.offsetTopAndBottom(localView, i7);
            }
            if (i3 != 0)
            {
              Behavior localBehavior = ((LayoutParams)localObject2).getBehavior();
              if (localBehavior != null) {
                localBehavior.onDependentViewChanged(this, localView, ((LayoutParams)localObject2).f);
              }
            }
            a((Rect)localObject3);
            a(localRect4);
            a(localRect5);
            i1 += 1;
            break;
          }
        }
        a(localView, true, localRect2);
        if ((((LayoutParams)localObject1).insetEdge != 0) && (!localRect2.isEmpty()))
        {
          i1 = GravityCompat.getAbsoluteGravity(((LayoutParams)localObject1).insetEdge, i4);
          switch (i1 & 0x70)
          {
          default: 
            switch (i1 & 0x7)
            {
            }
            break;
          }
        }
        for (;;)
        {
          if ((((LayoutParams)localObject1).dodgeInsetEdges != 0) && (localView.getVisibility() == 0) && (ViewCompat.isLaidOut(localView)) && (localView.getWidth() > 0) && (localView.getHeight() > 0)) {
            break label705;
          }
          label480:
          if (paramInt == 0)
          {
            localRect3.set(((LayoutParams)localView.getLayoutParams()).k);
            if (localRect3.equals(localRect2)) {
              break label1211;
            }
            ((LayoutParams)localView.getLayoutParams()).k.set(localRect2);
          }
          i1 = i2 + 1;
          for (;;)
          {
            if (i1 >= i5) {
              break label1211;
            }
            localObject1 = (View)this.i.get(i1);
            localObject2 = (LayoutParams)((View)localObject1).getLayoutParams();
            localObject3 = ((LayoutParams)localObject2).getBehavior();
            if ((localObject3 != null) && (((Behavior)localObject3).layoutDependsOn(this, (View)localObject1, localView)))
            {
              if ((paramInt != 0) || (!((LayoutParams)localObject2).j)) {
                break;
              }
              ((LayoutParams)localObject2).j = false;
            }
            i1 += 1;
          }
          localRect1.top = Math.max(localRect1.top, localRect2.bottom);
          break;
          localRect1.bottom = Math.max(localRect1.bottom, getHeight() - localRect2.top);
          break;
          localRect1.left = Math.max(localRect1.left, localRect2.right);
          continue;
          localRect1.right = Math.max(localRect1.right, getWidth() - localRect2.left);
        }
        label705:
        localObject1 = (LayoutParams)localView.getLayoutParams();
        localObject2 = ((LayoutParams)localObject1).getBehavior();
        localObject3 = a();
        Rect localRect4 = a();
        localRect4.set(localView.getLeft(), localView.getTop(), localView.getRight(), localView.getBottom());
        if ((localObject2 != null) && (((Behavior)localObject2).getInsetDodgeRect(this, localView, (Rect)localObject3)))
        {
          if (!localRect4.contains((Rect)localObject3)) {
            throw new IllegalArgumentException("Rect should be within the child's bounds. Rect:" + ((Rect)localObject3).toShortString() + " | Bounds:" + localRect4.toShortString());
          }
        }
        else {
          ((Rect)localObject3).set(localRect4);
        }
        a(localRect4);
        if (!((Rect)localObject3).isEmpty())
        {
          i6 = GravityCompat.getAbsoluteGravity(((LayoutParams)localObject1).dodgeInsetEdges, i4);
          i3 = 0;
          i1 = i3;
          if ((i6 & 0x30) == 48)
          {
            i7 = ((Rect)localObject3).top - ((LayoutParams)localObject1).topMargin - ((LayoutParams)localObject1).e;
            i1 = i3;
            if (i7 < localRect1.top)
            {
              b(localView, localRect1.top - i7);
              i1 = 1;
            }
          }
          i3 = i1;
          if ((i6 & 0x50) == 80)
          {
            i7 = getHeight() - ((Rect)localObject3).bottom - ((LayoutParams)localObject1).bottomMargin + ((LayoutParams)localObject1).e;
            i3 = i1;
            if (i7 < localRect1.bottom)
            {
              b(localView, i7 - localRect1.bottom);
              i3 = 1;
            }
          }
          if (i3 == 0) {
            b(localView, 0);
          }
          i3 = 0;
          i1 = i3;
          if ((i6 & 0x3) == 3)
          {
            i7 = ((Rect)localObject3).left - ((LayoutParams)localObject1).leftMargin - ((LayoutParams)localObject1).d;
            i1 = i3;
            if (i7 < localRect1.left)
            {
              a(localView, localRect1.left - i7);
              i1 = 1;
            }
          }
          if ((i6 & 0x5) != 5) {
            break label1234;
          }
          i3 = getWidth();
          i6 = ((Rect)localObject3).right;
          i7 = ((LayoutParams)localObject1).rightMargin;
          i3 = ((LayoutParams)localObject1).d + (i3 - i6 - i7);
          if (i3 >= localRect1.right) {
            break label1234;
          }
          a(localView, i3 - localRect1.right);
          i1 = 1;
        }
      }
    }
    label1211:
    label1234:
    for (;;)
    {
      if (i1 == 0) {
        a(localView, 0);
      }
      a((Rect)localObject3);
      break label480;
      switch (paramInt)
      {
      }
      for (boolean bool = ((Behavior)localObject3).onDependentViewChanged(this, (View)localObject1, localView); paramInt == 1; bool = true)
      {
        ((LayoutParams)localObject2).j = bool;
        break;
        ((Behavior)localObject3).onDependentViewRemoved(this, (View)localObject1, localView);
      }
      i2 += 1;
      break;
      a(localRect1);
      a(localRect2);
      a(localRect3);
      return;
    }
  }
  
  protected boolean checkLayoutParams(ViewGroup.LayoutParams paramLayoutParams)
  {
    return ((paramLayoutParams instanceof LayoutParams)) && (super.checkLayoutParams(paramLayoutParams));
  }
  
  public void dispatchDependentViewsChanged(View paramView)
  {
    List localList = this.j.b(paramView);
    if ((localList != null) && (!localList.isEmpty()))
    {
      int i1 = 0;
      while (i1 < localList.size())
      {
        View localView = (View)localList.get(i1);
        Behavior localBehavior = ((LayoutParams)localView.getLayoutParams()).getBehavior();
        if (localBehavior != null) {
          localBehavior.onDependentViewChanged(this, localView, paramView);
        }
        i1 += 1;
      }
    }
  }
  
  public boolean doViewsOverlap(View paramView1, View paramView2)
  {
    boolean bool2 = true;
    if ((paramView1.getVisibility() == 0) && (paramView2.getVisibility() == 0))
    {
      Rect localRect = a();
      boolean bool1;
      if (paramView1.getParent() != this) {
        bool1 = true;
      }
      for (;;)
      {
        a(paramView1, bool1, localRect);
        paramView1 = a();
        if (paramView2.getParent() != this)
        {
          bool1 = true;
          label57:
          a(paramView2, bool1, paramView1);
        }
        try
        {
          if ((localRect.left <= paramView1.right) && (localRect.top <= paramView1.bottom) && (localRect.right >= paramView1.left))
          {
            int i1 = localRect.bottom;
            int i2 = paramView1.top;
            if (i1 >= i2)
            {
              bool1 = bool2;
              return bool1;
              bool1 = false;
              continue;
              bool1 = false;
              break label57;
            }
          }
          return false;
        }
        finally
        {
          a(localRect);
          a(paramView1);
        }
      }
    }
  }
  
  protected boolean drawChild(Canvas paramCanvas, View paramView, long paramLong)
  {
    LayoutParams localLayoutParams = (LayoutParams)paramView.getLayoutParams();
    if (localLayoutParams.a != null)
    {
      float f1 = localLayoutParams.a.getScrimOpacity(this, paramView);
      if (f1 > 0.0F)
      {
        if (this.n == null) {
          this.n = new Paint();
        }
        this.n.setColor(localLayoutParams.a.getScrimColor(this, paramView));
        this.n.setAlpha(m.a(Math.round(f1 * 255.0F), 0, 255));
        int i1 = paramCanvas.save();
        if (paramView.isOpaque()) {
          paramCanvas.clipRect(paramView.getLeft(), paramView.getTop(), paramView.getRight(), paramView.getBottom(), Region.Op.DIFFERENCE);
        }
        paramCanvas.drawRect(getPaddingLeft(), getPaddingTop(), getWidth() - getPaddingRight(), getHeight() - getPaddingBottom(), this.n);
        paramCanvas.restoreToCount(i1);
      }
    }
    return super.drawChild(paramCanvas, paramView, paramLong);
  }
  
  protected void drawableStateChanged()
  {
    super.drawableStateChanged();
    int[] arrayOfInt = getDrawableState();
    boolean bool2 = false;
    Drawable localDrawable = this.w;
    boolean bool1 = bool2;
    if (localDrawable != null)
    {
      bool1 = bool2;
      if (localDrawable.isStateful()) {
        bool1 = localDrawable.setState(arrayOfInt) | false;
      }
    }
    if (bool1) {
      invalidate();
    }
  }
  
  protected LayoutParams generateDefaultLayoutParams()
  {
    return new LayoutParams(-2, -2);
  }
  
  public LayoutParams generateLayoutParams(AttributeSet paramAttributeSet)
  {
    return new LayoutParams(getContext(), paramAttributeSet);
  }
  
  protected LayoutParams generateLayoutParams(ViewGroup.LayoutParams paramLayoutParams)
  {
    if ((paramLayoutParams instanceof LayoutParams)) {
      return new LayoutParams((LayoutParams)paramLayoutParams);
    }
    if ((paramLayoutParams instanceof ViewGroup.MarginLayoutParams)) {
      return new LayoutParams((ViewGroup.MarginLayoutParams)paramLayoutParams);
    }
    return new LayoutParams(paramLayoutParams);
  }
  
  @NonNull
  public List<View> getDependencies(@NonNull View paramView)
  {
    g localg = this.j;
    Object localObject1 = null;
    int i2 = localg.b.size();
    int i1 = 0;
    Object localObject2;
    if (i1 < i2)
    {
      ArrayList localArrayList = (ArrayList)localg.b.valueAt(i1);
      localObject2 = localObject1;
      if (localArrayList != null)
      {
        localObject2 = localObject1;
        if (localArrayList.contains(paramView))
        {
          if (localObject1 != null) {
            break label136;
          }
          localObject1 = new ArrayList();
        }
      }
    }
    label136:
    for (;;)
    {
      ((ArrayList)localObject1).add(localg.b.keyAt(i1));
      localObject2 = localObject1;
      i1 += 1;
      localObject1 = localObject2;
      break;
      this.l.clear();
      if (localObject1 != null) {
        this.l.addAll((Collection)localObject1);
      }
      return this.l;
    }
  }
  
  @VisibleForTesting
  final List<View> getDependencySortedChildren()
  {
    c();
    return Collections.unmodifiableList(this.i);
  }
  
  @NonNull
  public List<View> getDependents(@NonNull View paramView)
  {
    paramView = this.j.b(paramView);
    this.l.clear();
    if (paramView != null) {
      this.l.addAll(paramView);
    }
    return this.l;
  }
  
  final WindowInsetsCompat getLastWindowInsets()
  {
    return this.e;
  }
  
  public int getNestedScrollAxes()
  {
    return this.y.getNestedScrollAxes();
  }
  
  @Nullable
  public Drawable getStatusBarBackground()
  {
    return this.w;
  }
  
  protected int getSuggestedMinimumHeight()
  {
    return Math.max(super.getSuggestedMinimumHeight(), getPaddingTop() + getPaddingBottom());
  }
  
  protected int getSuggestedMinimumWidth()
  {
    return Math.max(super.getSuggestedMinimumWidth(), getPaddingLeft() + getPaddingRight());
  }
  
  public boolean isPointInChildBounds(View paramView, int paramInt1, int paramInt2)
  {
    Rect localRect = a();
    v.a(this, paramView, localRect);
    try
    {
      boolean bool = localRect.contains(paramInt1, paramInt2);
      return bool;
    }
    finally
    {
      a(localRect);
    }
  }
  
  public void onAttachedToWindow()
  {
    super.onAttachedToWindow();
    b();
    if (this.v)
    {
      if (this.u == null) {
        this.u = new b();
      }
      getViewTreeObserver().addOnPreDrawListener(this.u);
    }
    if ((this.e == null) && (ViewCompat.getFitsSystemWindows(this))) {
      ViewCompat.requestApplyInsets(this);
    }
    this.p = true;
  }
  
  public void onDetachedFromWindow()
  {
    super.onDetachedFromWindow();
    b();
    if ((this.v) && (this.u != null)) {
      getViewTreeObserver().removeOnPreDrawListener(this.u);
    }
    if (this.t != null) {
      onStopNestedScroll(this.t);
    }
    this.p = false;
  }
  
  public void onDraw(Canvas paramCanvas)
  {
    super.onDraw(paramCanvas);
    if ((this.f) && (this.w != null)) {
      if (this.e == null) {
        break label61;
      }
    }
    label61:
    for (int i1 = this.e.getSystemWindowInsetTop();; i1 = 0)
    {
      if (i1 > 0)
      {
        this.w.setBounds(0, 0, getWidth(), i1);
        this.w.draw(paramCanvas);
      }
      return;
    }
  }
  
  public boolean onInterceptTouchEvent(MotionEvent paramMotionEvent)
  {
    int i1 = MotionEventCompat.getActionMasked(paramMotionEvent);
    if (i1 == 0) {
      b();
    }
    boolean bool = a(paramMotionEvent, 0);
    if ((i1 == 1) || (i1 == 3)) {
      b();
    }
    return bool;
  }
  
  protected void onLayout(boolean paramBoolean, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    paramInt2 = ViewCompat.getLayoutDirection(this);
    paramInt3 = this.i.size();
    paramInt1 = 0;
    while (paramInt1 < paramInt3)
    {
      View localView = (View)this.i.get(paramInt1);
      if (localView.getVisibility() != 8)
      {
        Behavior localBehavior = ((LayoutParams)localView.getLayoutParams()).getBehavior();
        if ((localBehavior == null) || (!localBehavior.onLayoutChild(this, localView, paramInt2))) {
          onLayoutChild(localView, paramInt2);
        }
      }
      paramInt1 += 1;
    }
  }
  
  public void onLayoutChild(View paramView, int paramInt)
  {
    Object localObject1 = (LayoutParams)paramView.getLayoutParams();
    if ((((LayoutParams)localObject1).f == null) && (((LayoutParams)localObject1).c != -1)) {}
    for (int i1 = 1; i1 != 0; i1 = 0) {
      throw new IllegalStateException("An anchor may not be changed after CoordinatorLayout measurement begins before layout is complete.");
    }
    int i2;
    if (((LayoutParams)localObject1).f != null)
    {
      localObject2 = ((LayoutParams)localObject1).f;
      paramView.getLayoutParams();
      localObject1 = a();
      localRect = a();
      try
      {
        v.a(this, (View)localObject2, (Rect)localObject1);
        localObject2 = (LayoutParams)paramView.getLayoutParams();
        i1 = paramView.getMeasuredWidth();
        i2 = paramView.getMeasuredHeight();
        a(paramInt, (Rect)localObject1, localRect, (LayoutParams)localObject2, i1, i2);
        a((LayoutParams)localObject2, localRect, i1, i2);
        paramView.layout(localRect.left, localRect.top, localRect.right, localRect.bottom);
        return;
      }
      finally
      {
        a((Rect)localObject1);
        a(localRect);
      }
    }
    if (((LayoutParams)localObject1).keyline >= 0)
    {
      i2 = ((LayoutParams)localObject1).keyline;
      localObject1 = (LayoutParams)paramView.getLayoutParams();
      int i7 = GravityCompat.getAbsoluteGravity(d(((LayoutParams)localObject1).gravity), paramInt);
      int i6 = getWidth();
      int i5 = getHeight();
      int i3 = paramView.getMeasuredWidth();
      int i4 = paramView.getMeasuredHeight();
      i1 = i2;
      if (paramInt == 1) {
        i1 = i6 - i2;
      }
      paramInt = b(i1) - i3;
      switch (i7 & 0x7)
      {
      default: 
        switch (i7 & 0x70)
        {
        default: 
          i1 = 0;
        }
        break;
      }
      for (;;)
      {
        paramInt = Math.max(getPaddingLeft() + ((LayoutParams)localObject1).leftMargin, Math.min(paramInt, i6 - getPaddingRight() - i3 - ((LayoutParams)localObject1).rightMargin));
        i1 = Math.max(getPaddingTop() + ((LayoutParams)localObject1).topMargin, Math.min(i1, i5 - getPaddingBottom() - i4 - ((LayoutParams)localObject1).bottomMargin));
        paramView.layout(paramInt, i1, paramInt + i3, i1 + i4);
        return;
        paramInt += i3;
        break;
        paramInt += i3 / 2;
        break;
        i1 = i4 + 0;
        continue;
        i1 = i4 / 2 + 0;
      }
    }
    localObject1 = (LayoutParams)paramView.getLayoutParams();
    Rect localRect = a();
    localRect.set(getPaddingLeft() + ((LayoutParams)localObject1).leftMargin, getPaddingTop() + ((LayoutParams)localObject1).topMargin, getWidth() - getPaddingRight() - ((LayoutParams)localObject1).rightMargin, getHeight() - getPaddingBottom() - ((LayoutParams)localObject1).bottomMargin);
    if ((this.e != null) && (ViewCompat.getFitsSystemWindows(this)) && (!ViewCompat.getFitsSystemWindows(paramView)))
    {
      localRect.left += this.e.getSystemWindowInsetLeft();
      localRect.top += this.e.getSystemWindowInsetTop();
      localRect.right -= this.e.getSystemWindowInsetRight();
      localRect.bottom -= this.e.getSystemWindowInsetBottom();
    }
    Object localObject2 = a();
    GravityCompat.apply(c(((LayoutParams)localObject1).gravity), paramView.getMeasuredWidth(), paramView.getMeasuredHeight(), localRect, (Rect)localObject2, paramInt);
    paramView.layout(((Rect)localObject2).left, ((Rect)localObject2).top, ((Rect)localObject2).right, ((Rect)localObject2).bottom);
    a(localRect);
    a((Rect)localObject2);
  }
  
  protected void onMeasure(int paramInt1, int paramInt2)
  {
    c();
    int i3 = getChildCount();
    int i1 = 0;
    View localView;
    Object localObject1;
    int i4;
    int i2;
    label44:
    Object localObject2;
    if (i1 < i3)
    {
      localView = getChildAt(i1);
      localObject1 = this.j;
      i4 = ((g)localObject1).b.size();
      i2 = 0;
      if (i2 < i4)
      {
        localObject2 = (ArrayList)((g)localObject1).b.valueAt(i2);
        if ((localObject2 != null) && (((ArrayList)localObject2).contains(localView)))
        {
          i2 = 1;
          label84:
          if (i2 == 0) {
            break label618;
          }
        }
      }
    }
    for (int i22 = 1;; i22 = 0)
    {
      label148:
      int i10;
      int i5;
      label187:
      int i6;
      label242:
      int i7;
      label256:
      int i8;
      int i9;
      int i20;
      if (i22 != this.v)
      {
        if (i22 != 0)
        {
          if (this.p)
          {
            if (this.u == null) {
              this.u = new b();
            }
            getViewTreeObserver().addOnPreDrawListener(this.u);
          }
          this.v = true;
        }
      }
      else
      {
        i10 = getPaddingLeft();
        int i11 = getPaddingTop();
        int i12 = getPaddingRight();
        int i13 = getPaddingBottom();
        int i14 = ViewCompat.getLayoutDirection(this);
        if (i14 != 1) {
          break label658;
        }
        i5 = 1;
        int i15 = View.MeasureSpec.getMode(paramInt1);
        int i16 = View.MeasureSpec.getSize(paramInt1);
        int i17 = View.MeasureSpec.getMode(paramInt2);
        int i18 = View.MeasureSpec.getSize(paramInt2);
        i3 = getSuggestedMinimumWidth();
        i2 = getSuggestedMinimumHeight();
        i1 = 0;
        if ((this.e == null) || (!ViewCompat.getFitsSystemWindows(this))) {
          break label664;
        }
        i6 = 1;
        int i19 = this.i.size();
        i7 = 0;
        if (i7 >= i19) {
          break label714;
        }
        localView = (View)this.i.get(i7);
        if (localView.getVisibility() == 8) {
          break label749;
        }
        localObject1 = (LayoutParams)localView.getLayoutParams();
        i8 = 0;
        i4 = i8;
        if (((LayoutParams)localObject1).keyline >= 0)
        {
          i4 = i8;
          if (i15 != 0)
          {
            i9 = b(((LayoutParams)localObject1).keyline);
            i20 = GravityCompat.getAbsoluteGravity(d(((LayoutParams)localObject1).gravity), i14) & 0x7;
            if (((i20 != 3) || (i5 != 0)) && ((i20 != 5) || (i5 == 0))) {
              break label670;
            }
            i4 = Math.max(0, i16 - i12 - i9);
          }
        }
        label388:
        if ((i6 == 0) || (ViewCompat.getFitsSystemWindows(localView))) {
          break label740;
        }
        i8 = this.e.getSystemWindowInsetLeft();
        int i21 = this.e.getSystemWindowInsetRight();
        i9 = this.e.getSystemWindowInsetTop();
        i20 = this.e.getSystemWindowInsetBottom();
        i8 = View.MeasureSpec.makeMeasureSpec(i16 - (i8 + i21), i15);
        i9 = View.MeasureSpec.makeMeasureSpec(i18 - (i9 + i20), i17);
        label467:
        localObject2 = ((LayoutParams)localObject1).getBehavior();
        if ((localObject2 == null) || (!((Behavior)localObject2).onMeasureChild(this, localView, i8, i4, i9, 0))) {
          onMeasureChild(localView, i8, i4, i9, 0);
        }
        i4 = Math.max(i3, localView.getMeasuredWidth() + (i10 + i12) + ((LayoutParams)localObject1).leftMargin + ((LayoutParams)localObject1).rightMargin);
        i2 = Math.max(i2, localView.getMeasuredHeight() + (i11 + i13) + ((LayoutParams)localObject1).topMargin + ((LayoutParams)localObject1).bottomMargin);
        i3 = ViewCompat.combineMeasuredStates(i1, ViewCompat.getMeasuredState(localView));
      }
      for (i1 = i4;; i1 = i4)
      {
        i7 += 1;
        i4 = i1;
        i1 = i3;
        i3 = i4;
        break label256;
        i2 += 1;
        break label44;
        i2 = 0;
        break label84;
        label618:
        i1 += 1;
        break;
        if ((this.p) && (this.u != null)) {
          getViewTreeObserver().removeOnPreDrawListener(this.u);
        }
        this.v = false;
        break label148;
        label658:
        i5 = 0;
        break label187;
        label664:
        i6 = 0;
        break label242;
        label670:
        if ((i20 != 5) || (i5 != 0))
        {
          i4 = i8;
          if (i20 != 3) {
            break label388;
          }
          i4 = i8;
          if (i5 == 0) {
            break label388;
          }
        }
        i4 = Math.max(0, i9 - i10);
        break label388;
        label714:
        setMeasuredDimension(ViewCompat.resolveSizeAndState(i3, paramInt1, 0xFF000000 & i1), ViewCompat.resolveSizeAndState(i2, paramInt2, i1 << 16));
        return;
        label740:
        i9 = paramInt2;
        i8 = paramInt1;
        break label467;
        label749:
        i4 = i3;
        i3 = i1;
      }
    }
  }
  
  public void onMeasureChild(View paramView, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    measureChildWithMargins(paramView, paramInt1, paramInt2, paramInt3, paramInt4);
  }
  
  public boolean onNestedFling(View paramView, float paramFloat1, float paramFloat2, boolean paramBoolean)
  {
    int i2 = getChildCount();
    int i1 = 0;
    boolean bool = false;
    if (i1 < i2)
    {
      View localView = getChildAt(i1);
      if (localView.getVisibility() == 8) {
        break label107;
      }
      Object localObject = (LayoutParams)localView.getLayoutParams();
      if (!((LayoutParams)localObject).i) {
        break label107;
      }
      localObject = ((LayoutParams)localObject).getBehavior();
      if (localObject == null) {
        break label107;
      }
      bool = ((Behavior)localObject).onNestedFling(this, localView, paramView, paramFloat1, paramFloat2, paramBoolean) | bool;
    }
    label107:
    for (;;)
    {
      i1 += 1;
      break;
      if (bool) {
        a(1);
      }
      return bool;
    }
  }
  
  public boolean onNestedPreFling(View paramView, float paramFloat1, float paramFloat2)
  {
    int i2 = getChildCount();
    int i1 = 0;
    boolean bool = false;
    if (i1 < i2)
    {
      View localView = getChildAt(i1);
      if (localView.getVisibility() == 8) {
        break label95;
      }
      Object localObject = (LayoutParams)localView.getLayoutParams();
      if (!((LayoutParams)localObject).i) {
        break label95;
      }
      localObject = ((LayoutParams)localObject).getBehavior();
      if (localObject == null) {
        break label95;
      }
      bool = ((Behavior)localObject).onNestedPreFling(this, localView, paramView, paramFloat1, paramFloat2) | bool;
    }
    label95:
    for (;;)
    {
      i1 += 1;
      break;
      return bool;
    }
  }
  
  public void onNestedPreScroll(View paramView, int paramInt1, int paramInt2, int[] paramArrayOfInt)
  {
    int i2 = 0;
    int i1 = 0;
    int i3 = 0;
    int i6 = getChildCount();
    int i4 = 0;
    label123:
    label140:
    int i5;
    if (i4 < i6)
    {
      View localView = getChildAt(i4);
      if (localView.getVisibility() == 8) {
        break label231;
      }
      Object localObject = (LayoutParams)localView.getLayoutParams();
      if (!((LayoutParams)localObject).i) {
        break label231;
      }
      localObject = ((LayoutParams)localObject).getBehavior();
      if (localObject == null) {
        break label231;
      }
      int[] arrayOfInt = this.m;
      this.m[1] = 0;
      arrayOfInt[0] = 0;
      ((Behavior)localObject).onNestedPreScroll(this, localView, paramView, paramInt1, paramInt2, this.m);
      if (paramInt1 > 0)
      {
        i2 = Math.max(i2, this.m[0]);
        if (paramInt2 <= 0) {
          break label192;
        }
        i1 = Math.max(i1, this.m[1]);
        i5 = 1;
        i3 = i1;
        i1 = i5;
      }
    }
    for (;;)
    {
      i5 = i4 + 1;
      i4 = i3;
      i3 = i1;
      i1 = i4;
      i4 = i5;
      break;
      i2 = Math.min(i2, this.m[0]);
      break label123;
      label192:
      i1 = Math.min(i1, this.m[1]);
      break label140;
      paramArrayOfInt[0] = i2;
      paramArrayOfInt[1] = i1;
      if (i3 != 0) {
        a(1);
      }
      return;
      label231:
      i5 = i1;
      i1 = i3;
      i3 = i5;
    }
  }
  
  public void onNestedScroll(View paramView, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    int i3 = getChildCount();
    int i1 = 0;
    int i2 = 0;
    if (i2 < i3)
    {
      View localView = getChildAt(i2);
      if (localView.getVisibility() == 8) {
        break label105;
      }
      Object localObject = (LayoutParams)localView.getLayoutParams();
      if (!((LayoutParams)localObject).i) {
        break label105;
      }
      localObject = ((LayoutParams)localObject).getBehavior();
      if (localObject == null) {
        break label105;
      }
      ((Behavior)localObject).onNestedScroll(this, localView, paramView, paramInt1, paramInt2, paramInt3, paramInt4);
      i1 = 1;
    }
    label105:
    for (;;)
    {
      i2 += 1;
      break;
      if (i1 != 0) {
        a(1);
      }
      return;
    }
  }
  
  public void onNestedScrollAccepted(View paramView1, View paramView2, int paramInt)
  {
    this.y.onNestedScrollAccepted(paramView1, paramView2, paramInt);
    this.s = paramView1;
    this.t = paramView2;
    int i2 = getChildCount();
    int i1 = 0;
    while (i1 < i2)
    {
      View localView = getChildAt(i1);
      Object localObject = (LayoutParams)localView.getLayoutParams();
      if (((LayoutParams)localObject).i)
      {
        localObject = ((LayoutParams)localObject).getBehavior();
        if (localObject != null) {
          ((Behavior)localObject).onNestedScrollAccepted(this, localView, paramView1, paramView2, paramInt);
        }
      }
      i1 += 1;
    }
  }
  
  protected void onRestoreInstanceState(Parcelable paramParcelable)
  {
    if (!(paramParcelable instanceof SavedState)) {
      super.onRestoreInstanceState(paramParcelable);
    }
    for (;;)
    {
      return;
      paramParcelable = (SavedState)paramParcelable;
      super.onRestoreInstanceState(paramParcelable.getSuperState());
      paramParcelable = paramParcelable.a;
      int i2 = getChildCount();
      int i1 = 0;
      while (i1 < i2)
      {
        View localView = getChildAt(i1);
        int i3 = localView.getId();
        Behavior localBehavior = a(localView).getBehavior();
        if ((i3 != -1) && (localBehavior != null))
        {
          Parcelable localParcelable = (Parcelable)paramParcelable.get(i3);
          if (localParcelable != null) {
            localBehavior.onRestoreInstanceState(this, localView, localParcelable);
          }
        }
        i1 += 1;
      }
    }
  }
  
  protected Parcelable onSaveInstanceState()
  {
    SavedState localSavedState = new SavedState(super.onSaveInstanceState());
    SparseArray localSparseArray = new SparseArray();
    int i2 = getChildCount();
    int i1 = 0;
    while (i1 < i2)
    {
      Object localObject = getChildAt(i1);
      int i3 = ((View)localObject).getId();
      Behavior localBehavior = ((LayoutParams)((View)localObject).getLayoutParams()).getBehavior();
      if ((i3 != -1) && (localBehavior != null))
      {
        localObject = localBehavior.onSaveInstanceState(this, (View)localObject);
        if (localObject != null) {
          localSparseArray.append(i3, localObject);
        }
      }
      i1 += 1;
    }
    localSavedState.a = localSparseArray;
    return localSavedState;
  }
  
  public boolean onStartNestedScroll(View paramView1, View paramView2, int paramInt)
  {
    int i2 = getChildCount();
    int i1 = 0;
    boolean bool1 = false;
    if (i1 < i2)
    {
      View localView = getChildAt(i1);
      LayoutParams localLayoutParams;
      boolean bool2;
      if (localView.getVisibility() != 8)
      {
        localLayoutParams = (LayoutParams)localView.getLayoutParams();
        Behavior localBehavior = localLayoutParams.getBehavior();
        if (localBehavior != null)
        {
          bool2 = localBehavior.onStartNestedScroll(this, localView, paramView1, paramView2, paramInt);
          bool1 |= bool2;
        }
      }
      for (localLayoutParams.i = bool2;; localLayoutParams.i = false)
      {
        i1 += 1;
        break;
      }
    }
    return bool1;
  }
  
  public void onStopNestedScroll(View paramView)
  {
    this.y.onStopNestedScroll(paramView);
    int i2 = getChildCount();
    int i1 = 0;
    while (i1 < i2)
    {
      View localView = getChildAt(i1);
      LayoutParams localLayoutParams = (LayoutParams)localView.getLayoutParams();
      if (localLayoutParams.i)
      {
        Behavior localBehavior = localLayoutParams.getBehavior();
        if (localBehavior != null) {
          localBehavior.onStopNestedScroll(this, localView, paramView);
        }
        localLayoutParams.i = false;
        localLayoutParams.j = false;
      }
      i1 += 1;
    }
    this.s = null;
    this.t = null;
  }
  
  public boolean onTouchEvent(MotionEvent paramMotionEvent)
  {
    int i1 = MotionEventCompat.getActionMasked(paramMotionEvent);
    boolean bool2;
    if (this.r == null)
    {
      bool2 = a(paramMotionEvent, 1);
      if (!bool2) {}
    }
    for (;;)
    {
      Behavior localBehavior = ((LayoutParams)this.r.getLayoutParams()).getBehavior();
      boolean bool1;
      if (localBehavior != null) {
        bool1 = localBehavior.onTouchEvent(this, this.r, paramMotionEvent);
      }
      for (;;)
      {
        if (this.r == null)
        {
          bool1 |= super.onTouchEvent(paramMotionEvent);
          paramMotionEvent = null;
        }
        for (;;)
        {
          if (paramMotionEvent != null) {
            paramMotionEvent.recycle();
          }
          if ((i1 == 1) || (i1 == 3)) {
            b();
          }
          return bool1;
          if (bool2)
          {
            long l1 = SystemClock.uptimeMillis();
            paramMotionEvent = MotionEvent.obtain(l1, l1, 3, 0.0F, 0.0F, 0);
            super.onTouchEvent(paramMotionEvent);
          }
          else
          {
            paramMotionEvent = null;
          }
        }
        bool1 = false;
        continue;
        bool1 = false;
      }
      bool2 = false;
    }
  }
  
  public boolean requestChildRectangleOnScreen(View paramView, Rect paramRect, boolean paramBoolean)
  {
    Behavior localBehavior = ((LayoutParams)paramView.getLayoutParams()).getBehavior();
    if ((localBehavior != null) && (localBehavior.onRequestChildRectangleOnScreen(this, paramView, paramRect, paramBoolean))) {
      return true;
    }
    return super.requestChildRectangleOnScreen(paramView, paramRect, paramBoolean);
  }
  
  public void requestDisallowInterceptTouchEvent(boolean paramBoolean)
  {
    super.requestDisallowInterceptTouchEvent(paramBoolean);
    if ((paramBoolean) && (!this.o))
    {
      b();
      this.o = true;
    }
  }
  
  public void setFitsSystemWindows(boolean paramBoolean)
  {
    super.setFitsSystemWindows(paramBoolean);
    d();
  }
  
  public void setOnHierarchyChangeListener(ViewGroup.OnHierarchyChangeListener paramOnHierarchyChangeListener)
  {
    this.g = paramOnHierarchyChangeListener;
  }
  
  public void setStatusBarBackground(@Nullable Drawable paramDrawable)
  {
    Drawable localDrawable = null;
    if (this.w != paramDrawable)
    {
      if (this.w != null) {
        this.w.setCallback(null);
      }
      if (paramDrawable != null) {
        localDrawable = paramDrawable.mutate();
      }
      this.w = localDrawable;
      if (this.w != null)
      {
        if (this.w.isStateful()) {
          this.w.setState(getDrawableState());
        }
        DrawableCompat.setLayoutDirection(this.w, ViewCompat.getLayoutDirection(this));
        paramDrawable = this.w;
        if (getVisibility() != 0) {
          break label114;
        }
      }
    }
    label114:
    for (boolean bool = true;; bool = false)
    {
      paramDrawable.setVisible(bool, false);
      this.w.setCallback(this);
      ViewCompat.postInvalidateOnAnimation(this);
      return;
    }
  }
  
  public void setStatusBarBackgroundColor(@ColorInt int paramInt)
  {
    setStatusBarBackground(new ColorDrawable(paramInt));
  }
  
  public void setStatusBarBackgroundResource(@DrawableRes int paramInt)
  {
    if (paramInt != 0) {}
    for (Drawable localDrawable = ContextCompat.getDrawable(getContext(), paramInt);; localDrawable = null)
    {
      setStatusBarBackground(localDrawable);
      return;
    }
  }
  
  public void setVisibility(int paramInt)
  {
    super.setVisibility(paramInt);
    if (paramInt == 0) {}
    for (boolean bool = true;; bool = false)
    {
      if ((this.w != null) && (this.w.isVisible() != bool)) {
        this.w.setVisible(bool, false);
      }
      return;
    }
  }
  
  protected boolean verifyDrawable(Drawable paramDrawable)
  {
    return (super.verifyDrawable(paramDrawable)) || (paramDrawable == this.w);
  }
  
  public static abstract class Behavior<V extends View>
  {
    public Behavior() {}
    
    public Behavior(Context paramContext, AttributeSet paramAttributeSet) {}
    
    public static Object getTag(View paramView)
    {
      return ((CoordinatorLayout.LayoutParams)paramView.getLayoutParams()).l;
    }
    
    public static void setTag(View paramView, Object paramObject)
    {
      ((CoordinatorLayout.LayoutParams)paramView.getLayoutParams()).l = paramObject;
    }
    
    public boolean blocksInteractionBelow(CoordinatorLayout paramCoordinatorLayout, V paramV)
    {
      return getScrimOpacity(paramCoordinatorLayout, paramV) > 0.0F;
    }
    
    public boolean getInsetDodgeRect(@NonNull CoordinatorLayout paramCoordinatorLayout, @NonNull V paramV, @NonNull Rect paramRect)
    {
      return false;
    }
    
    @ColorInt
    public int getScrimColor(CoordinatorLayout paramCoordinatorLayout, V paramV)
    {
      return -16777216;
    }
    
    @FloatRange(from=0.0D, to=1.0D)
    public float getScrimOpacity(CoordinatorLayout paramCoordinatorLayout, V paramV)
    {
      return 0.0F;
    }
    
    @Deprecated
    public boolean isDirty(CoordinatorLayout paramCoordinatorLayout, V paramV)
    {
      return false;
    }
    
    public boolean layoutDependsOn(CoordinatorLayout paramCoordinatorLayout, V paramV, View paramView)
    {
      return false;
    }
    
    @NonNull
    public WindowInsetsCompat onApplyWindowInsets(CoordinatorLayout paramCoordinatorLayout, V paramV, WindowInsetsCompat paramWindowInsetsCompat)
    {
      return paramWindowInsetsCompat;
    }
    
    public void onAttachedToLayoutParams(@NonNull CoordinatorLayout.LayoutParams paramLayoutParams) {}
    
    public boolean onDependentViewChanged(CoordinatorLayout paramCoordinatorLayout, V paramV, View paramView)
    {
      return false;
    }
    
    public void onDependentViewRemoved(CoordinatorLayout paramCoordinatorLayout, V paramV, View paramView) {}
    
    public void onDetachedFromLayoutParams() {}
    
    public boolean onInterceptTouchEvent(CoordinatorLayout paramCoordinatorLayout, V paramV, MotionEvent paramMotionEvent)
    {
      return false;
    }
    
    public boolean onLayoutChild(CoordinatorLayout paramCoordinatorLayout, V paramV, int paramInt)
    {
      return false;
    }
    
    public boolean onMeasureChild(CoordinatorLayout paramCoordinatorLayout, V paramV, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
    {
      return false;
    }
    
    public boolean onNestedFling(CoordinatorLayout paramCoordinatorLayout, V paramV, View paramView, float paramFloat1, float paramFloat2, boolean paramBoolean)
    {
      return false;
    }
    
    public boolean onNestedPreFling(CoordinatorLayout paramCoordinatorLayout, V paramV, View paramView, float paramFloat1, float paramFloat2)
    {
      return false;
    }
    
    public void onNestedPreScroll(CoordinatorLayout paramCoordinatorLayout, V paramV, View paramView, int paramInt1, int paramInt2, int[] paramArrayOfInt) {}
    
    public void onNestedScroll(CoordinatorLayout paramCoordinatorLayout, V paramV, View paramView, int paramInt1, int paramInt2, int paramInt3, int paramInt4) {}
    
    public void onNestedScrollAccepted(CoordinatorLayout paramCoordinatorLayout, V paramV, View paramView1, View paramView2, int paramInt) {}
    
    public boolean onRequestChildRectangleOnScreen(CoordinatorLayout paramCoordinatorLayout, V paramV, Rect paramRect, boolean paramBoolean)
    {
      return false;
    }
    
    public void onRestoreInstanceState(CoordinatorLayout paramCoordinatorLayout, V paramV, Parcelable paramParcelable) {}
    
    public Parcelable onSaveInstanceState(CoordinatorLayout paramCoordinatorLayout, V paramV)
    {
      return View.BaseSavedState.EMPTY_STATE;
    }
    
    public boolean onStartNestedScroll(CoordinatorLayout paramCoordinatorLayout, V paramV, View paramView1, View paramView2, int paramInt)
    {
      return false;
    }
    
    public void onStopNestedScroll(CoordinatorLayout paramCoordinatorLayout, V paramV, View paramView) {}
    
    public boolean onTouchEvent(CoordinatorLayout paramCoordinatorLayout, V paramV, MotionEvent paramMotionEvent)
    {
      return false;
    }
  }
  
  @Retention(RetentionPolicy.RUNTIME)
  public static @interface DefaultBehavior
  {
    Class<? extends CoordinatorLayout.Behavior> value();
  }
  
  @Retention(RetentionPolicy.SOURCE)
  @RestrictTo({android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP})
  public static @interface DispatchChangeEvent {}
  
  public static class LayoutParams
    extends ViewGroup.MarginLayoutParams
  {
    CoordinatorLayout.Behavior a;
    public int anchorGravity = 0;
    boolean b = false;
    int c = -1;
    int d;
    public int dodgeInsetEdges = 0;
    int e;
    View f;
    View g;
    public int gravity = 0;
    boolean h;
    boolean i;
    public int insetEdge = 0;
    boolean j;
    final Rect k = new Rect();
    public int keyline = -1;
    Object l;
    
    public LayoutParams(int paramInt1, int paramInt2)
    {
      super(paramInt2);
    }
    
    LayoutParams(Context paramContext, AttributeSet paramAttributeSet)
    {
      super(paramAttributeSet);
      TypedArray localTypedArray = paramContext.obtainStyledAttributes(paramAttributeSet, R.styleable.CoordinatorLayout_Layout);
      this.gravity = localTypedArray.getInteger(R.styleable.CoordinatorLayout_Layout_android_layout_gravity, 0);
      this.c = localTypedArray.getResourceId(R.styleable.CoordinatorLayout_Layout_layout_anchor, -1);
      this.anchorGravity = localTypedArray.getInteger(R.styleable.CoordinatorLayout_Layout_layout_anchorGravity, 0);
      this.keyline = localTypedArray.getInteger(R.styleable.CoordinatorLayout_Layout_layout_keyline, -1);
      this.insetEdge = localTypedArray.getInt(R.styleable.CoordinatorLayout_Layout_layout_insetEdge, 0);
      this.dodgeInsetEdges = localTypedArray.getInt(R.styleable.CoordinatorLayout_Layout_layout_dodgeInsetEdges, 0);
      this.b = localTypedArray.hasValue(R.styleable.CoordinatorLayout_Layout_layout_behavior);
      if (this.b) {
        this.a = CoordinatorLayout.a(paramContext, paramAttributeSet, localTypedArray.getString(R.styleable.CoordinatorLayout_Layout_layout_behavior));
      }
      localTypedArray.recycle();
      if (this.a != null) {
        this.a.onAttachedToLayoutParams(this);
      }
    }
    
    public LayoutParams(LayoutParams paramLayoutParams)
    {
      super();
    }
    
    public LayoutParams(ViewGroup.LayoutParams paramLayoutParams)
    {
      super();
    }
    
    public LayoutParams(ViewGroup.MarginLayoutParams paramMarginLayoutParams)
    {
      super();
    }
    
    @IdRes
    public int getAnchorId()
    {
      return this.c;
    }
    
    @Nullable
    public CoordinatorLayout.Behavior getBehavior()
    {
      return this.a;
    }
    
    public void setAnchorId(@IdRes int paramInt)
    {
      this.g = null;
      this.f = null;
      this.c = paramInt;
    }
    
    public void setBehavior(@Nullable CoordinatorLayout.Behavior paramBehavior)
    {
      if (this.a != paramBehavior)
      {
        if (this.a != null) {
          this.a.onDetachedFromLayoutParams();
        }
        this.a = paramBehavior;
        this.l = null;
        this.b = true;
        if (paramBehavior != null) {
          paramBehavior.onAttachedToLayoutParams(this);
        }
      }
    }
  }
  
  public static class SavedState
    extends AbsSavedState
  {
    public static final Parcelable.Creator<SavedState> CREATOR = ParcelableCompat.newCreator(new ParcelableCompatCreatorCallbacks() {});
    SparseArray<Parcelable> a;
    
    public SavedState(Parcel paramParcel, ClassLoader paramClassLoader)
    {
      super(paramClassLoader);
      int j = paramParcel.readInt();
      int[] arrayOfInt = new int[j];
      paramParcel.readIntArray(arrayOfInt);
      paramParcel = paramParcel.readParcelableArray(paramClassLoader);
      this.a = new SparseArray(j);
      int i = 0;
      while (i < j)
      {
        this.a.append(arrayOfInt[i], paramParcel[i]);
        i += 1;
      }
    }
    
    public SavedState(Parcelable paramParcelable)
    {
      super();
    }
    
    public void writeToParcel(Parcel paramParcel, int paramInt)
    {
      int j = 0;
      super.writeToParcel(paramParcel, paramInt);
      if (this.a != null) {}
      int[] arrayOfInt;
      Parcelable[] arrayOfParcelable;
      for (int i = this.a.size();; i = 0)
      {
        paramParcel.writeInt(i);
        arrayOfInt = new int[i];
        arrayOfParcelable = new Parcelable[i];
        while (j < i)
        {
          arrayOfInt[j] = this.a.keyAt(j);
          arrayOfParcelable[j] = ((Parcelable)this.a.valueAt(j));
          j += 1;
        }
      }
      paramParcel.writeIntArray(arrayOfInt);
      paramParcel.writeParcelableArray(arrayOfParcelable, paramInt);
    }
  }
  
  final class a
    implements ViewGroup.OnHierarchyChangeListener
  {
    a() {}
    
    public final void onChildViewAdded(View paramView1, View paramView2)
    {
      if (CoordinatorLayout.this.g != null) {
        CoordinatorLayout.this.g.onChildViewAdded(paramView1, paramView2);
      }
    }
    
    public final void onChildViewRemoved(View paramView1, View paramView2)
    {
      CoordinatorLayout.this.a(2);
      if (CoordinatorLayout.this.g != null) {
        CoordinatorLayout.this.g.onChildViewRemoved(paramView1, paramView2);
      }
    }
  }
  
  final class b
    implements ViewTreeObserver.OnPreDrawListener
  {
    b() {}
    
    public final boolean onPreDraw()
    {
      CoordinatorLayout.this.a(0);
      return true;
    }
  }
  
  static final class c
    implements Comparator<View>
  {}
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/android/support/design/widget/CoordinatorLayout.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */