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

Commit 60a57a8e authored by Adarsh Fernando's avatar Adarsh Fernando Committed by Android (Google) Code Review
Browse files

Merge "Docs: Added links to ACTION_NEW_PICTURE and ACTION_NEW_VIDEO" into mnc-mr-docs

parents f2d49e27 37601565
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -568,7 +568,9 @@ deprecate some of the older patterns that can reduce system performance,
especially on low-memory devices.</p>

<p>In Android N we're removing three commonly-used implicit broadcasts &mdash;
 {@link android.net.ConnectivityManager#CONNECTIVITY_ACTION}, <code>NEW_PICTURE</code>, and <code>NEW_VIDEO</code> &mdash; since those can wake the
 {@link android.net.ConnectivityManager#CONNECTIVITY_ACTION}, {@link
  android.hardware.Camera#ACTION_NEW_PICTURE}, and {@link
  android.hardware.Camera#ACTION_NEW_VIDEO} &mdash; since those can wake the
background processes of multiple apps at once and strain memory and battery. If
your app is receiving these, take advantage of the N Developer Preview to
  migrate to <code>JobScheduler</code> and related APIs instead. </p>
+11 −9
Original line number Diff line number Diff line
@@ -136,10 +136,11 @@ page.image=images/cards/card-n-changes_2x.png
</p>

<p>
  Similarly, apps can register to receive implicit {@code NEW_PICTURE} and
  {@code NEW_VIDEO} broadcasts from other apps, such as Camera. When a user
  takes a picture with the Camera app, these apps wake up to process the
  broadcast.
  Similarly, apps can register to receive implicit {@link
  android.hardware.Camera#ACTION_NEW_PICTURE} and {@link
  android.hardware.Camera#ACTION_NEW_VIDEO} broadcasts from other apps, such as
  Camera. When a user takes a picture with the Camera app, these apps wake up
  to process the broadcast.
</p>

<p>
@@ -152,13 +153,14 @@ page.image=images/cards/card-n-changes_2x.png
  android.net.ConnectivityManager#CONNECTIVITY_ACTION} broadcasts, even if they
  have manifest entries to request notification of these events. Apps running
  in the foreground can still listen for {@code CONNECTIVITY_CHANGE} on their
  main thread if they request notification with a
  {@link android.content.BroadcastReceiver}.
  main thread if they request notification with a {@link
  android.content.BroadcastReceiver}.
  </li>

  <li>Apps cannot send or receive {@code NEW_PICTURE} or {@code NEW_VIDEO}
  broadcasts. This optimization affects all apps, not only those
  targeting Android N.
  <li>Apps cannot send or receive {@link
  android.hardware.Camera#ACTION_NEW_PICTURE} or {@link
  android.hardware.Camera#ACTION_NEW_VIDEO} broadcasts. This optimization
  affects all apps, not only those targeting Android N.
  </li>
</ul>

+7 −5
Original line number Diff line number Diff line
@@ -65,9 +65,10 @@ page.keywords="android N", "implicit broadcasts", "job scheduler"
  android.content.Context#registerReceiver Context.registerReceiver()}.
  </li>

  <li>Apps cannot send or receive {@code NEW_PICTURE} or {@code NEW_VIDEO}
  broadcasts. This optimization affects all apps, not only those targeting the
  Preview.
  <li>Apps cannot send or receive {@link
  android.hardware.Camera#ACTION_NEW_PICTURE} or {@link
  android.hardware.Camera#ACTION_NEW_VIDEO} broadcasts. This optimization
  affects all apps, not only those targeting the Preview.
  </li>
</ul>

@@ -194,8 +195,9 @@ public static void scheduleJob(Context context) {
</h2>

<p>
  In the N Developer Preview, apps are not able to send or receive {@code
  NEW_PICTURE} or {@code NEW_VIDEO} broadcasts. This restriction helps
  In the N Developer Preview, apps are not able to send or receive {@link
  android.hardware.Camera#ACTION_NEW_PICTURE} or {@link
  android.hardware.Camera#ACTION_NEW_VIDEO} broadcasts. This restriction helps
  alleviate the performance and user experience impacts when several apps must
  wake up in order to process a new image or video. The N Developer Preview
  extends {@link android.app.job.JobInfo} and {@link