merge in jb-mr1.1-release history after reset to jb-mr1.1-dev
diff --git a/core/build_id.mk b/core/build_id.mk
index 4d24ae2..09f1779 100644
--- a/core/build_id.mk
+++ b/core/build_id.mk
@@ -1,4 +1,3 @@
-
#
# Copyright (C) 2008 The Android Open Source Project
#
@@ -14,9 +13,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+
+#
+# Defines branch-specific values.
+#
+
# BUILD_ID is usually used to specify the branch name
# (like "MAIN") or a branch name and a release candidate
-# (like "CRB01"). It must be a single word, and is
+# (like "TC1-RC5"). It must be a single word, and is
# capitalized by convention.
+#
+BUILD_ID := JB_MR1.1
-export BUILD_ID=JDP60E
+# DISPLAY_BUILD_NUMBER should only be set for development branches,
+# If set, the BUILD_NUMBER (cl) is appended to the BUILD_ID for
+# a more descriptive BUILD_ID_DISPLAY, otherwise BUILD_ID_DISPLAY
+# is the same as BUILD_ID
+DISPLAY_BUILD_NUMBER := true
diff --git a/tools/droiddoc/templates-sdk/assets/css/default.css b/tools/droiddoc/templates-sdk/assets/css/default.css
index 10d0cf6..cd25dc5 100644
--- a/tools/droiddoc/templates-sdk/assets/css/default.css
+++ b/tools/droiddoc/templates-sdk/assets/css/default.css
@@ -271,7 +271,8 @@
line-height: 15px; }
#nav a {
color: #555555;
- text-decoration: none; }
+ text-decoration: none;
+ word-wrap:break-word; }
#nav .nav-section-header {
position: relative;
margin-bottom: 1px;
@@ -332,6 +333,25 @@
background: transparent url(../images/styles/disclosure_up.png) no-repeat scroll 50% 50%;
width: 34px;
height: 34px; }
+ #nav li.expanded li ul.tree-list-children {
+ padding:0;
+ }
+ #nav li.expanded li ul.tree-list-children .tree-list-children {
+ padding:0 0 0 10px;
+ }
+ #nav li span.tree-list-subtitle {
+ display:inline-block;
+ padding:5px 0 0 10px;
+ color:#555;
+ text-transform:uppercase;
+ font-size:12px;
+ }
+ #nav li span.tree-list-subtitle:before {
+ content: '—';
+ }
+ #nav li span.tree-list-subtitle:after {
+ content: '—';
+ }
#nav li ul {
display:none;
overflow: hidden;
@@ -356,11 +376,16 @@
#nav li ul > li:last-child {
padding-bottom:5px;
}
+ #nav li ul.tree-list-children > li:last-child {
+ padding-bottom:0;
+ }
#nav li.expanded ul > li {
background:#efefef;
background: rgba(0, 0, 0, 0.03); }
#nav li.expanded ul > li li {
background:inherit; }
+ #nav li ul.tree-list-children ul {
+ display:block; }
.new,
.new-child {
@@ -1529,6 +1554,7 @@
cursor: pointer;
}
.button, a.button {
+ display:inline-block;
background-color: #09c;
background-image: -webkit-gradient(linear, left top, left bottom, from(#2faddb), to(#09c));
background-image: -webkit-linear-gradient(top, #2faddb, #09c);
@@ -2392,6 +2418,9 @@
list-style:none;
margin-left:0;
}
+#tb .nolist {
+ margin-left:15px;
+}
pre.classic {
@@ -3017,6 +3046,15 @@
margin:1.5em 0 .6em;
padding:3px 95px 3px 3px; /* room for api-level */
}
+body.google h4.jd-details-title {
+ background-color: #FFF;
+ padding-top:5px;
+ border-top: 1px solid #ccc;
+}
+body.google table.jd-sumtable th {
+ background-color: #FFF;
+ color:#000;
+}
h4.jd-tagtitle {
margin:0;
@@ -4246,20 +4284,21 @@
}
+
/************ DEVELOP TOPIC CONTAINERS ************/
.landing-banner,
.landing-docs {
margin:20px 0 0;
}
-.landing-banner .col-6:first-child,
-.landing-docs .col-6:first-child,
+.landing-banner div:first-child,
+.landing-docs div:first-child,
.landing-docs .col-12 {
margin-left:0;
min-height:280px;
}
-.landing-banner .col-6:last-child,
-.landing-docs .col-6:last-child,
+.landing-banner div:last-child,
+.landing-docs div:last-child,
.landing-docs .col-12 {
margin-right:0;
}
diff --git a/tools/droiddoc/templates-sdk/assets/js/docs.js b/tools/droiddoc/templates-sdk/assets/js/docs.js
index 376f9b8..59ddb29 100644
--- a/tools/droiddoc/templates-sdk/assets/js/docs.js
+++ b/tools/droiddoc/templates-sdk/assets/js/docs.js
@@ -138,6 +138,7 @@
var $selListItem;
if ($selNavLink.length) {
$selListItem = $selNavLink.closest('li');
+
$selListItem.addClass('selected');
// Traverse up the tree and expand all parent nav-sections
@@ -146,9 +147,6 @@
$(this).children('ul').show();
});
-
- // $selListItem.closest('li.nav-section').closest('li.nav-section').addClass('expanded');
- // $selListItem.closest('li.nav-section').closest('li.nav-section').children('ul').show();
// set up prev links
var $prevLink = [];
@@ -1112,7 +1110,7 @@
-/*
+/*
* Slideshow 1.0
* Used on /index.html and /develop/index.html for carousel
*
@@ -1296,7 +1294,7 @@
})(jQuery);
-/*
+/*
* dacSlideshow 1.0
* Used on develop/index.html for side-sliding tabs
*
@@ -1850,7 +1848,10 @@
/* ######################################################## */
/* Initialize some droiddoc stuff, but only if we're in the reference */
-if (location.pathname.indexOf("/reference") == 0) {
+if ((location.pathname.indexOf("/reference") &&
+ !location.pathname.indexOf("/reference-gms/packages.html") &&
+ !location.pathname.indexOf("/reference-gcm/packages.html") &&
+ !location.pathname.indexOf("/reference/com/google")) == 0) {
$(document).ready(function() {
// init available apis based on user pref
changeApiLevel();
@@ -2066,6 +2067,9 @@
return node;
}
+
+
+
function expand_node(me, node)
{
if (node.children_data && !node.expanded) {
@@ -2143,13 +2147,6 @@
return null;
}
-function load_navtree_data(toroot) {
- var navtreeData = document.createElement("script");
- navtreeData.setAttribute("type","text/javascript");
- navtreeData.setAttribute("src", toroot+"navtree_data.js");
- $("head").append($(navtreeData));
-}
-
function init_default_navtree(toroot) {
init_navtree("tree-list", toroot, NAVTREE_DATA);
@@ -2191,6 +2188,106 @@
}
}
+/* TODO: eliminate redundancy with non-google functions */
+function init_google_navtree(navtree_id, toroot, root_nodes)
+{
+ var me = new Object();
+ me.toroot = toroot;
+ me.node = new Object();
+
+ me.node.li = document.getElementById(navtree_id);
+ me.node.children_data = root_nodes;
+ me.node.children = new Array();
+ me.node.children_ul = document.createElement("ul");
+ me.node.get_children_ul = function() { return me.node.children_ul; };
+ //me.node.children_ul.className = "children_ul";
+ me.node.li.appendChild(me.node.children_ul);
+ me.node.depth = 0;
+
+ get_google_node(me, me.node);
+
+}
+
+function new_google_node(me, mom, text, link, children_data, api_level)
+{
+ var node = new Object();
+ var child;
+ node.children = Array();
+ node.children_data = children_data;
+ node.depth = mom.depth + 1;
+ node.get_children_ul = function() {
+ if (!node.children_ul) {
+ node.children_ul = document.createElement("ul");
+ node.children_ul.className = "tree-list-children";
+ node.li.appendChild(node.children_ul);
+ }
+ return node.children_ul;
+ };
+ node.li = document.createElement("li");
+
+ mom.get_children_ul().appendChild(node.li);
+
+
+ if(link) {
+ child = document.createElement("a");
+
+ }
+ else {
+ child = document.createElement("span");
+ child.className = "tree-list-subtitle";
+
+ }
+ if (children_data != null) {
+ node.li.className="nav-section";
+ node.label_div = document.createElement("div");
+ node.label_div.className = "nav-section-header-ref";
+ node.li.appendChild(node.label_div);
+ get_google_node(me, node);
+ node.label_div.appendChild(child);
+ }
+ else {
+ node.li.appendChild(child);
+ }
+ if(link) {
+ child.href = me.toroot + link;
+ }
+ node.label = document.createTextNode(text);
+ child.appendChild(node.label);
+
+ node.children_ul = null;
+
+ return node;
+}
+
+function get_google_node(me, mom)
+{
+ mom.children_visited = true;
+ var linkText;
+ for (var i in mom.children_data) {
+ var node_data = mom.children_data[i];
+ linkText = node_data[0];
+
+ if(linkText.match("^"+"com.google.android")=="com.google.android"){
+ linkText = linkText.substr(19, linkText.length);
+ }
+ mom.children[i] = new_google_node(me, mom, linkText, node_data[1],
+ node_data[2], node_data[3]);
+ }
+}
+function showGoogleRefTree() {
+ init_default_google_navtree(toRoot);
+ init_default_gcm_navtree(toRoot);
+ resizeNav();
+}
+
+function init_default_google_navtree(toroot) {
+ init_google_navtree("gms-tree-list", toroot, GMS_NAVTREE_DATA);
+}
+
+function init_default_gcm_navtree(toroot) {
+ init_google_navtree("gcm-tree-list", toroot, GCM_NAVTREE_DATA);
+}
+
/* TOGGLE INHERITED MEMBERS */
/* Toggle an inherited class (arrow toggle)
@@ -2284,6 +2381,3 @@
ensureAllInheritedExpanded();
}
});
-
-
-
diff --git a/tools/droiddoc/templates-sdk/components/masthead.cs b/tools/droiddoc/templates-sdk/components/masthead.cs
index d4697e3..1c10768 100644
--- a/tools/droiddoc/templates-sdk/components/masthead.cs
+++ b/tools/droiddoc/templates-sdk/components/masthead.cs
@@ -216,7 +216,7 @@
es-lang="Guías de la API"
>API Guides</a></li>
<li><a href="<?cs var:toroot ?>reference/packages.html" <?cs
- if:reference ?>class="selected"<?cs /if ?>
+ if:reference && !(reference.gcm || reference.gms) ?>class="selected"<?cs /if ?>
zh-TW-lang="參考資源"
zh-CN-lang="参考"
ru-lang="Справочник"
@@ -234,7 +234,7 @@
es-lang="Herramientas"
>Tools</a></li>
<li><a href="<?cs var:toroot ?>google/index.html" <?cs
- if:google ?>class="selected"<?cs /if ?>
+ if:google || reference.gcm || reference.gms?>class="selected"<?cs /if ?>
>Google Services</a>
</li>
</ul>
diff --git a/tools/droiddoc/templates-sdk/customizations.cs b/tools/droiddoc/templates-sdk/customizations.cs
index eac4a2b..a45e4ba 100644
--- a/tools/droiddoc/templates-sdk/customizations.cs
+++ b/tools/droiddoc/templates-sdk/customizations.cs
@@ -146,6 +146,10 @@
</div>
+ <script type="text/javascript">
+ showGoogleRefTree();
+
+ </script>
</div> <!-- end side-nav -->
<script>
$(document).ready(function() {
@@ -192,12 +196,18 @@
scrollIntoView("devdoc-nav");
});
</script>
+:
+
<?cs /def ?>
<?cs # The default side navigation for the reference docs ?><?cs
def:default_left_nav() ?>
+<?cs if:reference.gcm || reference.gms ?>
+ <?cs call:google_nav() ?>
+<?cs else ?>
<div class="wrap clearfix" id="body-content">
<div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
<div id="devdoc-nav">
+
<a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
<div id="api-nav-header">
<div id="api-level-toggle">
@@ -293,7 +303,9 @@
scrollIntoView("packages-nav");
scrollIntoView("classes-nav");
});
- </script><?cs
+ </script>
+<?cs /if ?>
+ <?cs
/def ?>
<?cs
@@ -317,7 +329,7 @@
elif:about ?><?cs
call:about_nav() ?><?cs
else ?><?cs
- call:default_left_nav() ?><?cs
+ call:default_left_nav() ?> <?cs
/if ?>
<script>
$(document).ready(function() {
@@ -353,7 +365,9 @@
/def ?>
<?cs # appears on the right side of the blue bar at the bottom off every page ?><?cs
-def:custom_buildinfo() ?>
- Android <?cs var:sdk.version ?> r<?cs var:sdk.rel.id ?> - <?cs var:page.now ?>
+def:custom_buildinfo() ?><?cs
+ if:!google ?>
+ Android <?cs var:sdk.version ?> r<?cs var:sdk.rel.id ?> — <?cs
+ /if ?><?cs var:page.now ?>
<?cs /def ?>
diff --git a/tools/droiddoc/templates-sdk/docpage.cs b/tools/droiddoc/templates-sdk/docpage.cs
index 3feb00f..0e7c247 100644
--- a/tools/droiddoc/templates-sdk/docpage.cs
+++ b/tools/droiddoc/templates-sdk/docpage.cs
@@ -2,7 +2,7 @@
<?cs include:"macros.cs" ?>
<html>
<?cs include:"head_tag.cs" ?>
-<body class="gc-documentation
+<body class="gc-documentation <?cs if:(google || reference.gms || reference.gcm) ?>google<?cs /if ?>
<?cs if:(guide||develop||training||reference||tools||sdk) ?>develop<?cs if:guide ?> guide<?cs /if ?><?cs
elif:about ?>about<?cs
elif:design ?>design<?cs
@@ -17,7 +17,7 @@
?>class="col-13" id="doc-col"<?cs else
?>class="col-12" id="doc-col"<?cs /if ?> >
-<?cs if:(design||training||walkthru) && !page.trainingcourse ?><?cs # header logic for docs that provide previous/next buttons ?>
+<?cs if:(design||training||walkthru) && !page.trainingcourse && !page.article ?><?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 ?>">
@@ -154,7 +154,7 @@
</div>
<?cs # for training classes, provide a different kind of link when the next page is a different class ?>
- <?cs if:training ?>
+ <?cs if:training && !page.article ?>
<div class="layout-content-row content-footer next-class" style="display:none" itemscope itemtype="http://schema.org/SiteNavigationElement">
<a href="#" class="next-class-link hide">Next class: </a>
</div>
diff --git a/tools/droiddoc/templates-sdk/gcm_navtree_data.cs b/tools/droiddoc/templates-sdk/gcm_navtree_data.cs
new file mode 100644
index 0000000..6f33d88
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/gcm_navtree_data.cs
@@ -0,0 +1,3 @@
+var GCM_NAVTREE_DATA =
+<?cs var:reference_tree ?>
+;
diff --git a/tools/droiddoc/templates-sdk/gms_navtree_data.cs b/tools/droiddoc/templates-sdk/gms_navtree_data.cs
new file mode 100644
index 0000000..66b7d55
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/gms_navtree_data.cs
@@ -0,0 +1,3 @@
+var GMS_NAVTREE_DATA =
+<?cs var:reference_tree ?>
+;
diff --git a/tools/droiddoc/templates-sdk/head_tag.cs b/tools/droiddoc/templates-sdk/head_tag.cs
index dc31877..4bc5d0f 100644
--- a/tools/droiddoc/templates-sdk/head_tag.cs
+++ b/tools/droiddoc/templates-sdk/head_tag.cs
@@ -14,7 +14,7 @@
href="<?cs if:android.whichdoc != 'online' ?>http:<?cs /if ?>//fonts.googleapis.com/css?family=Roboto:regular,medium,thin,italic,mediumitalic,bold" title="roboto">
<link href="<?cs var:toroot ?>assets/css/default.css" rel="stylesheet" type="text/css">
-<?cs if:reference ?>
+<?cs if:reference && !(reference.gms || reference.gcm) ?>
<!-- FULLSCREEN STYLESHEET -->
<link href="<?cs var:toroot ?>assets/css/fullscreen.css" rel="stylesheet" class="fullscreen"
type="text/css">
@@ -27,6 +27,10 @@
var toRoot = "<?cs var:toroot ?>";
</script>
<script src="<?cs var:toroot ?>assets/js/docs.js" type="text/javascript"></script>
+<?cs if:reference.gms || reference.gcm || google?>
+<script src="<?cs var:toroot ?>gms_navtree_data.js" type="text/javascript"></script>
+<script src="<?cs var:toroot ?>gcm_navtree_data.js" type="text/javascript"></script>
+<?cs else ?>
<script src="<?cs var:toroot ?>navtree_data.js" type="text/javascript"></script>
-
+<?cs /if ?>
</head>
\ No newline at end of file
diff --git a/tools/droiddoc/templates-sdk/navtree_data.cs b/tools/droiddoc/templates-sdk/navtree_data.cs
new file mode 100644
index 0000000..73aa199
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/navtree_data.cs
@@ -0,0 +1,3 @@
+var NAVTREE_DATA =
+<?cs var:reference_tree ?>
+;