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

Commit b5960898 authored by Andrew Solovay's avatar Andrew Solovay Committed by Android Git Automerger
Browse files

am 9562863c: doc: Updated branding guidelines per request from @deniseamling.

* commit '9562863c':
  doc: Updated branding guidelines per request from @deniseamling.
  Noted that OnSharedPreferenceChangeListener does not store a strong reference to the listener.
parents a3c773e8 9562863c
Loading
Loading
Loading
Loading
+8 −1
Original line number Original line Diff line number Diff line
@@ -356,6 +356,13 @@ public interface SharedPreferences {
    /**
    /**
     * Registers a callback to be invoked when a change happens to a preference.
     * Registers a callback to be invoked when a change happens to a preference.
     *
     *
     * <p class="caution"><strong>Caution:</strong> The preference manager does
     * not currently store a strong reference to the listener. You must store a
     * strong reference to the listener, or it will be susceptible to garbage
     * collection. We recommend you keep a reference to the listener in the
     * instance data of an object that will exist as long as you need the
     * listener.</p>
     *
     * @param listener The callback that will run.
     * @param listener The callback that will run.
     * @see #unregisterOnSharedPreferenceChangeListener
     * @see #unregisterOnSharedPreferenceChangeListener
     */
     */
+36 −40
Original line number Original line Diff line number Diff line
@@ -9,6 +9,11 @@ page.tags="brand, bugdroid, assets"
promotional materials. You can use the icons and other assets on this page
promotional materials. You can use the icons and other assets on this page
provided that you follow the guidelines.</p>
provided that you follow the guidelines.</p>


<p>Use of the Android or Google Play brands must be reviewed by the Android
Partner Marketing team.  Use the <a
href="https://docs.google.com/forms/d/1YE5gZpAAcFKjYcUddCsK1Bv9a9Y-luaLVnkazVlaJ2w/viewform">Android and Google Play Brand Permissions Inquiry form</a> to submit your
marketing for review.</p>

<h2 id="brand-android">Android</h2>
<h2 id="brand-android">Android</h2>


 <p>The following are guidelines for the Android brand
 <p>The following are guidelines for the Android brand
@@ -29,10 +34,12 @@ provided that you follow the guidelines.</p>
        <li><span style="color:red">Incorrect</span>: "Android MediaPlayer"</li>
        <li><span style="color:red">Incorrect</span>: "Android MediaPlayer"</li>
        <li><span style="color:green">Correct</span>: "MediaPlayer for Android"</li>
        <li><span style="color:green">Correct</span>: "MediaPlayer for Android"</li>
      </ul>
      </ul>
      <p>If used with your logo, "for Android" needs to be smaller in size than your logo.
      <p>If used with your logo, "for Android" should be no larger than 90% of your logo’s size.
      First instance of this use should be followed by a TM symbol, "for Android&trade;".</p>
      First instance of this use should be followed by a TM symbol, "for Android&trade;".</p>
    </li>
    </li>
    <li>Android may be used as a descriptor, as long as it is followed by a proper generic term.
    <li>Android may be used as a descriptor, as long as it is followed by a
        proper generic term. (Think of "Android" as a term used in place of
        "the Android platform.")
      <ul>
      <ul>
        <li><span style="color:red">Incorrect</span>: "Android MediaPlayer" or "Android XYZ app"</li>
        <li><span style="color:red">Incorrect</span>: "Android MediaPlayer" or "Android XYZ app"</li>
        <li><span style="color:green">Correct</span>: "Android features" or "Android applications"</li>
        <li><span style="color:green">Correct</span>: "Android features" or "Android applications"</li>
@@ -62,14 +69,14 @@ provided that you follow the guidelines.</p>


    <p>When using the Android Robot or any modification of it, proper attribution is
    <p>When using the Android Robot or any modification of it, proper attribution is
    required under the terms of the <a href="http://creativecommons.org/licenses/by/3.0/">Creative
    required under the terms of the <a href="http://creativecommons.org/licenses/by/3.0/">Creative
Commons Attribution</a> license:</p>
    Commons Attribution 3.0</a> license:</p>
   
   
    <blockquote><em>The Android robot is reproduced or modified from work created and shared by Google and
    <blockquote><em>The Android robot is reproduced or modified from work created and shared by Google and
used according to terms described in the Creative Commons 3.0 Attribution License.</em></blockquote>
used according to terms described in the Creative Commons 3.0 Attribution License.</em></blockquote>
    
    
    <p>You may not file trademark applications incorporating the Android robot logo or
    <p>You may not file trademark applications incorporating the Android robot
derivatives thereof. We want to ensure that the Android robot remains available
    logo or derivatives thereof within your company logo or business name. We
for all to use.</p>
    want to ensure that the Android robot remains available for all to use.</p>




<h4 style="clear:right">Android logo</h4>
<h4 style="clear:right">Android logo</h4>
@@ -78,11 +85,9 @@ for all to use.</p>
  <img alt="" src="{@docRoot}images/brand/android_logo_no.png">
  <img alt="" src="{@docRoot}images/brand/android_logo_no.png">
</div>
</div>


<p>The Android logo may not be used. Nor can this be used with the Android robot.</p>
<p>The Android logo may not be used.</p>
<p>The custom typeface may not be used.</p>




<p>The custom typeface may not be used.</p>


<h2 id="brand-google_play">Google Play</h2>
<h2 id="brand-google_play">Google Play</h2>


@@ -98,7 +103,7 @@ in text.</p>
<p>When referring to the mobile experience, use "Google Play" unless the text is clearly
<p>When referring to the mobile experience, use "Google Play" unless the text is clearly
instructional for the user. For example, a marketing headline might read "Download our
instructional for the user. For example, a marketing headline might read "Download our
games on Google Play&trade;," but instructional text would read "Download our games using the Google
games on Google Play&trade;," but instructional text would read "Download our games using the Google
Play&trade; Store app."
Play&trade; store app."


 <p>Any use of the Google Play name or icon needs to include this
 <p>Any use of the Google Play name or icon needs to include this
    attribution in your communication:</p>
    attribution in your communication:</p>
@@ -111,16 +116,16 @@ Play&trade; Store app."
    <p style="text-align:center">
    <p style="text-align:center">
       <a href="{@docRoot}images/brand/Google_Play_Store_48.png">48x48</a> |
       <a href="{@docRoot}images/brand/Google_Play_Store_48.png">48x48</a> |
       <a href="{@docRoot}images/brand/Google_Play_Store_96.png">96x96</a><br>
       <a href="{@docRoot}images/brand/Google_Play_Store_96.png">96x96</a><br>
       <a href="{@docRoot}downloads/brand/Google_Play_Store.ai">Illustrator (.ai)</a>
       <a href="{@docRoot}images/brand/Google_Play_Store_600.png">600x576</a>
       </p>
       </p>
  </div>
  </div>
  
  
<h4>Google Play Store icon</h4>
<h4>Google Play store icon</h4>


<p>You may use the Google Play Store icon, but you may not modify it.</p>
<p>You may use the Google Play store icon, but you may not modify it.</p>


<p>As mentioned above, when referring to the Google Play Store app in copy, use the full name:
<p>As mentioned above, when referring to the Google Play store app in copy, use the full name:
"Google Play Store." However, when labeling the Google Play Store icon directly, it's OK to use
"Google Play store." However, when labeling the Google Play store icon directly, it's OK to use
"Play Store" alone to accurately reflect the icon label as it appears on a device.</p>
"Play Store" alone to accurately reflect the icon label as it appears on a device.</p>


        
        
@@ -140,9 +145,14 @@ Play&trade; Store app."
       <a href="{@docRoot}images/brand/en_generic_rgb_wo_60.png">172x60</a></p>
       <a href="{@docRoot}images/brand/en_generic_rgb_wo_60.png">172x60</a></p>
  </div>
  </div>
         
         
  <p>The "Get it on Google Play" and "Android App on Google Play" logos are badges that you
  <p>The "Get it on Google Play" and "Android App on Google Play" logos are
    can use on your website and promotional materials, to point to your products on Google
    badges that you can use on your website and promotional materials, to point
    Play.</p>
    to your products on Google Play. Additional Google Play badge formats and
    badges for music, books, magazines, movies, and TV shows are also available.
    Use the  <a
    href="https://docs.google.com/forms/d/1YE5gZpAAcFKjYcUddCsK1Bv9a9Y-luaLVnkazVlaJ2w/viewform">Android
    and Google Play Brand Permissions Inquiry form</a> to request
    those badges.</p>


  <ul>
  <ul>
    <li>Don't modify the color, proportions, spacing, or any other aspect of the badge image.
    <li>Don't modify the color, proportions, spacing, or any other aspect of the badge image.
@@ -163,7 +173,7 @@ Play&trade; Store app."
  
  
  <p>To quickly create a badge that links to your apps on Google Play,
  <p>To quickly create a badge that links to your apps on Google Play,
  use the <a
  use the <a
  href="{@docRoot}distribute/tools/promote/badges.html">Googe Play badge generator</a>
  href="{@docRoot}distribute/tools/promote/badges.html">Google Play badge generator</a>
  (provides the badge in over 40 languages).</p>
  (provides the badge in over 40 languages).</p>
  
  
  <p>To create your own size, download an Adobe&reg; Illustrator&reg; (.ai) file for the
  <p>To create your own size, download an Adobe&reg; Illustrator&reg; (.ai) file for the
@@ -171,25 +181,11 @@ Play&trade; Store app."
  badge in over 40 languages</a>.</p>
  badge in over 40 languages</a>.</p>
    
    
  <p>For details on all the ways that you can link to your product details page in Google Play, 
  <p>For details on all the ways that you can link to your product details page in Google Play, 
    see <a href="{@docRoot}distribute/tools/promote/linking.html">Linking to your products</a></p>
    see <a href="{@docRoot}distribute/tools/promote/linking.html">Linking to your products</a>.</p>



<h2 id="Marketing_Review">Marketing Reviews and Brand Inquiries</h2>


<h2 id="Questions">Questions</h2>
<p>Use the <a

href="https://docs.google.com/forms/d/1YE5gZpAAcFKjYcUddCsK1Bv9a9Y-luaLVnkazVlaJ2w/viewform">Android
<p>To view our full guidelines or for any further brand usage questions, please contact our
and Google Play Brand Permissions Inquiry form</a> to submit any marketing
Android Partner Marketing team:</p>
reviews or brand inquires. Typical response time is at least one week.</p>
<ul>
  <li>For North and South America, please contact <a
  href="mailto:android-brand-approvals@google.com?Subject=Brand%20Approval%20Questions"
  >android-brand-approvals@google.com</a></li>

  <li>For Europe and Emerging Markets, please contact <a
  href="mailto:emea-android-brand@google.com?Subject=Brand%20Approval%20Questions"
  >emea-android-brand@google.com</a></li>

  <li>For Asia and Pacific-America, please contact <a
  href="mailto:apac-android-brand-approvals@google.com?Subject=Brand%20Approval%20Questions"
  >apac-android-brand-approvals@google.com</a></li>
</ul>
+39 −3
Original line number Original line Diff line number Diff line
@@ -820,7 +820,8 @@ public class SettingsActivity extends PreferenceActivity
    public static final String KEY_PREF_SYNC_CONN = "pref_syncConnectionType";
    public static final String KEY_PREF_SYNC_CONN = "pref_syncConnectionType";
    ...
    ...


    public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
    public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
        String key) {
        if (key.equals(KEY_PREF_SYNC_CONN)) {
        if (key.equals(KEY_PREF_SYNC_CONN)) {
            Preference connectionPref = findPreference(key);
            Preference connectionPref = findPreference(key);
            // Set summary to be the user-description for the selected value
            // Set summary to be the user-description for the selected value
@@ -863,7 +864,40 @@ protected void onPause() {
}
}
</pre>
</pre>


<p class="caution"><strong>Caution:</strong> When you call {@link
android.content.SharedPreferences#registerOnSharedPreferenceChangeListener
registerOnSharedPreferenceChangeListener()}, the preference manager does not
currently store a strong reference to the listener. You must store a strong
reference to the listener, or it will be susceptible to garbage collection. We
recommend you keep a reference to the listener in the instance data of an object
that will exist as long as you need the listener.</p>

<p>For example, in the following code, the caller does not keep a reference to
the listener. As a result, the listener will be subject to garbage collection,
and it will fail at some indeterminate time in the future:</p>

<pre>
prefs.registerOnSharedPreferenceChangeListener(
  // Bad! The listener is subject to garbage collection!
  new SharedPreferences.OnSharedPreferenceChangeListener() {
  public void onSharedPreferenceChanged(SharedPreferences prefs, String key) {
    // listener implementation
  }
});
</pre>


<p>Instead, store a reference to the listener in an instance data field of an
object that will exist as long as the listener is needed:</p>

<pre>
SharedPreferences.OnSharedPreferenceChangeListener listener =
    new SharedPreferences.OnSharedPreferenceChangeListener() {
  public void onSharedPreferenceChanged(SharedPreferences prefs, String key) {
    // listener implementation
  }
};
prefs.registerOnSharedPreferenceChangeListener(listener);
</pre>


<h2 id="NetworkUsage">Managing Network Usage</h2>
<h2 id="NetworkUsage">Managing Network Usage</h2>


@@ -1142,13 +1176,15 @@ protected Parcelable onSaveInstanceState() {
    final Parcelable superState = super.onSaveInstanceState();
    final Parcelable superState = super.onSaveInstanceState();
    // Check whether this Preference is persistent (continually saved)
    // Check whether this Preference is persistent (continually saved)
    if (isPersistent()) {
    if (isPersistent()) {
        // No need to save instance state since it's persistent, use superclass state
        // No need to save instance state since it's persistent,
        // use superclass state
        return superState;
        return superState;
    }
    }


    // Create instance of custom BaseSavedState
    // Create instance of custom BaseSavedState
    final SavedState myState = new SavedState(superState);
    final SavedState myState = new SavedState(superState);
    // Set the state's value with the class member that holds current setting value
    // Set the state's value with the class member that holds current
    // setting value
    myState.value = mNewValue;
    myState.value = mNewValue;
    return myState;
    return myState;
}
}
+122 KiB
Loading image diff...
−266 KiB

File deleted.

Preview size limit exceeded, changes collapsed.