Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2314e43 authored by The Android Open Source Project's avatar The Android Open Source Project
Browse files

Merge jb-mr1-dev into aosp/master - do not merge

Change-Id: Icf16741de4c0d248e5ffe3ef3b31ce6ce51c4c9f
parents 71958cca efcc8b1c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ ifeq "" "$(PLATFORM_VERSION)"
  # which is the version that we reveal to the end user.
  # Update this value when the platform version changes (rather
  # than overriding it somewhere else).  Can be an arbitrary string.
  PLATFORM_VERSION := 4.2.42.42.42
  PLATFORM_VERSION := 4.2.1.2.4.8.16.32.64
endif

ifeq "" "$(PLATFORM_SDK_VERSION)"
+212 −20
Original line number Diff line number Diff line
@@ -129,11 +129,14 @@ strong {
em {
  font-style: italic; }

acronym {
acronym,
.tooltip-link {
  border-bottom: 1px dotted #555555;
  cursor: help; }

acronym:hover {
acronym:hover,
.tooltip-link:hover {
  color: #7aa1b0;
  border-bottom-color: #7aa1b0; }

img.with-shadow,
@@ -451,15 +454,17 @@ video.with-shadow {
    width:123px;
  }
      
  .paging-links a.disabled,
  .training-nav-top a.disabled,
  .content-footer a.disabled {
    color:#999;
    color:#bbb;
  }
      
  .paging-links a.disabled:hover,
  .training-nav-top a.disabled:hover,
  .content-footer a.disabled:hover {
    cursor:default;
    color:#999 !important;
    color:#bbb !important;
  }
      
  .training-nav-top a.start-class-link,
@@ -467,6 +472,78 @@ video.with-shadow {
    width:262px;
  }
  
  /* list of classes on course landing page */
  ol.class-list {
    list-style:none;
    margin-left:0;
  }
  ol.class-list>li {
    margin:0 0 15px;
    padding:5px 0 0;
    overflow:hidden;
    border-top:1px solid #ccc;
  }
  ol.class-list li a.title {
    font-size:16px;
    margin:0;
    clear:left;
    display:block;
    height:32px;
    padding:0 4px;
  }
  ol.class-list li a.title h2 {
    color:inherit;
    margin:0 0 10px;
    display:block;
    float:left;
    width:675px;
  }
  ol.class-list li a.title span {
    display:none;
    float:left;
    font-size:18px;
    font-weight:bold;
    background: transparent url(../images/styles/disclosure_right.png) no-repeat scroll 50% 50%;
    width: 10px;
    height: 32px;
  }
  ol.class-list li a.title:hover {
    background:#ddd;
    color:#258AAF !important;
  }
  ol.class-list li a.title:hover span {
    display:block;
  }
  
  #jd-content
  ol.class-list li img {
    float:left;
    clear:left;
    width:64px;
    margin:0 20px 0 0;
  }
  ol.class-list li p.description {
    float:left;
    display:block;
    width:250px;
    margin:0;
  }
  ol.class-list li p.description.article {
    width: 550px;
  }
  ol.class-list ol {
    float:left;
    width:320px;
    margin:0 0 0 30px;
    list-style:none;
    margin:0 0 0 20px;
  }
  ol.class-list div.lessons li {
    margin:0 0 6px;
    line-height:16px;
  }
  
  
  .hide {
    display:none !important;
  }
@@ -484,6 +561,49 @@ video.with-shadow {
    text-transform:uppercase;
  }
  
  
  
  /* inner-doc tabs w/ title */
  
div#title-tabs-wrapper {
  border-bottom:1px solid #ccc;
  margin:20px 0 30px;
}
h1.with-title-tabs {
  display:inline-block;
  margin:0 0 -1px 0;
  padding:0 60px 0 0;
  border-bottom:1px solid #F9F9F9;
}
ul#title-tabs {
  list-style:none;
  padding:0;
  height:29px;
  margin:0;
  font-size:16px;
  line-height:26px;
  display:inline-block;
  vertical-align:bottom;
}
ul#title-tabs li {
  display:block;
  float:left;
  margin-right:40px;
  border-bottom: 3px solid transparent;
}
ul#title-tabs li.selected {
  border-bottom: 3px solid #93C;
}
ul#title-tabs li a {
  color:#333;
}
ul#title-tabs li a:hover,
ul#title-tabs li a:active {
  color:#93C !important;
}



/* content body */
@-webkit-keyframes glowheader {
  from {
@@ -938,9 +1058,12 @@ dd {
dd p {
  margin:10px 0 0;
}
ul p,
ol p {
  margin:5px 0 0;
li p,
li pre,
li ul,
li ol {
  margin-top:5px;
  margin-bottom:5px;
}
pre strong, pre b, a strong, a b, a code {
    color: inherit;
@@ -1418,8 +1541,6 @@ Buttons
    color: #444;
}
a.button, a.button:visited, a.button-secondary, a.button-secondary:visited {
    height: 28px;
    line-height: 28px;
    margin-right: 16px;
	 font-weight: 400;
    min-width: 54px;
@@ -1428,8 +1549,6 @@ a.button, a.button:visited, a.button-secondary, a.button-secondary:visited {
    text-align: center;
}
.button, .button-secondary {
    height: 34px;
    line-height: 34px;
    margin-right: 16px;
	font-weight: 400;
    min-width: 54px;
@@ -1455,6 +1574,9 @@ EndColorStr='#4cadcb',GradientType=0);
    background-image: none;
    border-color: #30b7e6;
}
a.button.big.subtitle {
  line-height:18px;
}
.button-secondary:hover, a.button-secondary:hover {
    border-color: #dbdbdb;
    background-color: #f3f3f3;
@@ -1510,12 +1632,20 @@ endColorstr='#ffffff',GradientType=0 ); /* IE6-8 */
  font-size:20px;
  display:inline-block;
}
.button.big span.small {
  font-size:14px;
}
.button-caption {
  margin-top:10px;
  font-size:12px;
  font-style:italic;
}

.button.disabled,
.button.disabled:hover,
.button.disabled:active {
  background:#ebebeb;
  color:#999;
  color:#999 !important;
  border-color:#999;
  cursor:default;
}
@@ -1832,6 +1962,45 @@ form .form-error input[type='text'], form .form-error textarea {
    border-color: #eff2f9;
}
*/

/* SDK TOS styles */

div.sdk-terms {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: inherit;
  font-size: inherit;
  padding: 10px;
  height: 370px;
  width: 738px;
  border: 1px solid #444;
  background: transparent;
  overflow:auto;
  margin:0 0 10px;
}

div.sdk-terms.fullsize {
  padding: 0;
  height: auto;
  width: auto;
  border:none;
}

div.sdk-terms h3,
div.sdk-terms h2 {
  margin:0;
}

div#sdk-terms-form {
  padding:0 0 0 10px;
}

div#sdk-terms-form input {
  display:inline;
  margin:4px 4px 4px 0;
}


/* --------------------------------------------------------------------------
Code Style
*/
@@ -2332,6 +2501,29 @@ div.design-announce p {
  line-height:30px;
}

.expandable {
  height:34px;
  padding-left:20px;
  position:relative;
}
.expandable:before {
  content: '';
  background-image: url(../images/styles/disclosure_down.png);
  background-repeat:no-repeat;
  background-position: -12px -9px;
  width: 20px;
  height: 20px;
  display: inline-block;
  position: absolute;
  top: 0;
  left: 0; }
}
.expandable.expanded:before {
  background-image: url(../images/styles/disclosure_up.png);
}



/* -----------------------------------------------
Dialog box for popup messages 
*/
+118 −56
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ $(document).ready(function() {
  $('.scroll-pane').jScrollPane( {verticalGutter:0} );
  
  // add HRs below all H2s (except for a few other h2 variants)
  $('h2').not('#qv h2').not('#tb h2').not('.sidebox h2').not('#devdoc-nav h2').css({marginBottom:0}).after('<hr/>');
  $('h2').not('#qv h2').not('#tb h2').not('.sidebox h2').not('#devdoc-nav h2').not('h2.norule').css({marginBottom:0}).after('<hr/>');
  
  // set search's onkeyup handler here so we can show suggestions 
  // even while search results are visible
@@ -135,6 +135,7 @@ $(document).ready(function() {

  // select current page in sidenav and set up prev/next links if they exist
  var $selNavLink = $('#nav').find('a[href="' + pagePath + '"]');
  var $selListItem;
  if ($selNavLink.length) {
    $selListItem = $selNavLink.closest('li');

@@ -156,11 +157,9 @@ $(document).ready(function() {
false; // navigate across topic boundaries only in design docs
    if ($prevListItem.length) {
      if ($prevListItem.hasClass('nav-section')) {
        if (crossBoundaries) {
        // jump to last topic of previous section
        $prevLink = $prevListItem.find('a:last');
        }
      } else {
      } else if (!$selListItem.hasClass('nav-section')) {
        // jump to previous topic in this section
        $prevLink = $prevListItem.find('a:eq(0)');
      }
@@ -177,18 +176,8 @@ false; // navigate across topic boundaries only in design docs
      }
    }

    if ($prevLink.length) {
      var prevHref = $prevLink.attr('href');
      if (prevHref == SITE_ROOT + 'index.html') {
        // Don't show Previous when it leads to the homepage
      } else {
        $('.prev-page-link').attr('href', $prevLink.attr('href')).removeClass("hide");
      }
    } 

    // set up next links
    var $nextLink = [];
    var startCourse = false;
    var startClass = false;
    var training = $(".next-class-link").length; // decides whether to provide "next class" link
    var isCrossingBoundary = false;
@@ -206,39 +195,33 @@ false; // navigate across topic boundaries only in design docs
        $('.topic-start-link').text($nextLink.text().toUpperCase());
      }
      
      // Handle some Training specialties
      if ($selListItem.parent().is("#nav") && $(".start-course-link").length) {
        // this means we're at the very top of the TOC hierarchy
        startCourse = true;
      } else if ($(".start-class-link").length) {
        // this means this page has children but is not at the top (it's a class, not a course)
      // If the selected page has a description, then it's a class or article homepage
      if ($selListItem.find('a[description]').length) {
        // this means we're on a class landing page
        startClass = true;
      }
    } else {
      // jump to the next topic in this section (if it exists)
      $nextLink = $selListItem.next('li').find('a:eq(0)');
      if (!$nextLink.length) {
        if (crossBoundaries || training) {
        isCrossingBoundary = true;
        // no more topics in this section, jump to the first topic in the next section
        $nextLink = $selListItem.parents('li:eq(0)').next('li.nav-section').find('a:eq(0)');
          isCrossingBoundary = true;
        if (!$nextLink.length) {  // Go up another layer to look for next page (lesson > class > course)
          $nextLink = $selListItem.parents('li:eq(1)').next('li.nav-section').find('a:eq(0)');
        }
      }
    }
    if ($nextLink.length) {
      if (startCourse || startClass) {
        if (startCourse) {
          $('.start-course-link').attr('href', $nextLink.attr('href')).removeClass("hide");
        } else {

    if (startClass) {
      $('.start-class-link').attr('href', $nextLink.attr('href')).removeClass("hide");
        }

      // if there's no training bar (below the start button), 
      // then we need to add a bottom border to button
      if (!$("#tb").length) {
          $('.start-course-link').css({'border-bottom':'1px solid #DADADA'});
        $('.start-class-link').css({'border-bottom':'1px solid #DADADA'});
      }
      } else if (training && isCrossingBoundary) {
    } else if (isCrossingBoundary && !$('body.design').length) {  // Design always crosses boundaries
      $('.content-footer.next-class').show();
      $('.next-page-link').attr('href','')
                          .removeClass("hide").addClass("disabled")
@@ -250,12 +233,68 @@ false; // navigate across topic boundaries only in design docs
    } else {
      $('.next-page-link').attr('href', $nextLink.attr('href')).removeClass("hide");
    }

    if (!startClass && $prevLink.length) {
      var prevHref = $prevLink.attr('href');
      if (prevHref == SITE_ROOT + 'index.html') {
        // Don't show Previous when it leads to the homepage
      } else {
        $('.prev-page-link').attr('href', $prevLink.attr('href')).removeClass("hide");
      }
    } 

    // If this is a training 'article', there should be no prev/next nav
    // ... if the grandparent is the "nav" ... and it has no child list items...
    if (training && $selListItem.parents('ul').eq(1).is('[id="nav"]') &&
        !$selListItem.find('li').length) {
      $('.next-page-link,.prev-page-link').attr('href','').addClass("disabled")
                          .click(function() { return false; });
    }
    
  }
  
  
  
  // Set up the course landing pages for Training with class names and descriptions
  if ($('body.trainingcourse').length) {
    var $classLinks = $selListItem.find('ul li a').not('#nav .nav-section .nav-section ul a');
    var $classDescriptions = $classLinks.attr('description');
    
    var $olClasses  = $('<ol class="class-list"></ol>');
    var $liClass;
    var $imgIcon;
    var $h2Title;
    var $pSummary;
    var $olLessons;
    var $liLesson;
    $classLinks.each(function(index) {
      $liClass  = $('<li></li>');
      $h2Title  = $('<a class="title" href="'+$(this).attr('href')+'"><h2>' + $(this).html()+'</h2><span></span></a>');
      $pSummary = $('<p class="description">' + $(this).attr('description') + '</p>');
      
      $olLessons  = $('<ol class="lesson-list"></ol>');
      
      $lessons = $(this).closest('li').find('ul li a');
      
      if ($lessons.length) {
        $imgIcon = $('<img src="'+toRoot+'assets/images/resource-tutorial.png" alt=""/>');
        $lessons.each(function(index) {
          $olLessons.append('<li><a href="'+$(this).attr('href')+'">' + $(this).html()+'</a></li>');
        });
      } else {
        $imgIcon = $('<img src="'+toRoot+'assets/images/resource-article.png" alt=""/>');
        $pSummary.addClass('article');
      }

      $liClass.append($h2Title).append($imgIcon).append($pSummary).append($olLessons);
      $olClasses.append($liClass);
    });
    $('.jd-descr').append($olClasses);
  }




  // Set up expand/collapse behavior
  $('#nav li.nav-section .nav-section-header').click(function() {
    var section = $(this).closest('li.nav-section');
@@ -384,11 +423,11 @@ false; // navigate across topic boundaries only in design docs

  // Set up tooltips
  var TOOLTIP_MARGIN = 10;
  $('acronym').each(function() {
  $('acronym,.tooltip-link').each(function() {
    var $target = $(this);
    var $tooltip = $('<div>')
        .addClass('tooltip-box')
        .text($target.attr('title'))
        .append($target.attr('title'))
        .hide()
        .appendTo('body');
    $target.removeAttr('title');
@@ -1052,6 +1091,22 @@ function toggleContent(obj) {
}


/* New version of expandable content */
function toggleExpandable(link,id) {
  if($(id).is(':visible')) {
    $(id).slideUp();
    $(link).removeClass('expanded');
  } else {
    $(id).slideDown();
    $(link).addClass('expanded');
  }
}

function hideExpandable(ids) {
  $(ids).slideUp();
  $(ids).prev('h4').find('a.expandable').removeClass('expanded');
}




@@ -1883,11 +1938,18 @@ function changeApiLevel() {

  if (selectedLevel < minLevel) {
    var thing = ($("#jd-header").html().indexOf("package") != -1) ? "package" : "class";
    $("#naMessage").show().html("<div><p><strong>This " + thing + " is not available with API level " + selectedLevel + ".</strong></p>"
                              + "<p>To use this " + thing + ", you must develop your app using a build target "
                              + "that supports API level " + $("#doc-api-level").attr("class") + " or higher. To read these "
                              + "APIs, change the value of the API level filter above.</p>"
                              + "<p><a href='" +toRoot+ "guide/appendix/api-levels.html'>What is the API level?</a></p></div>");
    $("#naMessage").show().html("<div><p><strong>This " + thing
              + " requires API level " + minLevel + " or higher.</strong></p>"
              + "<p>This document is hidden because your selected API level for the documentation is "
              + selectedLevel + ". You can change the documentation API level with the selector "
              + "above the left navigation.</p>"
              + "<p>For more information about specifying the API level your app requires, "
              + "read <a href='" + toRoot + "training/basics/supporting-devices/platforms.html'"
              + ">Supporting Different Platform Versions</a>.</p>"
              + "<input type='button' value='OK, make this page visible' "
              + "title='Change the API level to " + minLevel + "' "
              + "onclick='$(\"#apiLevelSelector\").val(\"" + minLevel + "\");changeApiLevel();' />"
              + "</div>");
  } else {
    $("#naMessage").hide();
  }
+16 −13
Original line number Diff line number Diff line
@@ -7,7 +7,8 @@
  elif:about ?>about<?cs
  elif:design ?>design<?cs
  elif:distribute ?>distribute<?cs
  /if ?>" itemscope itemtype="http://schema.org/Article">
  /if ?><?cs
  if:page.trainingcourse ?> trainingcourse<?cs /if ?>" itemscope itemtype="http://schema.org/Article">
<a name="top"></a>
<?cs include:"header.cs" ?>

@@ -16,7 +17,7 @@
?>class="col-13" id="doc-col"<?cs else 
?>class="col-12" id="doc-col"<?cs /if ?> >

<?cs if:(design||training||walkthru) ?><?cs # header logic for docs that provide previous/next buttons ?>
<?cs if:(design||training||walkthru) && !page.trainingcourse ?><?cs # header logic for docs that provide previous/next buttons ?>
  <?cs if:header.hide ?>
  <?cs else ?>
  <div class="layout-content-row content-header <?cs if:header.justLinks ?>just-links<?cs /if ?>">
@@ -51,16 +52,8 @@
            ja-lang="開始する"
            es-lang="Empezar"               
            >Get started</a>
        <a href="#" class="start-course-link hide"
            zh-TW-lang="第一堂課"
            zh-CN-lang="第一课"
            ru-lang="Первый урок"
            ko-lang="첫 번째 강의"
            ja-lang="最初のクラス"
            es-lang="Primera clase"               
            >First class</a>
      </div>
    <?cs else ?>
    <?cs elif:!page.trainingcourse ?>
      <div class="paging-links layout-content-col span-4" itemscope itemtype="http://schema.org/SiteNavigationElement">
        <a href="#" class="prev-page-link hide"
            zh-TW-lang="上一堂課"
@@ -101,7 +94,17 @@
        <?cs /if ?>
      </div>
    <?cs else ?>
      <h1 itemprop="name"><?cs var:page.title ?></h1>
      <?cs if:tab1 ?><div id="title-tabs-wrapper"><?cs /if ?>
        <h1 itemprop="name" <?cs if:tab1 ?>class="with-title-tabs"<?cs /if ?>><?cs var:page.title ?></h1><?cs
          if:tab1 ?><ul id="title-tabs">
              <li class="selected"><a href="<?cs var:tab1.link ?>"><?cs var:tab1 ?></a></li>
              <?cs if:tab2 ?>
              <li><a href="<?cs var:tab2.link ?>"><?cs var:tab2 ?></a></li><?cs /if ?>
              <?cs if:tab3 ?>
              <li><a href="<?cs var:tab3.link ?>"><?cs var:tab3 ?></a></li><?cs /if ?>
            </ul>
          <?cs /if ?>
      <?cs if:tab1 ?></div><!-- end tab-wrapper --><?cs /if ?>
    <?cs /if ?>
  <?cs /if ?>
<?cs /if ?><?cs # end if design ?>
@@ -128,7 +131,7 @@
        </div>
        <?cs if:!fullscreen ?>
        <div class="paging-links layout-content-col col-4">
          <?cs if:(design||training||guide||walkthru) && !page.landing && !footer.hide ?>
          <?cs if:(design||training||guide||walkthru) && !page.landing && !page.trainingcourse && !footer.hide ?>
            <a href="#" class="prev-page-link hide"
                zh-TW-lang="上一堂課"
                zh-CN-lang="上一课"
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
  elif:design ?>design<?cs
  elif:distribute ?>distribute<?cs
  /if ?>">
  <div id="doc-api-level" class="<?cs var:class.since ?>" style="display:none"></div>
  <div id="doc-api-level" class="<?cs var:package.since ?>" style="display:none"></div>
  <a name="top"></a>
<?cs include:"header.cs" ?>

Loading