diff options
| -rw-r--r-- | Android.mk | 3 | ||||
| -rw-r--r-- | core/java/android/net/DhcpStateMachine.java | 25 | ||||
| -rw-r--r-- | docs/html/resources/resources-data.js | 10 | ||||
| -rw-r--r-- | docs/html/resources/samples/images/randommusicplayer.png | bin | 0 -> 18502 bytes |
4 files changed, 20 insertions, 18 deletions
diff --git a/Android.mk b/Android.mk index 5ddc894a363e..810c0600c3ec 100644 --- a/Android.mk +++ b/Android.mk @@ -372,6 +372,7 @@ framework_docs_LOCAL_DROIDDOC_OPTIONS := \ -since ./frameworks/base/api/10.xml 10 \ -since ./frameworks/base/api/11.xml 11 \ -since ./frameworks/base/api/12.xml 12 \ + -since ./frameworks/base/api/13.xml 13 \ -werror -hide 113 \ -overview $(LOCAL_PATH)/core/java/overview.html @@ -422,6 +423,8 @@ web_docs_sample_code_flags := \ resources/samples/NotePad "Note Pad" \ -samplecode $(sample_dir)/SampleSyncAdapter \ resources/samples/SampleSyncAdapter "Sample Sync Adapter" \ + -samplecode $(sample_dir)/RandomMusicPlayer \ + resources/samples/RandomMusicPlayer "Random Music Player" \ -samplecode $(sample_dir)/RenderScript \ resources/samples/RenderScript "RenderScript" \ -samplecode $(sample_dir)/SearchableDictionary \ diff --git a/core/java/android/net/DhcpStateMachine.java b/core/java/android/net/DhcpStateMachine.java index c49c019b50f9..eaf087f43ab8 100644 --- a/core/java/android/net/DhcpStateMachine.java +++ b/core/java/android/net/DhcpStateMachine.java @@ -66,9 +66,6 @@ public class DhcpStateMachine extends StateMachine { private static final int DHCP_RENEW = 0; private static final String ACTION_DHCP_RENEW = "android.net.wifi.DHCP_RENEW"; - //Used for sanity check on setting up renewal - private static final int MIN_RENEWAL_TIME_SECS = 5 * 60; // 5 minutes - private enum DhcpAction { START, RENEW @@ -334,21 +331,13 @@ public class DhcpStateMachine extends StateMachine { if (success) { Log.d(TAG, "DHCP succeeded on " + mInterfaceName); - long leaseDuration = dhcpInfoInternal.leaseDuration; //int to long conversion - - //Sanity check for renewal - //TODO: would be good to notify the user that his network configuration is - //bad and that the device cannot renew below MIN_RENEWAL_TIME_SECS - if (leaseDuration < MIN_RENEWAL_TIME_SECS) { - leaseDuration = MIN_RENEWAL_TIME_SECS; - } - //Do it a bit earlier than half the lease duration time - //to beat the native DHCP client and avoid extra packets - //48% for one hour lease time = 29 minutes - mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, - SystemClock.elapsedRealtime() + - leaseDuration * 480, //in milliseconds - mDhcpRenewalIntent); + //Do it a bit earlier than half the lease duration time + //to beat the native DHCP client and avoid extra packets + //48% for one hour lease time = 29 minutes + mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, + SystemClock.elapsedRealtime() + + dhcpInfoInternal.leaseDuration * 480, //in milliseconds + mDhcpRenewalIntent); mController.obtainMessage(CMD_POST_DHCP_ACTION, DHCP_SUCCESS, 0, dhcpInfoInternal) .sendToTarget(); diff --git a/docs/html/resources/resources-data.js b/docs/html/resources/resources-data.js index 683b062e70b9..05dcf5554e2a 100644 --- a/docs/html/resources/resources-data.js +++ b/docs/html/resources/resources-data.js @@ -547,6 +547,16 @@ var ANDROID_RESOURCES = [ } }, { + tags: ['sample', 'new', 'media' ], + path: 'samples/RandomMusicPlayer/index.html', + title: { + en: 'Random Music Player' + }, + description: { + en: 'Demonstrates how to write a multimedia application that plays music from the device and from URLs. It manages media playback from a service and can play music in the background, respecting audio focus changes.' + } + }, + { tags: ['sample', 'new', 'newfeature', 'performance', 'gamedev', 'gl'], path: 'samples/RenderScript/index.html', title: { diff --git a/docs/html/resources/samples/images/randommusicplayer.png b/docs/html/resources/samples/images/randommusicplayer.png Binary files differnew file mode 100644 index 000000000000..e16e0677da00 --- /dev/null +++ b/docs/html/resources/samples/images/randommusicplayer.png |