Skip to content
Browse files

Merge commit 'android-4.2.2_r1' into mr1.1-staging

Conflicts:
	core/java/android/os/Trace.java
	core/java/android/widget/Toast.java
	core/res/res/values-cs/strings.xml
	core/res/res/values-el/strings.xml
	core/res/res/values-iw/strings.xml
	core/res/res/values/config.xml
	core/res/res/values/symbols.xml
	media/java/android/media/AudioService.java
	packages/SystemUI/res/values-sv/strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java
	packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardMessageArea.java
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java
	services/java/com/android/server/NotificationManagerService.java
	services/java/com/android/server/power/ElectronBeam.java

Change-Id: I60b8ddf20a1d7bcf9dc7b1a4ed841aaa4d953294
  • Loading branch information...
2 parents eaa7d18 + 763ef60 commit 4815d6e5a658bb1b301f7724c8e8fff6bc764bba @rmcc rmcc committed Feb 13, 2013
Showing with 128,739 additions and 712 deletions.
  1. +61 −3 Android.mk
  2. +3 −0 CleanSpec.mk
  3. +3 −3 cmds/content/src/com/android/commands/content/Content.java
  4. +15 −0 core/java/android/app/ActionBar.java
  5. +1 −1 core/java/android/app/Activity.java
  6. +29 −0 core/java/android/app/ActivityManagerNative.java
  7. +8 −6 core/java/android/app/ActivityThread.java
  8. +1 −1 core/java/android/app/AlertDialog.java
  9. +2 −2 core/java/android/app/ContextImpl.java
  10. +3 −0 core/java/android/app/IActivityManager.java
  11. +2 −1 core/java/android/app/MediaRouteButton.java
  12. +42 −40 core/java/android/app/Notification.java
  13. +14 −0 core/java/android/app/PendingIntent.java
  14. +1 −1 core/java/android/app/Presentation.java
  15. +3 −0 core/java/android/app/SearchManager.java
  16. +2 −2 core/java/android/app/admin/DeviceAdminInfo.java
  17. +60 −2 core/java/android/appwidget/AppWidgetHost.java
  18. +13 −4 core/java/android/appwidget/AppWidgetHostView.java
  19. +22 −6 core/java/android/appwidget/AppWidgetManager.java
  20. +2 −2 core/java/android/bluetooth/BluetoothAdapter.java
  21. +10 −8 core/java/android/bluetooth/BluetoothSocket.java
  22. +1 −1 core/java/android/content/BroadcastReceiver.java
  23. +2 −1 core/java/android/content/SyncManager.java
  24. +37 −27 core/java/android/content/SyncStorageEngine.java
  25. +1 −0 core/java/android/content/pm/IPackageManager.aidl
  26. +39 −23 core/java/android/content/pm/RegisteredServicesCache.java
  27. +1 −1 core/java/android/hardware/SensorEventListener.java
  28. +9 −0 core/java/android/hardware/display/WifiDisplay.java
  29. +9 −6 core/java/android/inputmethodservice/InputMethodService.java
  30. +2 −0 core/java/android/net/DhcpStateMachine.java
  31. +5 −4 core/java/android/net/NetworkStats.java
  32. +2 −1 core/java/android/net/NetworkTemplate.java
  33. +83 −13 core/java/android/os/BatteryStats.java
  34. +10 −2 core/java/android/os/Bundle.java
  35. +3 −1 core/java/android/os/Environment.java
  36. +1 −1 core/java/android/os/FileObserver.java
  37. +39 −22 core/java/android/os/ParcelFileDescriptor.java
  38. +2 −0 core/java/android/os/PowerManager.java
  39. +4 −6 core/java/android/os/Trace.java
  40. +2 −1 core/java/android/provider/ContactsContract.java
  41. +28 −0 core/java/android/provider/Settings.java
  42. +1 −1 core/java/android/server/search/SearchManagerService.java
  43. +6 −5 core/java/android/service/dreams/DreamService.java
  44. +24 −0 core/java/android/text/format/DateUtils.java
  45. +15 −2 core/java/android/util/DisplayMetrics.java
  46. +10 −0 core/java/android/view/DisplayInfo.java
  47. +8 −12 core/java/android/view/HardwareRenderer.java
  48. +1 −1 core/java/android/view/IWindowManager.aidl
  49. +4 −0 core/java/android/view/ScaleGestureDetector.java
  50. +18 −1 core/java/android/view/Surface.java
  51. +17 −2 core/java/android/view/View.java
  52. +0 −17 core/java/android/view/ViewGroup.java
  53. +1 −1 core/java/android/view/ViewPropertyAnimator.java
  54. +1 −0 core/java/android/view/VolumePanel.java
  55. +7 −0 core/java/android/view/WindowManager.java
  56. +3 −3 core/java/android/webkit/package.html
  57. +9 −0 core/java/android/widget/CompoundButton.java
  58. +117 −19 core/java/android/widget/Editor.java
  59. +1 −1 core/java/android/widget/LinearLayout.java
  60. +1 −1 core/java/android/widget/PopupWindow.java
  61. +42 −6 core/java/android/widget/RelativeLayout.java
  62. +91 −14 core/java/android/widget/RemoteViewsAdapter.java
  63. +36 −8 core/java/android/widget/Scroller.java
  64. +152 −66 core/java/android/widget/TextView.java
  65. +3 −5 core/java/android/widget/Toast.java
  66. +3 −10 core/java/android/widget/VideoView.java
  67. +32 −0 core/java/com/android/internal/annotations/GuardedBy.java
  68. +30 −0 core/java/com/android/internal/annotations/Immutable.java
  69. +50 −0 core/java/com/android/internal/annotations/VisibleForTesting.java
  70. +5 −0 core/java/com/android/internal/app/ActionBarImpl.java
  71. +16 −9 core/java/com/android/internal/app/MediaRouteChooserDialogFragment.java
  72. +7 −3 core/java/com/android/internal/appwidget/IAppWidgetService.aidl
  73. +1 −1 core/java/com/android/internal/content/PackageHelper.java
  74. +2 −1 core/java/com/android/internal/net/NetworkStatsFactory.java
  75. +66 −0 core/java/com/android/internal/util/LocalLog.java
  76. +125 −68 core/java/com/android/internal/widget/ActionBarView.java
  77. +0 −13 core/java/com/android/internal/widget/LockPatternUtils.java
  78. +3 −3 core/jni/android_net_wifi_Wifi.cpp
  79. +49 −0 core/res/AndroidManifest.xml
  80. BIN core/res/res/drawable-hdpi/dialog_bottom_holo_dark.9.png
  81. BIN core/res/res/drawable-hdpi/dialog_bottom_holo_light.9.png
  82. BIN core/res/res/drawable-hdpi/dialog_full_holo_dark.9.png
  83. BIN core/res/res/drawable-hdpi/dialog_full_holo_light.9.png
  84. BIN core/res/res/drawable-hdpi/dialog_middle_holo_dark.9.png
  85. BIN core/res/res/drawable-hdpi/dialog_middle_holo_light.9.png
  86. BIN core/res/res/drawable-hdpi/dialog_top_holo_dark.9.png
  87. BIN core/res/res/drawable-hdpi/dialog_top_holo_light.9.png
  88. BIN core/res/res/drawable-hdpi/ic_coins_l.png
  89. BIN core/res/res/drawable-hdpi/kg_add_widget.png
  90. BIN core/res/res/drawable-hdpi/kg_add_widget_disabled.png
  91. BIN core/res/res/drawable-hdpi/kg_add_widget_pressed.png
  92. BIN core/res/res/drawable-hdpi/menu_dropdown_panel_holo_dark.9.png
  93. BIN core/res/res/drawable-hdpi/menu_dropdown_panel_holo_light.9.png
  94. BIN core/res/res/drawable-hdpi/menu_hardkey_panel_holo_dark.9.png
  95. BIN core/res/res/drawable-hdpi/menu_hardkey_panel_holo_light.9.png
  96. BIN core/res/res/drawable-ldrtl-hdpi/popup_inline_error.9.png
  97. BIN core/res/res/drawable-ldrtl-hdpi/popup_inline_error_above.9.png
  98. BIN core/res/res/drawable-ldrtl-hdpi/popup_inline_error_above_holo_dark.9.png
  99. BIN core/res/res/drawable-ldrtl-hdpi/popup_inline_error_above_holo_light.9.png
  100. BIN core/res/res/drawable-ldrtl-hdpi/popup_inline_error_holo_dark.9.png
  101. BIN core/res/res/drawable-ldrtl-hdpi/popup_inline_error_holo_light.9.png
  102. BIN core/res/res/drawable-ldrtl-ldpi/popup_inline_error.9.png
  103. BIN core/res/res/drawable-ldrtl-ldpi/popup_inline_error_above.9.png
  104. BIN core/res/res/drawable-ldrtl-mdpi/popup_inline_error.9.png
  105. BIN core/res/res/drawable-ldrtl-mdpi/popup_inline_error_above.9.png
  106. BIN core/res/res/drawable-ldrtl-mdpi/popup_inline_error_above_holo_dark.9.png
  107. BIN core/res/res/drawable-ldrtl-mdpi/popup_inline_error_above_holo_light.9.png
  108. BIN core/res/res/drawable-ldrtl-mdpi/popup_inline_error_holo_dark.9.png
  109. BIN core/res/res/drawable-ldrtl-mdpi/popup_inline_error_holo_light.9.png
  110. BIN core/res/res/drawable-ldrtl-xhdpi/popup_inline_error.9.png
  111. BIN core/res/res/drawable-ldrtl-xhdpi/popup_inline_error_above.9.png
  112. BIN core/res/res/drawable-ldrtl-xhdpi/popup_inline_error_above_holo_dark.9.png
  113. BIN core/res/res/drawable-ldrtl-xhdpi/popup_inline_error_above_holo_light.9.png
  114. BIN core/res/res/drawable-ldrtl-xhdpi/popup_inline_error_holo_dark.9.png
  115. BIN core/res/res/drawable-ldrtl-xhdpi/popup_inline_error_holo_light.9.png
  116. BIN core/res/res/drawable-mdpi/dialog_bottom_holo_dark.9.png
  117. BIN core/res/res/drawable-mdpi/dialog_bottom_holo_light.9.png
  118. BIN core/res/res/drawable-mdpi/dialog_full_holo_dark.9.png
  119. BIN core/res/res/drawable-mdpi/dialog_full_holo_light.9.png
  120. BIN core/res/res/drawable-mdpi/dialog_middle_holo_dark.9.png
  121. BIN core/res/res/drawable-mdpi/dialog_middle_holo_light.9.png
  122. BIN core/res/res/drawable-mdpi/dialog_top_holo_dark.9.png
  123. BIN core/res/res/drawable-mdpi/dialog_top_holo_light.9.png
  124. BIN core/res/res/drawable-mdpi/ic_coins_l.png
  125. BIN core/res/res/drawable-mdpi/kg_add_widget.png
  126. BIN core/res/res/drawable-mdpi/kg_add_widget_disabled.png
  127. BIN core/res/res/drawable-mdpi/kg_add_widget_pressed.png
  128. BIN core/res/res/drawable-mdpi/menu_dropdown_panel_holo_dark.9.png
  129. BIN core/res/res/drawable-mdpi/menu_dropdown_panel_holo_light.9.png
  130. BIN core/res/res/drawable-mdpi/menu_hardkey_panel_holo_dark.9.png
  131. BIN core/res/res/drawable-mdpi/menu_hardkey_panel_holo_light.9.png
  132. BIN core/res/res/drawable-xhdpi/dialog_bottom_holo_dark.9.png
  133. BIN core/res/res/drawable-xhdpi/dialog_bottom_holo_light.9.png
  134. BIN core/res/res/drawable-xhdpi/dialog_full_holo_dark.9.png
  135. BIN core/res/res/drawable-xhdpi/dialog_full_holo_light.9.png
  136. BIN core/res/res/drawable-xhdpi/dialog_middle_holo_dark.9.png
  137. BIN core/res/res/drawable-xhdpi/dialog_middle_holo_light.9.png
  138. BIN core/res/res/drawable-xhdpi/dialog_top_holo_dark.9.png
  139. BIN core/res/res/drawable-xhdpi/dialog_top_holo_light.9.png
  140. BIN core/res/res/drawable-xhdpi/ic_coins_l.png
  141. BIN core/res/res/drawable-xhdpi/kg_add_widget.png
  142. BIN core/res/res/drawable-xhdpi/kg_add_widget_disabled.png
  143. BIN core/res/res/drawable-xhdpi/kg_add_widget_pressed.png
  144. BIN core/res/res/drawable-xhdpi/menu_dropdown_panel_holo_dark.9.png
  145. BIN core/res/res/drawable-xhdpi/menu_dropdown_panel_holo_light.9.png
  146. BIN core/res/res/drawable-xhdpi/menu_hardkey_panel_holo_dark.9.png
  147. BIN core/res/res/drawable-xhdpi/menu_hardkey_panel_holo_light.9.png
  148. +21 −0 core/res/res/drawable/keyguard_add_widget_button.xml
  149. +2 −1 core/res/res/layout-xlarge/screen_action_bar.xml
  150. +2 −1 core/res/res/layout-xlarge/screen_action_bar_overlay.xml
  151. +1 −3 core/res/res/layout/action_bar_home.xml
  152. +1 −2 core/res/res/layout/action_bar_title_item.xml
  153. +23 −0 core/res/res/layout/action_bar_up_container.xml
  154. +1 −1 core/res/res/layout/keyguard_add_widget.xml
  155. +1 −0 core/res/res/layout/keyguard_pin_view.xml
  156. +1 −0 core/res/res/layout/keyguard_sim_pin_view.xml
  157. +1 −0 core/res/res/layout/keyguard_sim_puk_view.xml
  158. +4 −2 core/res/res/layout/list_menu_item_layout.xml
  159. +4 −2 core/res/res/layout/media_controller.xml
  160. +0 −2 core/res/res/layout/notification_template_base.xml
  161. +0 −2 core/res/res/layout/notification_template_big_base.xml
  162. +0 −2 core/res/res/layout/notification_template_big_text.xml
  163. +0 −2 core/res/res/layout/notification_template_inbox.xml
  164. +4 −2 core/res/res/layout/popup_menu_item_layout.xml
  165. +2 −1 core/res/res/layout/screen_action_bar.xml
  166. +2 −1 core/res/res/layout/screen_action_bar_overlay.xml
  167. +13 −7 core/res/res/layout/sms_short_code_confirmation_dialog.xml
  168. BIN core/res/res/mipmap-xxhdpi/sym_def_app_icon.png
  169. +13 −1 core/res/res/values-af/strings.xml
  170. +13 −1 core/res/res/values-am/strings.xml
  171. +13 −1 core/res/res/values-ar/strings.xml
  172. +13 −1 core/res/res/values-be/strings.xml
  173. +13 −1 core/res/res/values-bg/strings.xml
  174. +13 −1 core/res/res/values-ca/strings.xml
  175. +22 −14 core/res/res/values-cs/strings.xml
  176. +13 −1 core/res/res/values-da/strings.xml
  177. +36 −24 core/res/res/values-de/strings.xml
  178. +14 −2 core/res/res/values-el/strings.xml
  179. +14 −1 core/res/res/values-en-rGB/strings.xml
  180. +13 −1 core/res/res/values-es-rUS/strings.xml
  181. +13 −1 core/res/res/values-es/strings.xml
  182. +13 −1 core/res/res/values-et/strings.xml
  183. +16 −4 core/res/res/values-fa/strings.xml
  184. +13 −1 core/res/res/values-fi/strings.xml
  185. +13 −1 core/res/res/values-fr/strings.xml
  186. +13 −1 core/res/res/values-hi/strings.xml
  187. +14 −2 core/res/res/values-hr/strings.xml
  188. +13 −1 core/res/res/values-hu/strings.xml
  189. +15 −3 core/res/res/values-in/strings.xml
  190. +13 −1 core/res/res/values-it/strings.xml
  191. +15 −3 core/res/res/values-iw/strings.xml
  192. +13 −1 core/res/res/values-ja/strings.xml
  193. +15 −3 core/res/res/values-ko/strings.xml
  194. +13 −1 core/res/res/values-lt/strings.xml
  195. +13 −1 core/res/res/values-lv/strings.xml
  196. +64 −0 core/res/res/values-mcc286/config.xml
  197. +24 −0 core/res/res/values-mcc450/config.xml
  198. +13 −1 core/res/res/values-ms/strings.xml
  199. +14 −2 core/res/res/values-nb/strings.xml
  200. +13 −1 core/res/res/values-nl/strings.xml
  201. +17 −5 core/res/res/values-pl/strings.xml
  202. +14 −2 core/res/res/values-pt-rPT/strings.xml
  203. +14 −2 core/res/res/values-pt/strings.xml
  204. +8 −1 core/res/res/values-rm/strings.xml
  205. +13 −1 core/res/res/values-ro/strings.xml
  206. +20 −8 core/res/res/values-ru/strings.xml
  207. +13 −1 core/res/res/values-sk/strings.xml
  208. +13 −1 core/res/res/values-sl/strings.xml
  209. +13 −1 core/res/res/values-sr/strings.xml
  210. +22 −10 core/res/res/values-sv/strings.xml
  211. +15 −3 core/res/res/values-sw/strings.xml
  212. +13 −1 core/res/res/values-th/strings.xml
  213. +13 −1 core/res/res/values-tl/strings.xml
  214. +13 −1 core/res/res/values-tr/strings.xml
  215. +13 −1 core/res/res/values-uk/strings.xml
  216. +13 −1 core/res/res/values-vi/strings.xml
  217. +13 −1 core/res/res/values-zh-rCN/strings.xml
  218. +13 −1 core/res/res/values-zh-rTW/strings.xml
  219. +13 −1 core/res/res/values-zu/strings.xml
  220. +0 −6 core/res/res/values/arrays.xml
  221. +4 −4 core/res/res/values/attrs.xml
  222. +5 −5 core/res/res/values/config.xml
  223. +16 −1 core/res/res/values/strings.xml
  224. +4 −0 core/res/res/values/symbols.xml
  225. +15 −57 ...nectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java
  226. +12 −12 ...ManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java
  227. +1 −1 ...onnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiConnectionTest.java
  228. +2 −2 .../tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiStressTest.java
  229. +48 −0 core/tests/coretests/src/android/text/format/DateUtilsTest.java
  230. +1 −0 data/etc/platform.xml
  231. BIN data/fonts/DroidSansThai.ttf
  232. +9 −7 data/fonts/fallback_fonts.xml
  233. +1 −0 data/sounds/AudioPackage10.mk
  234. BIN data/sounds/effects/ogg/LowBattery.ogg
  235. BIN data/sounds/effects/ogg/WirelessChargingStarted.ogg
  236. +2,191 −0 docs/downloads/brand/af_generic_rgb_wo.ai
  237. +2,286 −0 docs/downloads/brand/ar_generic_rgb_wo.ai
  238. +2,201 −0 docs/downloads/brand/be_generic_rgb_wo.ai
  239. +2,249 −0 docs/downloads/brand/bg_generic_rgb_wo.ai
  240. +2,211 −0 docs/downloads/brand/ca_generic_rgb_wo.ai
  241. +2,236 −0 docs/downloads/brand/cs_generic_rgb_wo.ai
  242. +2,280 −0 docs/downloads/brand/da_generic_rgb_wo.ai
  243. +1,985 −0 docs/downloads/brand/de_app_rgb_wo.ai
  244. +2,133 −0 docs/downloads/brand/de_generic_rgb_wo.ai
  245. +2,336 −0 docs/downloads/brand/el_generic_rgb_wo.ai
  246. 0 docs/{html/images → downloads}/brand/en_app_rgb_wo.ai
  247. 0 docs/{html/images → downloads}/brand/en_generic_rgb_wo.ai
  248. +1,790 −0 docs/downloads/brand/es-419_app_rgb_wo.ai
  249. +2,142 −0 docs/downloads/brand/es-419_generic_rgb_wo.ai
  250. +1,888 −0 docs/downloads/brand/es_app_rgb_wo.ai
  251. +2,183 −0 docs/downloads/brand/es_generic_rgb_wo.ai
  252. +2,363 −0 docs/downloads/brand/et_generic_rgb_wo.ai
  253. +2,192 −0 docs/downloads/brand/fa_generic_rgb_wo.ai
  254. +2,317 −0 docs/downloads/brand/fi_generic_rgb_wo.ai
  255. +2,292 −0 docs/downloads/brand/fil_generic_rgb_wo.ai
  256. +1,771 −0 docs/downloads/brand/fr_app_rgb_wo.ai
  257. +2,047 −0 docs/downloads/brand/fr_generic_rgb_wo.ai
  258. +2,110 −0 docs/downloads/brand/hr_generic_rgb_wo.ai
  259. +2,362 −0 docs/downloads/brand/hu_generic_rgb_wo.ai
  260. +2,363 −0 docs/downloads/brand/id-in_generic_rgb_wo.ai
  261. +1,829 −0 docs/downloads/brand/it_app_rgb_wo.ai
  262. +2,119 −0 docs/downloads/brand/it_generic_rgb_wo.ai
  263. +2,329 −0 docs/downloads/brand/iw-he_generic_rgb_wo.ai
  264. +1,852 −0 docs/downloads/brand/ja_app_rgb_wo.ai
  265. +2,241 −0 docs/downloads/brand/ja_generic_rgb_wo.ai
  266. +1,911 −0 docs/downloads/brand/ko_app_rgb_wo.ai
  267. +2,189 −0 docs/downloads/brand/ko_generic_rgb_wo.ai
  268. +2,314 −0 docs/downloads/brand/lt_generic_rgb_wo.ai
  269. +2,359 −0 docs/downloads/brand/lv_generic_rgb_wo.ai
  270. +2,341 −0 docs/downloads/brand/ms_generic_rgb_wo.ai
  271. +2,050 −0 docs/downloads/brand/nl_app_rgb_wo.ai
  272. +2,163 −0 docs/downloads/brand/nl_generic_rgb_wo.ai
  273. +2,288 −0 docs/downloads/brand/no_generic_rgb_wo.ai
  274. +2,323 −0 docs/downloads/brand/pl_generic_rgb_wo.ai
  275. +1,872 −0 docs/downloads/brand/pt-br_app_rgb_wo.ai
  276. +5,305 −0 docs/downloads/brand/pt-br_generic_rgb_wo.ai
  277. +1,868 −0 docs/downloads/brand/pt-pt_app_rgb_wo.ai
  278. +2,175 −0 docs/downloads/brand/pt-pt_generic_rgb_wo.ai
  279. +2,352 −0 docs/downloads/brand/ro_generic_rgb_wo.ai
  280. +2,308 −0 docs/downloads/brand/ru_generic_rgb_wo.ai
  281. +2,290 −0 docs/downloads/brand/sk_generic_rgb_wo.ai
  282. +2,340 −0 docs/downloads/brand/sl_generic_rgb_wo.ai
  283. +2,327 −0 docs/downloads/brand/sr_generic_rgb_wo.ai
  284. +2,275 −0 docs/downloads/brand/sv_generic_rgb_wo.ai
  285. +2,292 −0 docs/downloads/brand/sw_generic_rgb_wo.ai
  286. +2,362 −0 docs/downloads/brand/th_generic_rgb_wo.ai
  287. +2,300 −0 docs/downloads/brand/tr_generic_rgb_wo.ai
  288. +2,347 −0 docs/downloads/brand/uk_generic_rgb_wo.ai
  289. +2,389 −0 docs/downloads/brand/vi_generic_rgb_wo.ai
  290. +2,200 −0 docs/downloads/brand/zh-cn_generic_rgb_wo.ai
  291. +2,371 −0 docs/downloads/brand/zh-hk_generic_rgb_wo.ai
  292. +2,267 −0 docs/downloads/brand/zh-tw_generic_rgb_wo.ai
  293. +2,339 −0 docs/downloads/brand/zu_generic_rgb_wo.ai
  294. BIN docs/downloads/devbytes/BitmapAllocation.zip
  295. BIN docs/downloads/devbytes/BitmapScaling.zip
  296. BIN docs/downloads/devbytes/Bouncer.zip
  297. BIN docs/downloads/devbytes/CrossFading.zip
  298. BIN docs/downloads/devbytes/KeyframeAnimation.zip
  299. BIN docs/downloads/devbytes/LayoutTransChanging.zip
  300. BIN docs/downloads/devbytes/ListViewAnimations.zip
Sorry, we could not display the entire diff because too many files (3,733) changed.
View
64 Android.mk
@@ -218,7 +218,6 @@ LOCAL_SRC_FILES += \
telephony/java/com/android/internal/telephony/ITelephony.aidl \
telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl \
telephony/java/com/android/internal/telephony/IWapPushManager.aidl \
- telephony/java/com/android/internal/telephony/IExtendedNetworkService.aidl \
wifi/java/android/net/wifi/IWifiManager.aidl \
wifi/java/android/net/wifi/p2p/IWifiP2pManager.aidl \
voip/java/android/net/sip/ISipSession.aidl \
@@ -458,7 +457,8 @@ sample_dir := development/samples
# the list here should match the list of samples included in the sdk samples package
# (see development/build/sdk.atree)
-web_docs_sample_code_flags := \
+# remove htmlified samples for now -- samples are still available through the SDK
+# web_docs_sample_code_flags := \
-hdf android.hasSamples 1 \
-samplecode $(sample_dir)/AccelerometerPlay \
resources/samples/AccelerometerPlay "Accelerometer Play" \
@@ -663,7 +663,7 @@ $(static_doc_index_redirect): \
$(full_target): $(static_doc_index_redirect)
$(full_target): $(framework_built)
-# ==== docs for the web (on the google app engine server) =======================
+# ==== docs for the web (on the androiddevdocs app engine server) =======================
include $(CLEAR_VARS)
LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
@@ -692,6 +692,64 @@ include $(BUILD_DROIDDOC)
# explicitly specify that online-sdk depends on framework-res and any generated docs
$(full_target): framework-res-package-target
+# ==== docs for the web (on the devsite app engine server) =======================
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
+LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)
+LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
+LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
+LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
+LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
+LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
+LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
+LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
+# specify a second html input dir and an output path relative to OUT_DIR)
+LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
+
+LOCAL_MODULE := ds
+
+LOCAL_DROIDDOC_OPTIONS:= \
+ $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
+ $(web_docs_sample_code_flags) \
+ -devsite \
+ -toroot / \
+ -hdf android.whichdoc online \
+ -hdf devsite true
+
+LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
+
+include $(BUILD_DROIDDOC)
+
+# explicitly specify that ds depends on framework-res and any generated docs
+$(full_target): framework-res-package-target
+
+
+#==== reference docs for GCM =======================
+
+include $(CLEAR_VARS)
+#
+gcm_docs_src_files += \
+ $(call all-java-files-under, ../../vendor/unbundled_google/libs/gcm/gcm-client/src) \
+ $(call all-java-files-under, ../../vendor/unbundled_google/libs/gcm/gcm-server/src) \
+ $(call all-html-files-under, ../../vendor/unbundled_google/libs/gcm/gcm-client/src) \
+ $(call all-html-files-under, ../../vendor/unbundled_google/libs/gcm/gcm-server/src) \
+
+LOCAL_SRC_FILES := $(gcm_docs_src_files)
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE:= online-gcm-ref
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+LOCAL_IS_HOST_MODULE := false
+
+LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR := build/tools/droiddoc/templates-sdk
+
+LOCAL_DROIDDOC_OPTIONS := \
+ -toroot / \
+ -gcmref \
+ -hdf android.whichdoc online \
+ -hdf template.showLanguageMenu true
+
+include $(BUILD_DROIDDOC)
+
# ==== docs that have all of the stuff that's @hidden =======================
include $(CLEAR_VARS)
View
3 CleanSpec.mk
@@ -137,6 +137,9 @@ $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framew
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/ImageProcessing_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/ImageProcessing2_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/ImageProcessing_intermediates)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/telephony/java/com/android/internal/telephony/IExtendedNetworkService.java)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/telephony/java/com/android/internal/telephony/IExtendedNetworkService.P)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/ImageProcessing_intermediates)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
View
6 cmds/content/src/com/android/commands/content/Content.java
@@ -83,14 +83,14 @@
+ " Example:\n"
+ " # Change \"new_setting\" secure setting to \"newer_value\".\n"
+ " adb shell content update --uri content://settings/secure --bind"
- + " value:s:newer_value --where \"name=\'new_setting\'\"\n"
+ + " value:s:newer_value --where \"name=\\'new_setting\\'\"\n"
+ "\n"
+ "usage: adb shell content delete --uri <URI> [--user <USER_ID>] --bind <BINDING>"
+ " [--bind <BINDING>...] [--where <WHERE>]\n"
+ " Example:\n"
+ " # Remove \"new_setting\" secure setting.\n"
+ " adb shell content delete --uri content://settings/secure "
- + "--where \"name=\'new_setting\'\"\n"
+ + "--where \"name=\\'new_setting\\'\"\n"
+ "\n"
+ "usage: adb shell content query --uri <URI> [--user <USER_ID>]"
+ " [--projection <PROJECTION>] [--where <WHERE>] [--sort <SORT_ORDER>]\n"
@@ -101,7 +101,7 @@
+ " # Select \"name\" and \"value\" columns from secure settings where \"name\" is "
+ "equal to \"new_setting\" and sort the result by name in ascending order.\n"
+ " adb shell content query --uri content://settings/secure --projection name:value"
- + " --where \"name=\'new_setting\'\" --sort \"name ASC\"\n"
+ + " --where \"name=\\'new_setting\\'\" --sort \"name ASC\"\n"
+ "\n";
private static class Parser {
View
15 core/java/android/app/ActionBar.java
@@ -132,6 +132,12 @@
public static final int DISPLAY_SHOW_CUSTOM = 0x10;
/**
+ * Allow the title to wrap onto multiple lines if space is available
+ * @hide pending API approval
+ */
+ public static final int DISPLAY_TITLE_MULTIPLE_LINES = 0x20;
+
+ /**
* Set the action bar into custom navigation mode, supplying a view
* for custom navigation.
*
@@ -680,6 +686,15 @@ public void setHomeButtonEnabled(boolean enabled) { }
public Context getThemedContext() { return null; }
/**
+ * Returns true if the Title field has been truncated during layout for lack
+ * of available space.
+ *
+ * @return true if the Title field has been truncated
+ * @hide pending API approval
+ */
+ public boolean isTitleTruncated() { return false; }
+
+ /**
* Listener interface for ActionBar navigation events.
*/
public interface OnNavigationListener {
View
2 core/java/android/app/Activity.java
@@ -2838,7 +2838,7 @@ public void closeOptionsMenu() {
* item has been selected.
* <p>
* It is not safe to hold onto the context menu after this method returns.
- * {@inheritDoc}
+ *
*/
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
}
View
29 core/java/android/app/ActivityManagerNative.java
@@ -1701,6 +1701,21 @@ public boolean onTransact(int code, Parcel data, Parcel reply, int flags)
return true;
}
+ case GET_INTENT_FOR_INTENT_SENDER_TRANSACTION: {
+ data.enforceInterface(IActivityManager.descriptor);
+ IIntentSender r = IIntentSender.Stub.asInterface(
+ data.readStrongBinder());
+ Intent intent = getIntentForIntentSender(r);
+ reply.writeNoException();
+ if (intent != null) {
+ reply.writeInt(1);
+ intent.writeToParcel(reply, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
+ } else {
+ reply.writeInt(0);
+ }
+ return true;
+ }
+
case UPDATE_PERSISTENT_CONFIGURATION_TRANSACTION: {
data.enforceInterface(IActivityManager.descriptor);
Configuration config = Configuration.CREATOR.createFromParcel(data);
@@ -3977,6 +3992,20 @@ public boolean isIntentSenderAnActivity(IIntentSender sender) throws RemoteExcep
return res;
}
+ public Intent getIntentForIntentSender(IIntentSender sender) throws RemoteException {
+ Parcel data = Parcel.obtain();
+ Parcel reply = Parcel.obtain();
+ data.writeInterfaceToken(IActivityManager.descriptor);
+ data.writeStrongBinder(sender.asBinder());
+ mRemote.transact(GET_INTENT_FOR_INTENT_SENDER_TRANSACTION, data, reply, 0);
+ reply.readException();
+ Intent res = reply.readInt() != 0
+ ? Intent.CREATOR.createFromParcel(reply) : null;
+ data.recycle();
+ reply.recycle();
+ return res;
+ }
+
public void updatePersistentConfiguration(Configuration values) throws RemoteException
{
Parcel data = Parcel.obtain();
View
14 core/java/android/app/ActivityThread.java
@@ -4573,12 +4573,14 @@ private void installContentProviders(
new ArrayList<IActivityManager.ContentProviderHolder>();
for (ProviderInfo cpi : providers) {
- StringBuilder buf = new StringBuilder(128);
- buf.append("Pub ");
- buf.append(cpi.authority);
- buf.append(": ");
- buf.append(cpi.name);
- Log.i(TAG, buf.toString());
+ if (DEBUG_PROVIDER) {
+ StringBuilder buf = new StringBuilder(128);
+ buf.append("Pub ");
+ buf.append(cpi.authority);
+ buf.append(": ");
+ buf.append(cpi.name);
+ Log.i(TAG, buf.toString());
+ }
IActivityManager.ContentProviderHolder cph = installProvider(context, null, cpi,
false /*noisy*/, true /*noReleaseNeeded*/, true /*stable*/);
if (cph != null) {
View
2 core/java/android/app/AlertDialog.java
@@ -90,7 +90,7 @@
/**
* Special theme constant for {@link #AlertDialog(Context, int)}: use
- * the device's default alert theme with a dark background.
+ * the device's default alert theme with a light background.
*/
public static final int THEME_DEVICE_DEFAULT_LIGHT = 5;
View
4 core/java/android/app/ContextImpl.java
@@ -181,7 +181,7 @@ public boolean bindService(Intent service, ServiceConnection conn, int flags) {
* context object for Activity and other application components.
*/
class ContextImpl extends Context {
- private final static String TAG = "ApplicationContext";
+ private final static String TAG = "ContextImpl";
private final static boolean DEBUG = false;
private static final HashMap<String, SharedPreferencesImpl> sSharedPrefs =
@@ -1767,7 +1767,7 @@ public void enforceUriPermission(
private void warnIfCallingFromSystemProcess() {
if (Process.myUid() == Process.SYSTEM_UID) {
Slog.w(TAG, "Calling a method in the system process without a qualified user: "
- + Debug.getCallers(3));
+ + Debug.getCallers(5));
}
}
View
3 core/java/android/app/IActivityManager.java
@@ -341,6 +341,8 @@ public void setPackageAskScreenCompat(String packageName, boolean ask)
public boolean isIntentSenderAnActivity(IIntentSender sender) throws RemoteException;
+ public Intent getIntentForIntentSender(IIntentSender sender) throws RemoteException;
+
public void updatePersistentConfiguration(Configuration values) throws RemoteException;
public long[] getProcessPss(int[] pids) throws RemoteException;
@@ -621,4 +623,5 @@ private WaitResult(Parcel source) {
int REQUEST_BUG_REPORT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+157;
int INPUT_DISPATCHING_TIMED_OUT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+158;
int CLEAR_PENDING_BACKUP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+159;
+ int GET_INTENT_FOR_INTENT_SENDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+160;
}
View
3 core/java/android/app/MediaRouteButton.java
@@ -217,7 +217,8 @@ public int getRouteTypes() {
void updateRemoteIndicator() {
final RouteInfo selected = mRouter.getSelectedRoute(mRouteTypes);
final boolean isRemote = selected != mRouter.getSystemAudioRoute();
- final boolean isConnecting = selected.getStatusCode() == RouteInfo.STATUS_CONNECTING;
+ final boolean isConnecting = selected != null &&
+ selected.getStatusCode() == RouteInfo.STATUS_CONNECTING;
boolean needsRefresh = false;
if (mRemoteActive != isRemote) {
View
82 core/java/android/app/Notification.java
@@ -95,25 +95,25 @@
/**
* A timestamp related to this notification, in milliseconds since the epoch.
- *
+ *
* Default value: {@link System#currentTimeMillis() Now}.
*
* Choose a timestamp that will be most relevant to the user. For most finite events, this
* corresponds to the time the event happened (or will happen, in the case of events that have
* yet to occur but about which the user is being informed). Indefinite events should be
- * timestamped according to when the activity began.
- *
+ * timestamped according to when the activity began.
+ *
* Some examples:
- *
+ *
* <ul>
* <li>Notification of a new chat message should be stamped when the message was received.</li>
* <li>Notification of an ongoing file download (with a progress bar, for example) should be stamped when the download started.</li>
* <li>Notification of a completed file download should be stamped when the download finished.</li>
* <li>Notification of an upcoming meeting should be stamped with the time the meeting will begin (that is, in the future).</li>
* <li>Notification of an ongoing stopwatch (increasing timer) should be stamped with the watch's start time.
* <li>Notification of an ongoing countdown timer should be stamped with the timer's end time.
- * </ul>
- *
+ * </ul>
+ *
*/
public long when;
@@ -135,13 +135,13 @@
/**
* The number of events that this notification represents. For example, in a new mail
* notification, this could be the number of unread messages.
- *
+ *
* The system may or may not use this field to modify the appearance of the notification. For
* example, before {@link android.os.Build.VERSION_CODES#HONEYCOMB}, this number was
* superimposed over the icon in the status bar. Starting with
* {@link android.os.Build.VERSION_CODES#HONEYCOMB}, the template used by
* {@link Notification.Builder} has displayed the number in the expanded notification view.
- *
+ *
* If the number is 0 or negative, it is never shown.
*/
public int number;
@@ -322,7 +322,7 @@
/**
* Bit to be bitwise-ored into the {@link #flags} field that should be
* set if the notification should be canceled when it is clicked by the
- * user. On tablets, the
+ * user.
*/
public static final int FLAG_AUTO_CANCEL = 0x00000010;
@@ -343,7 +343,7 @@
/**
* Obsolete flag indicating high-priority notifications; use the priority field instead.
- *
+ *
* @deprecated Use {@link #priority} with a positive value.
*/
public static final int FLAG_HIGH_PRIORITY = 0x00000080;
@@ -384,15 +384,15 @@
/**
* Relative priority for this notification.
- *
+ *
* Priority is an indication of how much of the user's valuable attention should be consumed by
* this notification. Low-priority notifications may be hidden from the user in certain
* situations, while the user might be interrupted for a higher-priority notification. The
- * system will make a determination about how to interpret notification priority as described in
- * MUMBLE MUMBLE.
+ * system will make a determination about how to interpret this priority when presenting
+ * the notification.
*/
public int priority;
-
+
/**
* @hide
* Notification type: incoming call (voice or video) or similar synchronous communication request.
@@ -652,7 +652,7 @@ public Notification clone() {
that.flags = this.flags;
that.priority = this.priority;
-
+
final String[] thiskind = this.kind;
if (thiskind != null) {
final int N = thiskind.length;
@@ -751,9 +751,9 @@ public void writeToParcel(Parcel parcel, int flags)
}
parcel.writeInt(priority);
-
+
parcel.writeStringArray(kind); // ok for null
-
+
if (extras != null) {
parcel.writeInt(1);
extras.writeToParcel(parcel, 0);
@@ -855,7 +855,9 @@ public String toString() {
}
// TODO(dsandler): defaults take precedence over local values, so reorder the branches below
sb.append(" vibrate=");
- if (this.vibrate != null) {
+ if ((this.defaults & DEFAULT_VIBRATE) != 0) {
+ sb.append("default");
+ } else if (this.vibrate != null) {
int N = this.vibrate.length-1;
sb.append("[");
for (int i=0; i<N; i++) {
@@ -866,16 +868,14 @@ public String toString() {
sb.append(this.vibrate[N]);
}
sb.append("]");
- } else if ((this.defaults & DEFAULT_VIBRATE) != 0) {
- sb.append("default");
} else {
sb.append("null");
}
sb.append(" sound=");
- if (this.sound != null) {
- sb.append(this.sound.toString());
- } else if ((this.defaults & DEFAULT_SOUND) != 0) {
+ if ((this.defaults & DEFAULT_SOUND) != 0) {
sb.append("default");
+ } else if (this.sound != null) {
+ sb.append(this.sound.toString());
} else {
sb.append("null");
}
@@ -921,16 +921,16 @@ public void setUser(UserHandle user) {
/**
* Builder class for {@link Notification} objects.
- *
+ *
* Provides a convenient way to set the various fields of a {@link Notification} and generate
* content views using the platform's notification layout template. If your app supports
* versions of Android as old as API level 4, you can instead use
* {@link android.support.v4.app.NotificationCompat.Builder NotificationCompat.Builder},
* available in the <a href="{@docRoot}tools/extras/support-library.html">Android Support
* library</a>.
- *
+ *
* <p>Example:
- *
+ *
* <pre class="prettyprint">
* Notification noti = new Notification.Builder(mContext)
* .setContentTitle(&quot;New mail from &quot; + sender.toString())
@@ -1030,8 +1030,8 @@ public Builder setShowWhen(boolean show) {
/**
* Show the {@link Notification#when} field as a stopwatch.
- *
- * Instead of presenting <code>when</code> as a timestamp, the notification will show an
+ *
+ * Instead of presenting <code>when</code> as a timestamp, the notification will show an
* automatically updating display of the minutes and seconds since <code>when</code>.
*
* Useful when showing an elapsed time (like an ongoing phone call).
@@ -1097,7 +1097,7 @@ public Builder setContentText(CharSequence text) {
}
/**
- * Set the third line of text in the platform notification template.
+ * Set the third line of text in the platform notification template.
* Don't use if you're also using {@link #setProgress(int, int, boolean)}; they occupy the same location in the standard template.
*/
public Builder setSubText(CharSequence text) {
@@ -1359,12 +1359,12 @@ public Builder setPriority(int pri) {
mPriority = pri;
return this;
}
-
+
/**
* @hide
- *
+ *
* Add a kind (category) to this notification. Optional.
- *
+ *
* @see Notification#kind
*/
public Builder addKind(String k) {
@@ -1390,6 +1390,8 @@ public Builder setExtras(Bundle bag) {
/**
* Add an action to this notification. Actions are typically displayed by
* the system as a button adjacent to the notification content.
+ * <br>
+ * A notification displays up to 3 actions, from left to right in the order they were added.
*
* @param icon Resource ID of a drawable that represents the action.
* @param title Text describing the action.
@@ -1572,7 +1574,7 @@ private RemoteViews makeBigContentView() {
private RemoteViews generateActionButton(Action action) {
final boolean tombstone = (action.actionIntent == null);
- RemoteViews button = new RemoteViews(mContext.getPackageName(),
+ RemoteViews button = new RemoteViews(mContext.getPackageName(),
tombstone ? R.layout.notification_action_tombstone
: R.layout.notification_action);
button.setTextViewCompoundDrawables(R.id.action0, action.icon, 0, 0, 0);
@@ -1731,7 +1733,7 @@ protected RemoteViews getStandardView(int layoutId) {
/**
* Helper class for generating large-format notifications that include a large image attachment.
- *
+ *
* This class is a "rebuilder": It consumes a Builder object and modifies its behavior, like so:
* <pre class="prettyprint">
* Notification noti = new Notification.BigPictureStyle(
@@ -1743,7 +1745,7 @@ protected RemoteViews getStandardView(int layoutId) {
* .bigPicture(aBigBitmap)
* .build();
* </pre>
- *
+ *
* @see Notification#bigContentView
*/
public static class BigPictureStyle extends Style {
@@ -1814,7 +1816,7 @@ public Notification build() {
/**
* Helper class for generating large-format notifications that include a lot of text.
- *
+ *
* This class is a "rebuilder": It consumes a Builder object and modifies its behavior, like so:
* <pre class="prettyprint">
* Notification noti = new Notification.BigTextStyle(
@@ -1826,7 +1828,7 @@ public Notification build() {
* .bigText(aVeryLongString)
* .build();
* </pre>
- *
+ *
* @see Notification#bigContentView
*/
public static class BigTextStyle extends Style {
@@ -1871,7 +1873,7 @@ private RemoteViews makeBigContentView() {
mBuilder.mContentText = null;
RemoteViews contentView = getStandardView(R.layout.notification_template_big_text);
-
+
if (hadThreeLines) {
// vertical centering
contentView.setViewPadding(R.id.line1, 0, 0, 0, 0);
@@ -1895,7 +1897,7 @@ public Notification build() {
/**
* Helper class for generating large-format notifications that include a list of (up to 5) strings.
- *
+ *
* This class is a "rebuilder": It consumes a Builder object and modifies its behavior, like so:
* <pre class="prettyprint">
* Notification noti = new Notification.InboxStyle(
@@ -1910,7 +1912,7 @@ public Notification build() {
* .setSummaryText(&quot;+3 more&quot;)
* .build();
* </pre>
- *
+ *
* @see Notification#bigContentView
*/
public static class InboxStyle extends Style {
View
14 core/java/android/app/PendingIntent.java
@@ -790,6 +790,20 @@ public boolean isActivity() {
}
/**
+ * @hide
+ * Return the Intent of this PendingIntent.
+ */
+ public Intent getIntent() {
+ try {
+ return ActivityManagerNative.getDefault()
+ .getIntentForIntentSender(mTarget);
+ } catch (RemoteException e) {
+ // Should never happen.
+ return null;
+ }
+ }
+
+ /**
* Comparison operator on two PendingIntent objects, such that true
* is returned then they both represent the same operation from the
* same package. This allows you to use {@link #getActivity},
View
2 core/java/android/app/Presentation.java
@@ -281,7 +281,7 @@ private void handleDisplayChanged() {
private boolean isConfigurationStillValid() {
DisplayMetrics dm = new DisplayMetrics();
mDisplay.getMetrics(dm);
- return dm.equals(getResources().getDisplayMetrics());
+ return dm.equalsPhysical(getResources().getDisplayMetrics());
}
private static Context createPresentationContext(
View
3 core/java/android/app/SearchManager.java
@@ -858,6 +858,9 @@ public Intent getAssistIntent(Context context) {
*/
public Intent getAssistIntent(Context context, int userHandle) {
try {
+ if (mService == null) {
+ return null;
+ }
ComponentName comp = mService.getAssistIntent(userHandle);
if (comp == null) {
return null;
View
4 core/java/android/app/admin/DeviceAdminInfo.java
@@ -139,9 +139,9 @@
public static final int USES_POLICY_DISABLE_CAMERA = 8;
/**
- * A type of policy that this device admin can use: disables use of keyguard widgets.
+ * A type of policy that this device admin can use: disables use of keyguard features.
*
- * <p>To control this policy, the device admin must have a "disable-keyguard-widgets"
+ * <p>To control this policy, the device admin must have a "disable-keyguard-features"
* tag in the "uses-policies" section of its meta-data.
*/
public static final int USES_POLICY_DISABLE_KEYGUARD_FEATURES = 9;
View
62 core/java/android/appwidget/AppWidgetHost.java
@@ -60,6 +60,7 @@
public void updateAppWidget(int appWidgetId, RemoteViews views) {
if (isLocalBinder() && views != null) {
views = views.clone();
+ views.setUser(mUser);
}
Message msg = mHandler.obtainMessage(HANDLE_UPDATE);
msg.arg1 = appWidgetId;
@@ -123,6 +124,8 @@ public void handleMessage(Message msg) {
Callbacks mCallbacks = new Callbacks();
final HashMap<Integer,AppWidgetHostView> mViews = new HashMap<Integer, AppWidgetHostView>();
private OnClickHandler mOnClickHandler;
+ // Optionally set by lockscreen
+ private UserHandle mUser;
public AppWidgetHost(Context context, int hostId) {
this(context, hostId, null, context.getMainLooper());
@@ -137,9 +140,15 @@ public AppWidgetHost(Context context, int hostId, OnClickHandler handler, Looper
mOnClickHandler = handler;
mHandler = new UpdateHandler(looper);
mDisplayMetrics = context.getResources().getDisplayMetrics();
+ mUser = Process.myUserHandle();
bindService();
}
+ /** @hide */
+ public void setUserId(int userId) {
+ mUser = new UserHandle(userId);
+ }
+
private static void bindService() {
synchronized (sServiceLock) {
if (sService == null) {
@@ -154,21 +163,34 @@ private static void bindService() {
* becomes visible, i.e. from onStart() in your Activity.
*/
public void startListening() {
+ startListeningAsUser(UserHandle.myUserId());
+ }
+
+ /**
+ * Start receiving onAppWidgetChanged calls for your AppWidgets. Call this when your activity
+ * becomes visible, i.e. from onStart() in your Activity.
+ * @hide
+ */
+ public void startListeningAsUser(int userId) {
int[] updatedIds;
ArrayList<RemoteViews> updatedViews = new ArrayList<RemoteViews>();
try {
if (mPackageName == null) {
mPackageName = mContext.getPackageName();
}
- updatedIds = sService.startListening(mCallbacks, mPackageName, mHostId, updatedViews);
+ updatedIds = sService.startListeningAsUser(
+ mCallbacks, mPackageName, mHostId, updatedViews, userId);
}
catch (RemoteException e) {
throw new RuntimeException("system server dead?", e);
}
final int N = updatedIds.length;
for (int i=0; i<N; i++) {
+ if (updatedViews.get(i) != null) {
+ updatedViews.get(i).setUser(new UserHandle(userId));
+ }
updateAppWidgetView(updatedIds[i], updatedViews.get(i));
}
}
@@ -179,11 +201,27 @@ public void startListening() {
*/
public void stopListening() {
try {
- sService.stopListening(mHostId);
+ sService.stopListeningAsUser(mHostId, UserHandle.myUserId());
+ }
+ catch (RemoteException e) {
+ throw new RuntimeException("system server dead?", e);
+ }
+ }
+
+ /**
+ * Stop receiving onAppWidgetChanged calls for your AppWidgets. Call this when your activity is
+ * no longer visible, i.e. from onStop() in your Activity.
+ * @hide
+ */
+ public void stopListeningAsUser(int userId) {
+ try {
+ sService.stopListeningAsUser(mHostId, userId);
}
catch (RemoteException e) {
throw new RuntimeException("system server dead?", e);
}
+ // Also clear the views
+ clearViews();
}
/**
@@ -224,6 +262,22 @@ public static int allocateAppWidgetIdForSystem(int hostId) {
}
}
+ /**
+ * Gets a list of all the appWidgetIds that are bound to the current host
+ *
+ * @hide
+ */
+ public int[] getAppWidgetIds() {
+ try {
+ if (sService == null) {
+ bindService();
+ }
+ return sService.getAppWidgetIdsForHost(mHostId);
+ } catch (RemoteException e) {
+ throw new RuntimeException("system server dead?", e);
+ }
+ }
+
private static void checkCallerIsSystem() {
int uid = Process.myUid();
if (UserHandle.getAppId(uid) == Process.SYSTEM_UID || uid == 0) {
@@ -308,6 +362,7 @@ public static void deleteAllHosts() {
public final AppWidgetHostView createView(Context context, int appWidgetId,
AppWidgetProviderInfo appWidget) {
AppWidgetHostView view = onCreateView(context, appWidgetId, appWidget);
+ view.setUserId(mUser.getIdentifier());
view.setOnClickHandler(mOnClickHandler);
view.setAppWidget(appWidgetId, appWidget);
synchronized (mViews) {
@@ -316,6 +371,9 @@ public final AppWidgetHostView createView(Context context, int appWidgetId,
RemoteViews views;
try {
views = sService.getAppWidgetViews(appWidgetId);
+ if (views != null) {
+ views.setUser(mUser);
+ }
} catch (RemoteException e) {
throw new RuntimeException("system server dead?", e);
}
View
17 core/java/android/appwidget/AppWidgetHostView.java
@@ -31,7 +31,9 @@
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
+import android.os.Process;
import android.os.SystemClock;
+import android.os.UserHandle;
import android.util.AttributeSet;
import android.util.Log;
import android.util.SparseArray;
@@ -85,6 +87,7 @@ public boolean onLoadClass(Class clazz) {
Bitmap mOld;
Paint mOldPaint = new Paint();
private OnClickHandler mOnClickHandler;
+ private UserHandle mUser;
/**
* Create a host view. Uses default fade animations.
@@ -112,12 +115,17 @@ public AppWidgetHostView(Context context, OnClickHandler handler) {
public AppWidgetHostView(Context context, int animationIn, int animationOut) {
super(context);
mContext = context;
-
+ mUser = Process.myUserHandle();
// We want to segregate the view ids within AppWidgets to prevent
// problems when those ids collide with view ids in the AppWidgetHost.
setIsRootNamespace(true);
}
+ /** @hide */
+ public void setUserId(int userId) {
+ mUser = new UserHandle(userId);
+ }
+
/**
* Pass the given handler to RemoteViews when updating this widget. Unless this
* is done immediatly after construction, a call to {@link #updateAppWidget(RemoteViews)}
@@ -465,7 +473,8 @@ private Context getRemoteContext(RemoteViews views) {
try {
// Return if cloned successfully, otherwise default
- return mContext.createPackageContext(packageName, Context.CONTEXT_RESTRICTED);
+ return mContext.createPackageContextAsUser(packageName, Context.CONTEXT_RESTRICTED,
+ mUser);
} catch (NameNotFoundException e) {
Log.e(TAG, "Package name " + packageName + " not found");
return mContext;
@@ -539,8 +548,8 @@ protected View getDefaultView() {
try {
if (mInfo != null) {
- Context theirContext = mContext.createPackageContext(
- mInfo.provider.getPackageName(), Context.CONTEXT_RESTRICTED);
+ Context theirContext = mContext.createPackageContextAsUser(
+ mInfo.provider.getPackageName(), Context.CONTEXT_RESTRICTED, mUser);
mRemoteContext = theirContext;
LayoutInflater inflater = (LayoutInflater)
theirContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View
28 core/java/android/appwidget/AppWidgetManager.java
@@ -23,6 +23,7 @@
import android.os.IBinder;
import android.os.RemoteException;
import android.os.ServiceManager;
+import android.os.UserHandle;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import android.widget.RemoteViews;
@@ -238,7 +239,7 @@
public static final String EXTRA_CUSTOM_SORT = "customSort";
/**
- * A sentiel value that the AppWidget manager will never return as a appWidgetId.
+ * A sentinel value that the AppWidget manager will never return as a appWidgetId.
*/
public static final int INVALID_APPWIDGET_ID = 0;
@@ -544,8 +545,19 @@ public void notifyAppWidgetViewDataChanged(int appWidgetId, int viewId) {
* Return a list of the AppWidget providers that are currently installed.
*/
public List<AppWidgetProviderInfo> getInstalledProviders() {
+ return getInstalledProviders(AppWidgetProviderInfo.WIDGET_CATEGORY_HOME_SCREEN);
+ }
+
+ /**
+ * Return a list of the AppWidget providers that are currently installed.
+ *
+ * @param categoryFilter Will only return providers which register as any of the specified
+ * specified categories. See {@link AppWidgetProviderInfo#widgetCategory}.
+ * @hide
+ */
+ public List<AppWidgetProviderInfo> getInstalledProviders(int categoryFilter) {
try {
- List<AppWidgetProviderInfo> providers = sService.getInstalledProviders();
+ List<AppWidgetProviderInfo> providers = sService.getInstalledProviders(categoryFilter);
for (AppWidgetProviderInfo info : providers) {
// Converting complex to dp.
info.minWidth =
@@ -738,11 +750,14 @@ public void setBindAppWidgetPermission(String packageName, boolean permission) {
* @param intent The intent of the service which will be providing the data to the
* RemoteViewsAdapter.
* @param connection The callback interface to be notified when a connection is made or lost.
+ * @param userHandle The user to bind to.
* @hide
*/
- public void bindRemoteViewsService(int appWidgetId, Intent intent, IBinder connection) {
+ public void bindRemoteViewsService(int appWidgetId, Intent intent, IBinder connection,
+ UserHandle userHandle) {
try {
- sService.bindRemoteViewsService(appWidgetId, intent, connection);
+ sService.bindRemoteViewsService(appWidgetId, intent, connection,
+ userHandle.getIdentifier());
}
catch (RemoteException e) {
throw new RuntimeException("system server dead?", e);
@@ -758,11 +773,12 @@ public void bindRemoteViewsService(int appWidgetId, Intent intent, IBinder conne
* @param appWidgetId The AppWidget instance for which to bind the RemoteViewsService.
* @param intent The intent of the service which will be providing the data to the
* RemoteViewsAdapter.
+ * @param userHandle The user to unbind from.
* @hide
*/
- public void unbindRemoteViewsService(int appWidgetId, Intent intent) {
+ public void unbindRemoteViewsService(int appWidgetId, Intent intent, UserHandle userHandle) {
try {
- sService.unbindRemoteViewsService(appWidgetId, intent);
+ sService.unbindRemoteViewsService(appWidgetId, intent, userHandle.getIdentifier());
}
catch (RemoteException e) {
throw new RuntimeException("system server dead?", e);
View
4 core/java/android/bluetooth/BluetoothAdapter.java
@@ -1212,7 +1212,7 @@ public void closeProfileProxy(int profile, BluetoothProfile proxy) {
final private IBluetoothManagerCallback mManagerCallback =
new IBluetoothManagerCallback.Stub() {
public void onBluetoothServiceUp(IBluetooth bluetoothService) {
- if (DBG) Log.d(TAG, "onBluetoothServiceUp: " + bluetoothService);
+ if (VDBG) Log.d(TAG, "onBluetoothServiceUp: " + bluetoothService);
synchronized (mManagerCallback) {
mService = bluetoothService;
for (IBluetoothManagerCallback cb : mProxyServiceStateCallbacks ){
@@ -1228,7 +1228,7 @@ public void onBluetoothServiceUp(IBluetooth bluetoothService) {
}
public void onBluetoothServiceDown() {
- if (DBG) Log.d(TAG, "onBluetoothServiceDown: " + mService);
+ if (VDBG) Log.d(TAG, "onBluetoothServiceDown: " + mService);
synchronized (mManagerCallback) {
mService = null;
for (IBluetoothManagerCallback cb : mProxyServiceStateCallbacks ){
View
18 core/java/android/bluetooth/BluetoothSocket.java
@@ -300,7 +300,6 @@ public void connect() throws IOException {
if (mDevice == null) throw new IOException("Connect is called on null device");
try {
- // TODO(BT) derive flag from auth and encrypt
if (mSocketState == SocketState.CLOSED) throw new IOException("socket closed");
IBluetooth bluetoothProxy = BluetoothAdapter.getDefaultAdapter().getBluetoothService(null);
if (bluetoothProxy == null) throw new IOException("Bluetooth is off");
@@ -349,7 +348,6 @@ public void connect() throws IOException {
mUuid, mPort, getSecurityFlags());
} catch (RemoteException e) {
Log.e(TAG, Log.getStackTraceString(new Throwable()));
- // TODO(BT) right error code?
return -1;
}
@@ -388,17 +386,20 @@ public void connect() throws IOException {
/*package*/ BluetoothSocket accept(int timeout) throws IOException {
BluetoothSocket acceptedSocket;
if (mSocketState != SocketState.LISTENING) throw new IOException("bt socket is not in listen state");
- // TODO(BT) wait on an incoming connection
+ if(timeout > 0) {
+ Log.d(TAG, "accept() set timeout (ms):" + timeout);
+ mSocket.setSoTimeout(timeout);
+ }
String RemoteAddr = waitSocketSignal(mSocketIS);
+ if(timeout > 0)
+ mSocket.setSoTimeout(0);
synchronized(this)
{
if (mSocketState != SocketState.LISTENING)
throw new IOException("bt socket is not in listen state");
acceptedSocket = acceptSocket(RemoteAddr);
//quick drop the reference of the file handle
}
- // TODO(BT) rfcomm socket only supports one connection, return this?
- // return this;
return acceptedSocket;
}
@@ -428,7 +429,7 @@ public void connect() throws IOException {
@Override
public void close() throws IOException {
- Log.d(TAG, "close() in, this: " + this + ", channel: " + mPort + ", state: " + mSocketState);
+ if (VDBG) Log.d(TAG, "close() in, this: " + this + ", channel: " + mPort + ", state: " + mSocketState);
if(mSocketState == SocketState.CLOSED)
return;
else
@@ -451,7 +452,6 @@ public void close() throws IOException {
mPfd.detachFd();
}
}
- // TODO(BT) unbind proxy,
}
/*package */ void removeChannel() {
@@ -471,6 +471,8 @@ private String waitSocketSignal(InputStream is) throws IOException {
ByteBuffer bb = ByteBuffer.wrap(sig);
bb.order(ByteOrder.nativeOrder());
int size = bb.getShort();
+ if(size != SOCK_SIGNAL_SIZE)
+ throw new IOException("Connection failure, wrong signal size: " + size);
byte [] addr = new byte[6];
bb.get(addr);
int channel = bb.getInt();
@@ -487,7 +489,7 @@ private int readAll(InputStream is, byte[] b) throws IOException {
while(left > 0) {
int ret = is.read(b, b.length - left, left);
if(ret <= 0)
- throw new IOException("read failed, socket might closed, read ret: " + ret);
+ throw new IOException("read failed, socket might closed or timeout, read ret: " + ret);
left -= ret;
if(left != 0)
Log.w(TAG, "readAll() looping, read partial size: " + (b.length - left) +
View
2 core/java/android/content/BroadcastReceiver.java
@@ -117,7 +117,7 @@
*
* <ul>
* <li><p>The Intent namespace is global. Make sure that Intent action names and
- * other strings are written in a namespace you own, or else you may inadvertantly
+ * other strings are written in a namespace you own, or else you may inadvertently
* conflict with other applications.
* <li><p>When you use {@link Context#registerReceiver(BroadcastReceiver, IntentFilter)},
* <em>any</em> application may send broadcasts to that registered receiver. You can
View
3 core/java/android/content/SyncManager.java
@@ -59,6 +59,7 @@
import android.util.Slog;
import com.android.internal.R;
+import com.android.internal.annotations.GuardedBy;
import com.android.internal.util.IndentingPrintWriter;
import com.google.android.collect.Lists;
import com.google.android.collect.Maps;
@@ -157,7 +158,7 @@
private SyncStorageEngine mSyncStorageEngine;
- // @GuardedBy("mSyncQueue")
+ @GuardedBy("mSyncQueue")
private final SyncQueue mSyncQueue;
protected final ArrayList<ActiveSyncContext> mActiveSyncContexts = Lists.newArrayList();
View
64 core/java/android/content/SyncStorageEngine.java
@@ -16,6 +16,7 @@
package android.content;
+import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.FastXmlSerializer;
@@ -63,6 +64,7 @@
public class SyncStorageEngine extends Handler {
private static final String TAG = "SyncManager";
+ private static final boolean DEBUG = false;
private static final boolean DEBUG_FILE = false;
private static final String XML_ATTR_NEXT_AUTHORITY_ID = "nextAuthorityId";
@@ -74,7 +76,7 @@
private static final long DEFAULT_POLL_FREQUENCY_SECONDS = 60 * 60 * 24; // One day
- // @VisibleForTesting
+ @VisibleForTesting
static final long MILLIS_IN_4WEEKS = 1000L * 60 * 60 * 24 * 7 * 4;
/** Enum value for a sync start event. */
@@ -442,7 +444,7 @@ private void reportChange(int which) {
mChangeListeners.finishBroadcast();
}
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "reportChange " + which + " to: " + reports);
}
@@ -483,13 +485,17 @@ public boolean getSyncAutomatically(Account account, int userId, String provider
public void setSyncAutomatically(Account account, int userId, String providerName,
boolean sync) {
- Log.d(TAG, "setSyncAutomatically: " + /* account + */" provider " + providerName
- + ", user " + userId + " -> " + sync);
+ if (DEBUG) {
+ Log.d(TAG, "setSyncAutomatically: " + /* account + */" provider " + providerName
+ + ", user " + userId + " -> " + sync);
+ }
synchronized (mAuthorities) {
AuthorityInfo authority = getOrCreateAuthorityLocked(account, userId, providerName, -1,
false);
if (authority.enabled == sync) {
- Log.d(TAG, "setSyncAutomatically: already set to " + sync + ", doing nothing");
+ if (DEBUG) {
+ Log.d(TAG, "setSyncAutomatically: already set to " + sync + ", doing nothing");
+ }
return;
}
authority.enabled = sync;
@@ -531,13 +537,17 @@ public void setIsSyncable(Account account, int userId, String providerName, int
} else if (syncable < -1) {
syncable = -1;
}
- Log.d(TAG, "setIsSyncable: " + account + ", provider " + providerName
- + ", user " + userId + " -> " + syncable);
+ if (DEBUG) {
+ Log.d(TAG, "setIsSyncable: " + account + ", provider " + providerName
+ + ", user " + userId + " -> " + syncable);
+ }
synchronized (mAuthorities) {
AuthorityInfo authority = getOrCreateAuthorityLocked(account, userId, providerName, -1,
false);
if (authority.syncable == syncable) {
- Log.d(TAG, "setIsSyncable: already set to " + syncable + ", doing nothing");
+ if (DEBUG) {
+ Log.d(TAG, "setIsSyncable: already set to " + syncable + ", doing nothing");
+ }
return;
}
authority.syncable = syncable;
@@ -563,7 +573,7 @@ public void setIsSyncable(Account account, int userId, String providerName, int
public void setBackoff(Account account, int userId, String providerName,
long nextSyncTime, long nextDelay) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "setBackoff: " + account + ", provider " + providerName
+ ", user " + userId
+ " -> nextSyncTime " + nextSyncTime + ", nextDelay " + nextDelay);
@@ -614,7 +624,7 @@ public void clearAllBackoffs(SyncQueue syncQueue) {
for (AuthorityInfo authorityInfo : accountInfo.authorities.values()) {
if (authorityInfo.backoffTime != NOT_IN_BACKOFF_MODE
|| authorityInfo.backoffDelay != NOT_IN_BACKOFF_MODE) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "clearAllBackoffs:"
+ " authority:" + authorityInfo.authority
+ " account:" + accountInfo.accountAndUser.account.name
@@ -640,7 +650,7 @@ public void clearAllBackoffs(SyncQueue syncQueue) {
public void setDelayUntilTime(Account account, int userId, String providerName,
long delayUntil) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "setDelayUntil: " + account + ", provider " + providerName
+ ", user " + userId + " -> delayUntil " + delayUntil);
}
@@ -676,7 +686,7 @@ private void updateOrRemovePeriodicSync(Account account, int userId, String prov
if (extras == null) {
extras = new Bundle();
}
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "addOrRemovePeriodicSync: " + account + ", user " + userId
+ ", provider " + providerName
+ " -> period " + period + ", extras " + extras);
@@ -832,7 +842,7 @@ public boolean isSyncActive(Account account, int userId, String authority) {
public PendingOperation insertIntoPending(PendingOperation op) {
synchronized (mAuthorities) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "insertIntoPending: account=" + op.account
+ " user=" + op.userId
+ " auth=" + op.authority
@@ -864,7 +874,7 @@ public PendingOperation insertIntoPending(PendingOperation op) {
public boolean deleteFromPending(PendingOperation op) {
boolean res = false;
synchronized (mAuthorities) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "deleteFromPending: account=" + op.account
+ " user=" + op.userId
+ " auth=" + op.authority
@@ -883,7 +893,7 @@ public boolean deleteFromPending(PendingOperation op) {
AuthorityInfo authority = getAuthorityLocked(op.account, op.userId, op.authority,
"deleteFromPending");
if (authority != null) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "removing - " + authority);
+ if (DEBUG) Log.v(TAG, "removing - " + authority);
final int N = mPendingOperations.size();
boolean morePending = false;
for (int i=0; i<N; i++) {
@@ -897,7 +907,7 @@ public boolean deleteFromPending(PendingOperation op) {
}
if (!morePending) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "no more pending!");
+ if (DEBUG) Log.v(TAG, "no more pending!");
SyncStatusInfo status = getOrCreateSyncStatusLocked(authority.ident);
status.pending = false;
}
@@ -937,16 +947,16 @@ public int getPendingOperationCount() {
*/
public void doDatabaseCleanup(Account[] accounts, int userId) {
synchronized (mAuthorities) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) Log.w(TAG, "Updating for new accounts...");
+ if (DEBUG) Log.v(TAG, "Updating for new accounts...");
SparseArray<AuthorityInfo> removing = new SparseArray<AuthorityInfo>();
Iterator<AccountInfo> accIt = mAccounts.values().iterator();
while (accIt.hasNext()) {
AccountInfo acc = accIt.next();
if (!ArrayUtils.contains(accounts, acc.accountAndUser.account)
&& acc.accountAndUser.userId == userId) {
// This account no longer exists...
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
- Log.w(TAG, "Account removed: " + acc.accountAndUser);
+ if (DEBUG) {
+ Log.v(TAG, "Account removed: " + acc.accountAndUser);
}
for (AuthorityInfo auth : acc.authorities.values()) {
removing.put(auth.ident, auth);
@@ -992,7 +1002,7 @@ public void doDatabaseCleanup(Account[] accounts, int userId) {
public SyncInfo addActiveSync(SyncManager.ActiveSyncContext activeSyncContext) {
final SyncInfo syncInfo;
synchronized (mAuthorities) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "setActiveSync: account="
+ activeSyncContext.mSyncOperation.account
+ " auth=" + activeSyncContext.mSyncOperation.authority
@@ -1020,7 +1030,7 @@ public SyncInfo addActiveSync(SyncManager.ActiveSyncContext activeSyncContext) {
*/
public void removeActiveSync(SyncInfo syncInfo, int userId) {
synchronized (mAuthorities) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "removeActiveSync: account=" + syncInfo.account
+ " user=" + userId
+ " auth=" + syncInfo.authority);
@@ -1045,7 +1055,7 @@ public long insertStartSyncEvent(Account accountName, int userId, String authori
long now, int source, boolean initialization) {
long id;
synchronized (mAuthorities) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "insertStartSyncEvent: account=" + accountName + "user=" + userId
+ " auth=" + authorityName + " source=" + source);
}
@@ -1067,7 +1077,7 @@ public long insertStartSyncEvent(Account accountName, int userId, String authori
mSyncHistory.remove(mSyncHistory.size()-1);
}
id = item.historyId;
- if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "returning historyId " + id);
+ if (DEBUG) Log.v(TAG, "returning historyId " + id);
}
reportChange(ContentResolver.SYNC_OBSERVER_TYPE_STATUS);
@@ -1095,7 +1105,7 @@ public static boolean equals(Bundle b1, Bundle b2) {
public void stopSyncEvent(long historyId, long elapsedTime, String resultMessage,
long downstreamActivity, long upstreamActivity) {
synchronized (mAuthorities) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "stopSyncEvent: historyId=" + historyId);
}
SyncHistoryItem item = null;
@@ -1357,7 +1367,7 @@ private AuthorityInfo getAuthorityLocked(Account accountName, int userId, String
AccountInfo accountInfo = mAccounts.get(au);
if (accountInfo == null) {
if (tag != null) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, tag + ": unknown account " + au);
}
}
@@ -1366,7 +1376,7 @@ private AuthorityInfo getAuthorityLocked(Account accountName, int userId, String
AuthorityInfo authority = accountInfo.authorities.get(authorityName);
if (authority == null) {
if (tag != null) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, tag + ": unknown authority " + authorityName);
}
}