diff --git a/facebook/TestApp/res/drawable-hdpi/ic_launcher.png b/facebook/TestApp/res/drawable-hdpi/ic_launcher.png index 8074c4c571..9005e98b53 100644 Binary files a/facebook/TestApp/res/drawable-hdpi/ic_launcher.png and b/facebook/TestApp/res/drawable-hdpi/ic_launcher.png differ diff --git a/facebook/TestApp/res/drawable-ldpi/ic_launcher.png b/facebook/TestApp/res/drawable-ldpi/ic_launcher.png index 1095584ec2..13fd7e3964 100644 Binary files a/facebook/TestApp/res/drawable-ldpi/ic_launcher.png and b/facebook/TestApp/res/drawable-ldpi/ic_launcher.png differ diff --git a/facebook/TestApp/res/drawable-mdpi/ic_launcher.png b/facebook/TestApp/res/drawable-mdpi/ic_launcher.png index a07c69fa5a..6a65afa2b2 100644 Binary files a/facebook/TestApp/res/drawable-mdpi/ic_launcher.png and b/facebook/TestApp/res/drawable-mdpi/ic_launcher.png differ diff --git a/facebook/res/drawable-hdpi/com_facebook_button_blue_focused.9.png b/facebook/res/drawable-hdpi/com_facebook_button_blue_focused.9.png index cf60eb0acf..aa002f0a0f 100644 Binary files a/facebook/res/drawable-hdpi/com_facebook_button_blue_focused.9.png and b/facebook/res/drawable-hdpi/com_facebook_button_blue_focused.9.png differ diff --git a/facebook/res/drawable-hdpi/com_facebook_button_blue_normal.9.png b/facebook/res/drawable-hdpi/com_facebook_button_blue_normal.9.png index ece0c4c940..4c114b48d9 100644 Binary files a/facebook/res/drawable-hdpi/com_facebook_button_blue_normal.9.png and b/facebook/res/drawable-hdpi/com_facebook_button_blue_normal.9.png differ diff --git a/facebook/res/drawable-hdpi/com_facebook_button_blue_pressed.9.png b/facebook/res/drawable-hdpi/com_facebook_button_blue_pressed.9.png index a123c25554..9c936b60cc 100644 Binary files a/facebook/res/drawable-hdpi/com_facebook_button_blue_pressed.9.png and b/facebook/res/drawable-hdpi/com_facebook_button_blue_pressed.9.png differ diff --git a/facebook/res/drawable-hdpi/com_facebook_button_grey_focused.9.png b/facebook/res/drawable-hdpi/com_facebook_button_grey_focused.9.png index 2e6f66dbc5..c655580f03 100644 Binary files a/facebook/res/drawable-hdpi/com_facebook_button_grey_focused.9.png and b/facebook/res/drawable-hdpi/com_facebook_button_grey_focused.9.png differ diff --git a/facebook/res/drawable-hdpi/com_facebook_button_grey_normal.9.png b/facebook/res/drawable-hdpi/com_facebook_button_grey_normal.9.png index 6098f0b0e6..efe802fd9a 100644 Binary files a/facebook/res/drawable-hdpi/com_facebook_button_grey_normal.9.png and b/facebook/res/drawable-hdpi/com_facebook_button_grey_normal.9.png differ diff --git a/facebook/res/drawable-hdpi/com_facebook_button_grey_pressed.9.png b/facebook/res/drawable-hdpi/com_facebook_button_grey_pressed.9.png index 23b9757d15..38acc47990 100644 Binary files a/facebook/res/drawable-hdpi/com_facebook_button_grey_pressed.9.png and b/facebook/res/drawable-hdpi/com_facebook_button_grey_pressed.9.png differ diff --git a/facebook/res/drawable-hdpi/com_facebook_button_like_background.png b/facebook/res/drawable-hdpi/com_facebook_button_like_background.png index 32814c82a6..9486c01a79 100644 Binary files a/facebook/res/drawable-hdpi/com_facebook_button_like_background.png and b/facebook/res/drawable-hdpi/com_facebook_button_like_background.png differ diff --git a/facebook/res/drawable-hdpi/com_facebook_button_like_background_selected.png b/facebook/res/drawable-hdpi/com_facebook_button_like_background_selected.png index b2c580e2a9..e128c1b99e 100644 Binary files a/facebook/res/drawable-hdpi/com_facebook_button_like_background_selected.png and b/facebook/res/drawable-hdpi/com_facebook_button_like_background_selected.png differ diff --git a/facebook/res/drawable-hdpi/com_facebook_button_like_icon.png b/facebook/res/drawable-hdpi/com_facebook_button_like_icon.png index 1dc9f6d249..c0d4688e52 100644 Binary files a/facebook/res/drawable-hdpi/com_facebook_button_like_icon.png and b/facebook/res/drawable-hdpi/com_facebook_button_like_icon.png differ diff --git a/facebook/res/drawable-hdpi/com_facebook_button_like_icon_selected.png b/facebook/res/drawable-hdpi/com_facebook_button_like_icon_selected.png index 722362ae8d..5e8ac3c99e 100644 Binary files a/facebook/res/drawable-hdpi/com_facebook_button_like_icon_selected.png and b/facebook/res/drawable-hdpi/com_facebook_button_like_icon_selected.png differ diff --git a/facebook/res/drawable-hdpi/com_facebook_close.png b/facebook/res/drawable-hdpi/com_facebook_close.png index d925cb7b20..d81f040d7c 100644 Binary files a/facebook/res/drawable-hdpi/com_facebook_close.png and b/facebook/res/drawable-hdpi/com_facebook_close.png differ diff --git a/facebook/res/drawable-hdpi/com_facebook_inverse_icon.png b/facebook/res/drawable-hdpi/com_facebook_inverse_icon.png index a7289c1125..ecc6962aac 100644 Binary files a/facebook/res/drawable-hdpi/com_facebook_inverse_icon.png and b/facebook/res/drawable-hdpi/com_facebook_inverse_icon.png differ diff --git a/facebook/res/drawable-hdpi/com_facebook_logo.png b/facebook/res/drawable-hdpi/com_facebook_logo.png index 26ab7945fc..161bef08bf 100644 Binary files a/facebook/res/drawable-hdpi/com_facebook_logo.png and b/facebook/res/drawable-hdpi/com_facebook_logo.png differ diff --git a/facebook/res/drawable-hdpi/com_facebook_picker_magnifier.png b/facebook/res/drawable-hdpi/com_facebook_picker_magnifier.png index d6ec37d04b..0dcd013d65 100644 Binary files a/facebook/res/drawable-hdpi/com_facebook_picker_magnifier.png and b/facebook/res/drawable-hdpi/com_facebook_picker_magnifier.png differ diff --git a/facebook/res/drawable-hdpi/com_facebook_tooltip_black_background.9.png b/facebook/res/drawable-hdpi/com_facebook_tooltip_black_background.9.png index 4707ba20c8..2c5b1bbad1 100644 Binary files a/facebook/res/drawable-hdpi/com_facebook_tooltip_black_background.9.png and b/facebook/res/drawable-hdpi/com_facebook_tooltip_black_background.9.png differ diff --git a/facebook/res/drawable-hdpi/com_facebook_tooltip_black_bottomnub.png b/facebook/res/drawable-hdpi/com_facebook_tooltip_black_bottomnub.png index 83bf9694b6..972010ec25 100644 Binary files a/facebook/res/drawable-hdpi/com_facebook_tooltip_black_bottomnub.png and b/facebook/res/drawable-hdpi/com_facebook_tooltip_black_bottomnub.png differ diff --git a/facebook/res/drawable-hdpi/com_facebook_tooltip_black_topnub.png b/facebook/res/drawable-hdpi/com_facebook_tooltip_black_topnub.png index 0d8fb82b61..5d595c5a34 100644 Binary files a/facebook/res/drawable-hdpi/com_facebook_tooltip_black_topnub.png and b/facebook/res/drawable-hdpi/com_facebook_tooltip_black_topnub.png differ diff --git a/facebook/res/drawable-hdpi/com_facebook_tooltip_black_xout.png b/facebook/res/drawable-hdpi/com_facebook_tooltip_black_xout.png index 5bebe5e357..e2903b6ded 100644 Binary files a/facebook/res/drawable-hdpi/com_facebook_tooltip_black_xout.png and b/facebook/res/drawable-hdpi/com_facebook_tooltip_black_xout.png differ diff --git a/facebook/res/drawable-hdpi/com_facebook_tooltip_blue_background.9.png b/facebook/res/drawable-hdpi/com_facebook_tooltip_blue_background.9.png index 0f8c5dffcf..a42b3cd92e 100644 Binary files a/facebook/res/drawable-hdpi/com_facebook_tooltip_blue_background.9.png and b/facebook/res/drawable-hdpi/com_facebook_tooltip_blue_background.9.png differ diff --git a/facebook/res/drawable-hdpi/com_facebook_tooltip_blue_bottomnub.png b/facebook/res/drawable-hdpi/com_facebook_tooltip_blue_bottomnub.png index 21145bca67..2d292f2cad 100644 Binary files a/facebook/res/drawable-hdpi/com_facebook_tooltip_blue_bottomnub.png and b/facebook/res/drawable-hdpi/com_facebook_tooltip_blue_bottomnub.png differ diff --git a/facebook/res/drawable-hdpi/com_facebook_tooltip_blue_topnub.png b/facebook/res/drawable-hdpi/com_facebook_tooltip_blue_topnub.png index 8b534773d1..b2dcc40899 100644 Binary files a/facebook/res/drawable-hdpi/com_facebook_tooltip_blue_topnub.png and b/facebook/res/drawable-hdpi/com_facebook_tooltip_blue_topnub.png differ diff --git a/facebook/res/drawable-hdpi/com_facebook_tooltip_blue_xout.png b/facebook/res/drawable-hdpi/com_facebook_tooltip_blue_xout.png index 9f341075c0..1285a1665a 100644 Binary files a/facebook/res/drawable-hdpi/com_facebook_tooltip_blue_xout.png and b/facebook/res/drawable-hdpi/com_facebook_tooltip_blue_xout.png differ diff --git a/facebook/res/drawable-ldpi/com_facebook_close.png b/facebook/res/drawable-ldpi/com_facebook_close.png index fe4be250e5..5f8bc59052 100644 Binary files a/facebook/res/drawable-ldpi/com_facebook_close.png and b/facebook/res/drawable-ldpi/com_facebook_close.png differ diff --git a/facebook/res/drawable-mdpi/com_facebook_button_blue_focused.9.png b/facebook/res/drawable-mdpi/com_facebook_button_blue_focused.9.png index cfb7a015c7..86bd877404 100644 Binary files a/facebook/res/drawable-mdpi/com_facebook_button_blue_focused.9.png and b/facebook/res/drawable-mdpi/com_facebook_button_blue_focused.9.png differ diff --git a/facebook/res/drawable-mdpi/com_facebook_button_blue_normal.9.png b/facebook/res/drawable-mdpi/com_facebook_button_blue_normal.9.png index 1e93901338..74e5ce199c 100644 Binary files a/facebook/res/drawable-mdpi/com_facebook_button_blue_normal.9.png and b/facebook/res/drawable-mdpi/com_facebook_button_blue_normal.9.png differ diff --git a/facebook/res/drawable-mdpi/com_facebook_button_blue_pressed.9.png b/facebook/res/drawable-mdpi/com_facebook_button_blue_pressed.9.png index d8427fdefd..8fd28f704e 100644 Binary files a/facebook/res/drawable-mdpi/com_facebook_button_blue_pressed.9.png and b/facebook/res/drawable-mdpi/com_facebook_button_blue_pressed.9.png differ diff --git a/facebook/res/drawable-mdpi/com_facebook_inverse_icon.png b/facebook/res/drawable-mdpi/com_facebook_inverse_icon.png index a806a2f5dc..b4afa5443b 100644 Binary files a/facebook/res/drawable-mdpi/com_facebook_inverse_icon.png and b/facebook/res/drawable-mdpi/com_facebook_inverse_icon.png differ diff --git a/facebook/res/drawable-mdpi/com_facebook_picker_magnifier.png b/facebook/res/drawable-mdpi/com_facebook_picker_magnifier.png index c5170c18bd..3013a55198 100644 Binary files a/facebook/res/drawable-mdpi/com_facebook_picker_magnifier.png and b/facebook/res/drawable-mdpi/com_facebook_picker_magnifier.png differ diff --git a/facebook/res/drawable-mdpi/com_facebook_tooltip_black_background.9.png b/facebook/res/drawable-mdpi/com_facebook_tooltip_black_background.9.png index 59f2639828..d10e30391d 100644 Binary files a/facebook/res/drawable-mdpi/com_facebook_tooltip_black_background.9.png and b/facebook/res/drawable-mdpi/com_facebook_tooltip_black_background.9.png differ diff --git a/facebook/res/drawable-mdpi/com_facebook_tooltip_black_bottomnub.png b/facebook/res/drawable-mdpi/com_facebook_tooltip_black_bottomnub.png index 4c97bf9238..9378512cee 100644 Binary files a/facebook/res/drawable-mdpi/com_facebook_tooltip_black_bottomnub.png and b/facebook/res/drawable-mdpi/com_facebook_tooltip_black_bottomnub.png differ diff --git a/facebook/res/drawable-mdpi/com_facebook_tooltip_black_topnub.png b/facebook/res/drawable-mdpi/com_facebook_tooltip_black_topnub.png index 7fdf08201d..d94fa9688d 100644 Binary files a/facebook/res/drawable-mdpi/com_facebook_tooltip_black_topnub.png and b/facebook/res/drawable-mdpi/com_facebook_tooltip_black_topnub.png differ diff --git a/facebook/res/drawable-mdpi/com_facebook_tooltip_black_xout.png b/facebook/res/drawable-mdpi/com_facebook_tooltip_black_xout.png index 21ad6a54e7..51454e5a36 100644 Binary files a/facebook/res/drawable-mdpi/com_facebook_tooltip_black_xout.png and b/facebook/res/drawable-mdpi/com_facebook_tooltip_black_xout.png differ diff --git a/facebook/res/drawable-mdpi/com_facebook_tooltip_blue_background.9.png b/facebook/res/drawable-mdpi/com_facebook_tooltip_blue_background.9.png index bd54278dae..bf60245bb7 100644 Binary files a/facebook/res/drawable-mdpi/com_facebook_tooltip_blue_background.9.png and b/facebook/res/drawable-mdpi/com_facebook_tooltip_blue_background.9.png differ diff --git a/facebook/res/drawable-mdpi/com_facebook_tooltip_blue_bottomnub.png b/facebook/res/drawable-mdpi/com_facebook_tooltip_blue_bottomnub.png index 299afc24ed..e0ac8fea81 100644 Binary files a/facebook/res/drawable-mdpi/com_facebook_tooltip_blue_bottomnub.png and b/facebook/res/drawable-mdpi/com_facebook_tooltip_blue_bottomnub.png differ diff --git a/facebook/res/drawable-mdpi/com_facebook_tooltip_blue_topnub.png b/facebook/res/drawable-mdpi/com_facebook_tooltip_blue_topnub.png index cb29b55f30..e09406081d 100644 Binary files a/facebook/res/drawable-mdpi/com_facebook_tooltip_blue_topnub.png and b/facebook/res/drawable-mdpi/com_facebook_tooltip_blue_topnub.png differ diff --git a/facebook/res/drawable-mdpi/com_facebook_tooltip_blue_xout.png b/facebook/res/drawable-mdpi/com_facebook_tooltip_blue_xout.png index 73695f03b8..85699f8ec2 100644 Binary files a/facebook/res/drawable-mdpi/com_facebook_tooltip_blue_xout.png and b/facebook/res/drawable-mdpi/com_facebook_tooltip_blue_xout.png differ diff --git a/facebook/res/drawable-xhdpi/com_facebook_button_blue_focused.9.png b/facebook/res/drawable-xhdpi/com_facebook_button_blue_focused.9.png index 5a47068d7c..0524c9325f 100644 Binary files a/facebook/res/drawable-xhdpi/com_facebook_button_blue_focused.9.png and b/facebook/res/drawable-xhdpi/com_facebook_button_blue_focused.9.png differ diff --git a/facebook/res/drawable-xhdpi/com_facebook_button_blue_normal.9.png b/facebook/res/drawable-xhdpi/com_facebook_button_blue_normal.9.png index 1449c8a13f..f5d0e58b55 100644 Binary files a/facebook/res/drawable-xhdpi/com_facebook_button_blue_normal.9.png and b/facebook/res/drawable-xhdpi/com_facebook_button_blue_normal.9.png differ diff --git a/facebook/res/drawable-xhdpi/com_facebook_button_blue_pressed.9.png b/facebook/res/drawable-xhdpi/com_facebook_button_blue_pressed.9.png index 28bd184ed3..3d1c11075f 100644 Binary files a/facebook/res/drawable-xhdpi/com_facebook_button_blue_pressed.9.png and b/facebook/res/drawable-xhdpi/com_facebook_button_blue_pressed.9.png differ diff --git a/facebook/res/drawable-xhdpi/com_facebook_button_grey_focused.9.png b/facebook/res/drawable-xhdpi/com_facebook_button_grey_focused.9.png index bfd883f920..e5b15f9c5c 100644 Binary files a/facebook/res/drawable-xhdpi/com_facebook_button_grey_focused.9.png and b/facebook/res/drawable-xhdpi/com_facebook_button_grey_focused.9.png differ diff --git a/facebook/res/drawable-xhdpi/com_facebook_button_grey_normal.9.png b/facebook/res/drawable-xhdpi/com_facebook_button_grey_normal.9.png index aa98954324..02f28bdd59 100644 Binary files a/facebook/res/drawable-xhdpi/com_facebook_button_grey_normal.9.png and b/facebook/res/drawable-xhdpi/com_facebook_button_grey_normal.9.png differ diff --git a/facebook/res/drawable-xhdpi/com_facebook_button_grey_pressed.9.png b/facebook/res/drawable-xhdpi/com_facebook_button_grey_pressed.9.png index 92f2ad12ac..40e6b04e3e 100644 Binary files a/facebook/res/drawable-xhdpi/com_facebook_button_grey_pressed.9.png and b/facebook/res/drawable-xhdpi/com_facebook_button_grey_pressed.9.png differ diff --git a/facebook/res/drawable-xhdpi/com_facebook_button_like_background.png b/facebook/res/drawable-xhdpi/com_facebook_button_like_background.png index 3c25c433e8..37bb852d27 100644 Binary files a/facebook/res/drawable-xhdpi/com_facebook_button_like_background.png and b/facebook/res/drawable-xhdpi/com_facebook_button_like_background.png differ diff --git a/facebook/res/drawable-xhdpi/com_facebook_button_like_background_selected.png b/facebook/res/drawable-xhdpi/com_facebook_button_like_background_selected.png index accfdfc6e3..954b3f7d1c 100644 Binary files a/facebook/res/drawable-xhdpi/com_facebook_button_like_background_selected.png and b/facebook/res/drawable-xhdpi/com_facebook_button_like_background_selected.png differ diff --git a/facebook/res/drawable-xhdpi/com_facebook_button_like_icon.png b/facebook/res/drawable-xhdpi/com_facebook_button_like_icon.png index db8fcad203..c4d7016b4d 100644 Binary files a/facebook/res/drawable-xhdpi/com_facebook_button_like_icon.png and b/facebook/res/drawable-xhdpi/com_facebook_button_like_icon.png differ diff --git a/facebook/res/drawable-xhdpi/com_facebook_button_like_icon_selected.png b/facebook/res/drawable-xhdpi/com_facebook_button_like_icon_selected.png index 96e9a308b8..ccb98d5e3a 100644 Binary files a/facebook/res/drawable-xhdpi/com_facebook_button_like_icon_selected.png and b/facebook/res/drawable-xhdpi/com_facebook_button_like_icon_selected.png differ diff --git a/facebook/res/drawable-xhdpi/com_facebook_close.png b/facebook/res/drawable-xhdpi/com_facebook_close.png index e3aff5ae5f..b603ef8925 100755 Binary files a/facebook/res/drawable-xhdpi/com_facebook_close.png and b/facebook/res/drawable-xhdpi/com_facebook_close.png differ diff --git a/facebook/res/drawable-xhdpi/com_facebook_inverse_icon.png b/facebook/res/drawable-xhdpi/com_facebook_inverse_icon.png index 4192c48870..4b35eb4363 100644 Binary files a/facebook/res/drawable-xhdpi/com_facebook_inverse_icon.png and b/facebook/res/drawable-xhdpi/com_facebook_inverse_icon.png differ diff --git a/facebook/res/drawable-xhdpi/com_facebook_logo.png b/facebook/res/drawable-xhdpi/com_facebook_logo.png index 24d7fc56b5..401d7bfec4 100644 Binary files a/facebook/res/drawable-xhdpi/com_facebook_logo.png and b/facebook/res/drawable-xhdpi/com_facebook_logo.png differ diff --git a/facebook/res/drawable-xhdpi/com_facebook_picker_magnifier.png b/facebook/res/drawable-xhdpi/com_facebook_picker_magnifier.png index a5b372468c..a5eb056a14 100644 Binary files a/facebook/res/drawable-xhdpi/com_facebook_picker_magnifier.png and b/facebook/res/drawable-xhdpi/com_facebook_picker_magnifier.png differ diff --git a/facebook/res/drawable-xhdpi/com_facebook_tooltip_black_background.9.png b/facebook/res/drawable-xhdpi/com_facebook_tooltip_black_background.9.png index d6f89a731b..43b14c9995 100644 Binary files a/facebook/res/drawable-xhdpi/com_facebook_tooltip_black_background.9.png and b/facebook/res/drawable-xhdpi/com_facebook_tooltip_black_background.9.png differ diff --git a/facebook/res/drawable-xhdpi/com_facebook_tooltip_black_bottomnub.png b/facebook/res/drawable-xhdpi/com_facebook_tooltip_black_bottomnub.png index 71abe544b9..87f9795bca 100644 Binary files a/facebook/res/drawable-xhdpi/com_facebook_tooltip_black_bottomnub.png and b/facebook/res/drawable-xhdpi/com_facebook_tooltip_black_bottomnub.png differ diff --git a/facebook/res/drawable-xhdpi/com_facebook_tooltip_black_topnub.png b/facebook/res/drawable-xhdpi/com_facebook_tooltip_black_topnub.png index 2ac32dbc24..4d3f58f6ed 100644 Binary files a/facebook/res/drawable-xhdpi/com_facebook_tooltip_black_topnub.png and b/facebook/res/drawable-xhdpi/com_facebook_tooltip_black_topnub.png differ diff --git a/facebook/res/drawable-xhdpi/com_facebook_tooltip_black_xout.png b/facebook/res/drawable-xhdpi/com_facebook_tooltip_black_xout.png index e3d562b609..6cd7bc8d96 100644 Binary files a/facebook/res/drawable-xhdpi/com_facebook_tooltip_black_xout.png and b/facebook/res/drawable-xhdpi/com_facebook_tooltip_black_xout.png differ diff --git a/facebook/res/drawable-xhdpi/com_facebook_tooltip_blue_background.9.png b/facebook/res/drawable-xhdpi/com_facebook_tooltip_blue_background.9.png index a1978044ca..7614b95c34 100644 Binary files a/facebook/res/drawable-xhdpi/com_facebook_tooltip_blue_background.9.png and b/facebook/res/drawable-xhdpi/com_facebook_tooltip_blue_background.9.png differ diff --git a/facebook/res/drawable-xhdpi/com_facebook_tooltip_blue_bottomnub.png b/facebook/res/drawable-xhdpi/com_facebook_tooltip_blue_bottomnub.png index cee80f1298..d29b952421 100644 Binary files a/facebook/res/drawable-xhdpi/com_facebook_tooltip_blue_bottomnub.png and b/facebook/res/drawable-xhdpi/com_facebook_tooltip_blue_bottomnub.png differ diff --git a/facebook/res/drawable-xhdpi/com_facebook_tooltip_blue_topnub.png b/facebook/res/drawable-xhdpi/com_facebook_tooltip_blue_topnub.png index 2ec445e5dd..d2dc678ee9 100644 Binary files a/facebook/res/drawable-xhdpi/com_facebook_tooltip_blue_topnub.png and b/facebook/res/drawable-xhdpi/com_facebook_tooltip_blue_topnub.png differ diff --git a/facebook/res/drawable-xhdpi/com_facebook_tooltip_blue_xout.png b/facebook/res/drawable-xhdpi/com_facebook_tooltip_blue_xout.png index 7fd57632d6..e9bc616f1e 100644 Binary files a/facebook/res/drawable-xhdpi/com_facebook_tooltip_blue_xout.png and b/facebook/res/drawable-xhdpi/com_facebook_tooltip_blue_xout.png differ diff --git a/facebook/res/drawable-xxhdpi/com_facebook_button_like_background.png b/facebook/res/drawable-xxhdpi/com_facebook_button_like_background.png index bead08dc5d..02d902cfef 100644 Binary files a/facebook/res/drawable-xxhdpi/com_facebook_button_like_background.png and b/facebook/res/drawable-xxhdpi/com_facebook_button_like_background.png differ diff --git a/facebook/res/drawable-xxhdpi/com_facebook_button_like_background_selected.png b/facebook/res/drawable-xxhdpi/com_facebook_button_like_background_selected.png index 85e4e873c8..cb76c177a4 100644 Binary files a/facebook/res/drawable-xxhdpi/com_facebook_button_like_background_selected.png and b/facebook/res/drawable-xxhdpi/com_facebook_button_like_background_selected.png differ diff --git a/facebook/res/drawable-xxhdpi/com_facebook_button_like_icon.png b/facebook/res/drawable-xxhdpi/com_facebook_button_like_icon.png index 1d67cab7b0..88d2169daa 100644 Binary files a/facebook/res/drawable-xxhdpi/com_facebook_button_like_icon.png and b/facebook/res/drawable-xxhdpi/com_facebook_button_like_icon.png differ diff --git a/facebook/res/drawable-xxhdpi/com_facebook_button_like_icon_selected.png b/facebook/res/drawable-xxhdpi/com_facebook_button_like_icon_selected.png index 45319d90ba..41137fc92b 100644 Binary files a/facebook/res/drawable-xxhdpi/com_facebook_button_like_icon_selected.png and b/facebook/res/drawable-xxhdpi/com_facebook_button_like_icon_selected.png differ diff --git a/facebook/res/drawable/com_facebook_button_blue_focused.9.png b/facebook/res/drawable/com_facebook_button_blue_focused.9.png index cfb7a015c7..86bd877404 100644 Binary files a/facebook/res/drawable/com_facebook_button_blue_focused.9.png and b/facebook/res/drawable/com_facebook_button_blue_focused.9.png differ diff --git a/facebook/res/drawable/com_facebook_button_blue_normal.9.png b/facebook/res/drawable/com_facebook_button_blue_normal.9.png index 1e93901338..74e5ce199c 100644 Binary files a/facebook/res/drawable/com_facebook_button_blue_normal.9.png and b/facebook/res/drawable/com_facebook_button_blue_normal.9.png differ diff --git a/facebook/res/drawable/com_facebook_button_blue_pressed.9.png b/facebook/res/drawable/com_facebook_button_blue_pressed.9.png index d8427fdefd..8fd28f704e 100644 Binary files a/facebook/res/drawable/com_facebook_button_blue_pressed.9.png and b/facebook/res/drawable/com_facebook_button_blue_pressed.9.png differ diff --git a/facebook/res/drawable/com_facebook_button_check_off.png b/facebook/res/drawable/com_facebook_button_check_off.png index e9737df5c5..c25695d538 100644 Binary files a/facebook/res/drawable/com_facebook_button_check_off.png and b/facebook/res/drawable/com_facebook_button_check_off.png differ diff --git a/facebook/res/drawable/com_facebook_button_grey_focused.9.png b/facebook/res/drawable/com_facebook_button_grey_focused.9.png index 56f6035719..becfe54fd4 100644 Binary files a/facebook/res/drawable/com_facebook_button_grey_focused.9.png and b/facebook/res/drawable/com_facebook_button_grey_focused.9.png differ diff --git a/facebook/res/drawable/com_facebook_button_grey_normal.9.png b/facebook/res/drawable/com_facebook_button_grey_normal.9.png index dff3b7d73e..f0a07f85cc 100644 Binary files a/facebook/res/drawable/com_facebook_button_grey_normal.9.png and b/facebook/res/drawable/com_facebook_button_grey_normal.9.png differ diff --git a/facebook/res/drawable/com_facebook_button_grey_pressed.9.png b/facebook/res/drawable/com_facebook_button_grey_pressed.9.png index 46648efcdd..d1c9663133 100644 Binary files a/facebook/res/drawable/com_facebook_button_grey_pressed.9.png and b/facebook/res/drawable/com_facebook_button_grey_pressed.9.png differ diff --git a/facebook/res/drawable/com_facebook_button_like_background.png b/facebook/res/drawable/com_facebook_button_like_background.png index e7723b5a0b..899da52725 100644 Binary files a/facebook/res/drawable/com_facebook_button_like_background.png and b/facebook/res/drawable/com_facebook_button_like_background.png differ diff --git a/facebook/res/drawable/com_facebook_button_like_background_selected.png b/facebook/res/drawable/com_facebook_button_like_background_selected.png index 68c70bcee8..7983647302 100644 Binary files a/facebook/res/drawable/com_facebook_button_like_background_selected.png and b/facebook/res/drawable/com_facebook_button_like_background_selected.png differ diff --git a/facebook/res/drawable/com_facebook_button_like_icon.png b/facebook/res/drawable/com_facebook_button_like_icon.png index 30a9555924..51d72dd328 100644 Binary files a/facebook/res/drawable/com_facebook_button_like_icon.png and b/facebook/res/drawable/com_facebook_button_like_icon.png differ diff --git a/facebook/res/drawable/com_facebook_button_like_icon_selected.png b/facebook/res/drawable/com_facebook_button_like_icon_selected.png index ead35ca295..9834a4c144 100644 Binary files a/facebook/res/drawable/com_facebook_button_like_icon_selected.png and b/facebook/res/drawable/com_facebook_button_like_icon_selected.png differ diff --git a/facebook/res/drawable/com_facebook_close.png b/facebook/res/drawable/com_facebook_close.png index ad0147460f..4ffc94cdce 100755 Binary files a/facebook/res/drawable/com_facebook_close.png and b/facebook/res/drawable/com_facebook_close.png differ diff --git a/facebook/res/drawable/com_facebook_inverse_icon.png b/facebook/res/drawable/com_facebook_inverse_icon.png index a806a2f5dc..b4afa5443b 100644 Binary files a/facebook/res/drawable/com_facebook_inverse_icon.png and b/facebook/res/drawable/com_facebook_inverse_icon.png differ diff --git a/facebook/res/drawable/com_facebook_list_divider.9.png b/facebook/res/drawable/com_facebook_list_divider.9.png index 7d4c46c477..4c0df07682 100644 Binary files a/facebook/res/drawable/com_facebook_list_divider.9.png and b/facebook/res/drawable/com_facebook_list_divider.9.png differ diff --git a/facebook/res/drawable/com_facebook_list_section_header_background.9.png b/facebook/res/drawable/com_facebook_list_section_header_background.9.png index 1763c4a648..0ee16ffb6d 100644 Binary files a/facebook/res/drawable/com_facebook_list_section_header_background.9.png and b/facebook/res/drawable/com_facebook_list_section_header_background.9.png differ diff --git a/facebook/res/drawable/com_facebook_logo.png b/facebook/res/drawable/com_facebook_logo.png index 785acf9eac..8e6a514a69 100644 Binary files a/facebook/res/drawable/com_facebook_logo.png and b/facebook/res/drawable/com_facebook_logo.png differ diff --git a/facebook/res/drawable/com_facebook_picker_list_focused.9.png b/facebook/res/drawable/com_facebook_picker_list_focused.9.png index 7c0599e3a6..3efadc3529 100644 Binary files a/facebook/res/drawable/com_facebook_picker_list_focused.9.png and b/facebook/res/drawable/com_facebook_picker_list_focused.9.png differ diff --git a/facebook/res/drawable/com_facebook_picker_list_longpressed.9.png b/facebook/res/drawable/com_facebook_picker_list_longpressed.9.png index 3bf8e03623..5fcd5b207a 100644 Binary files a/facebook/res/drawable/com_facebook_picker_list_longpressed.9.png and b/facebook/res/drawable/com_facebook_picker_list_longpressed.9.png differ diff --git a/facebook/res/drawable/com_facebook_picker_list_pressed.9.png b/facebook/res/drawable/com_facebook_picker_list_pressed.9.png index 6e77525d2d..0e557469e9 100644 Binary files a/facebook/res/drawable/com_facebook_picker_list_pressed.9.png and b/facebook/res/drawable/com_facebook_picker_list_pressed.9.png differ diff --git a/facebook/res/drawable/com_facebook_picker_list_selector_disabled.9.png b/facebook/res/drawable/com_facebook_picker_list_selector_disabled.9.png index 42cb6463e4..10851f6c87 100644 Binary files a/facebook/res/drawable/com_facebook_picker_list_selector_disabled.9.png and b/facebook/res/drawable/com_facebook_picker_list_selector_disabled.9.png differ diff --git a/facebook/res/drawable/com_facebook_profile_picture_blank_portrait.png b/facebook/res/drawable/com_facebook_profile_picture_blank_portrait.png index 107d7f89e6..27a6f7a741 100644 Binary files a/facebook/res/drawable/com_facebook_profile_picture_blank_portrait.png and b/facebook/res/drawable/com_facebook_profile_picture_blank_portrait.png differ diff --git a/facebook/res/drawable/com_facebook_profile_picture_blank_square.png b/facebook/res/drawable/com_facebook_profile_picture_blank_square.png index 8b4a76a0ef..77554e01fb 100644 Binary files a/facebook/res/drawable/com_facebook_profile_picture_blank_square.png and b/facebook/res/drawable/com_facebook_profile_picture_blank_square.png differ diff --git a/facebook/src/com/facebook/NativeAppCallAttachmentStore.java b/facebook/src/com/facebook/NativeAppCallAttachmentStore.java index 3704be2749..aa7f39ed7a 100644 --- a/facebook/src/com/facebook/NativeAppCallAttachmentStore.java +++ b/facebook/src/com/facebook/NativeAppCallAttachmentStore.java @@ -76,22 +76,22 @@ public void processAttachment(Bitmap attachment, File outputFile) throws IOExcep } /** - * Adds a number of bitmap attachment files associated with a native app call. The attachments will be + * Adds a number of bitmap/video attachment files associated with a native app call. The attachments will be * served via {@link NativeAppCallContentProvider#openFile(android.net.Uri, String) openFile}. * * @param context the Context the call is being made from * @param callId the unique ID of the call - * @param imageAttachments a Map of attachment names to Files containing the bitmaps; the attachment names will be - * part of the URI processed by openFile + * @param mediaAttachmentFiles a Map of attachment names to Files containing the bitmaps/videos; the attachment + * names will be part of the URI processed by openFile * @throws java.io.IOException */ - public void addAttachmentFilesForCall(Context context, UUID callId, Map imageAttachmentFiles) { + public void addAttachmentFilesForCall(Context context, UUID callId, Map mediaAttachmentFiles) { Validate.notNull(context, "context"); Validate.notNull(callId, "callId"); - Validate.containsNoNulls(imageAttachmentFiles.values(), "imageAttachmentFiles"); - Validate.containsNoNullOrEmpty(imageAttachmentFiles.keySet(), "imageAttachmentFiles"); + Validate.containsNoNulls(mediaAttachmentFiles.values(), "mediaAttachmentFiles"); + Validate.containsNoNullOrEmpty(mediaAttachmentFiles.keySet(), "mediaAttachmentFiles"); - addAttachments(context, callId, imageAttachmentFiles, new ProcessAttachment() { + addAttachments(context, callId, mediaAttachmentFiles, new ProcessAttachment() { @Override public void processAttachment(File attachment, File outputFile) throws IOException { FileOutputStream outputStream = new FileOutputStream(outputFile); diff --git a/facebook/src/com/facebook/internal/AnalyticsEvents.java b/facebook/src/com/facebook/internal/AnalyticsEvents.java index a7b8038eef..9488e0c8d4 100644 --- a/facebook/src/com/facebook/internal/AnalyticsEvents.java +++ b/facebook/src/com/facebook/internal/AnalyticsEvents.java @@ -37,6 +37,7 @@ public class AnalyticsEvents { public static final String EVENT_NATIVE_DIALOG_TYPE_OG_MESSAGE = "fb_dialogs_present_message_og"; public static final String EVENT_NATIVE_DIALOG_TYPE_PHOTO_SHARE = "fb_dialogs_present_share_photo"; public static final String EVENT_NATIVE_DIALOG_TYPE_PHOTO_MESSAGE = "fb_dialogs_present_message_photo"; + public static final String EVENT_NATIVE_DIALOG_TYPE_VIDEO_SHARE = "fb_dialogs_present_share_video"; public static final String EVENT_NATIVE_DIALOG_TYPE_LIKE = "fb_dialogs_present_like"; public static final String EVENT_LIKE_VIEW_CANNOT_PRESENT_DIALOG = "fb_like_control_cannot_present_dialog"; diff --git a/facebook/src/com/facebook/internal/FacebookWebFallbackDialog.java b/facebook/src/com/facebook/internal/FacebookWebFallbackDialog.java index 2a2f4b603d..a042c918e6 100644 --- a/facebook/src/com/facebook/internal/FacebookWebFallbackDialog.java +++ b/facebook/src/com/facebook/internal/FacebookWebFallbackDialog.java @@ -24,14 +24,11 @@ import android.os.Looper; import android.webkit.WebView; import com.facebook.FacebookException; -import com.facebook.android.Util; import com.facebook.widget.FacebookDialog; import com.facebook.widget.WebDialog; import org.json.JSONException; import org.json.JSONObject; -import java.util.EnumSet; - /** * com.facebook.internal is solely for the use of other packages within the Facebook SDK for Android. Use of * any of the classes in this package is unsupported, and they may be modified or removed without warning at diff --git a/facebook/src/com/facebook/internal/LikeActionController.java b/facebook/src/com/facebook/internal/LikeActionController.java index d16af520d7..70e9fecfcf 100644 --- a/facebook/src/com/facebook/internal/LikeActionController.java +++ b/facebook/src/com/facebook/internal/LikeActionController.java @@ -683,15 +683,31 @@ private FacebookDialog.Callback getFacebookDialogCallback(final Bundle analytics return new FacebookDialog.Callback() { @Override public void onComplete(FacebookDialog.PendingCall pendingCall, Bundle data) { - if (!data.containsKey(LIKE_DIALOG_RESPONSE_OBJECT_IS_LIKED_KEY)) { - // This is an empty result that we can't handle. Don't lose like state. + if (data == null || !data.containsKey(LIKE_DIALOG_RESPONSE_OBJECT_IS_LIKED_KEY)) { + // This is an empty result that we can't handle. return; } boolean isObjectLiked = data.getBoolean(LIKE_DIALOG_RESPONSE_OBJECT_IS_LIKED_KEY); - String likeCountString = data.getString(LIKE_DIALOG_RESPONSE_LIKE_COUNT_STRING_KEY); - String socialSentence = data.getString(LIKE_DIALOG_RESPONSE_SOCIAL_SENTENCE_KEY); - String unlikeToken = data.getString(LIKE_DIALOG_RESPONSE_UNLIKE_TOKEN_KEY); + + // Default to known/cached state, if properties are missing. + String likeCountStringWithLike = LikeActionController.this.likeCountStringWithLike; + String likeCountStringWithoutLike = LikeActionController.this.likeCountStringWithoutLike; + if (data.containsKey(LIKE_DIALOG_RESPONSE_LIKE_COUNT_STRING_KEY)) { + likeCountStringWithLike = data.getString(LIKE_DIALOG_RESPONSE_LIKE_COUNT_STRING_KEY); + likeCountStringWithoutLike = likeCountStringWithLike; + } + + String socialSentenceWithLike = LikeActionController.this.socialSentenceWithLike; + String socialSentenceWithoutWithoutLike = LikeActionController.this.socialSentenceWithoutLike; + if (data.containsKey(LIKE_DIALOG_RESPONSE_SOCIAL_SENTENCE_KEY)) { + socialSentenceWithLike = data.getString(LIKE_DIALOG_RESPONSE_SOCIAL_SENTENCE_KEY); + socialSentenceWithoutWithoutLike = socialSentenceWithLike; + } + + String unlikeToken = data.containsKey(LIKE_DIALOG_RESPONSE_OBJECT_IS_LIKED_KEY) + ? data.getString(LIKE_DIALOG_RESPONSE_UNLIKE_TOKEN_KEY) + : LikeActionController.this.unlikeToken; Bundle logParams = (analyticsParameters == null) ? new Bundle() : analyticsParameters; logParams.putString(AnalyticsEvents.PARAMETER_CALL_ID, pendingCall.getCallId().toString()); @@ -699,10 +715,10 @@ public void onComplete(FacebookDialog.PendingCall pendingCall, Bundle data) { updateState( isObjectLiked, - likeCountString, - likeCountString, - socialSentence, - socialSentence, + likeCountStringWithLike, + likeCountStringWithoutLike, + socialSentenceWithLike, + socialSentenceWithoutWithoutLike, unlikeToken); } @@ -918,17 +934,37 @@ private void refreshStatusViaService() { LikeStatusClient.CompletedListener callback = new LikeStatusClient.CompletedListener() { @Override public void completed(Bundle result) { + // Don't lose old state if the service response is incomplete. if (result == null || !result.containsKey(NativeProtocol.EXTRA_OBJECT_IS_LIKED)) { - // Don't lose old state if the service response is incomplete. return; } boolean objectIsLiked = result.getBoolean(NativeProtocol.EXTRA_OBJECT_IS_LIKED); - String likeCountWithLike = result.getString(NativeProtocol.EXTRA_LIKE_COUNT_STRING_WITH_LIKE); - String likeCountWithoutLike = result.getString(NativeProtocol.EXTRA_LIKE_COUNT_STRING_WITHOUT_LIKE); - String socialSentenceWithLike = result.getString(NativeProtocol.EXTRA_SOCIAL_SENTENCE_WITH_LIKE); - String socialSentenceWithoutLike = result.getString(NativeProtocol.EXTRA_SOCIAL_SENTENCE_WITHOUT_LIKE); - String unlikeToken = result.getString(NativeProtocol.EXTRA_UNLIKE_TOKEN); + + String likeCountWithLike = + result.containsKey(NativeProtocol.EXTRA_LIKE_COUNT_STRING_WITH_LIKE) + ? result.getString(NativeProtocol.EXTRA_LIKE_COUNT_STRING_WITH_LIKE) + : LikeActionController.this.likeCountStringWithLike; + + String likeCountWithoutLike = + result.containsKey(NativeProtocol.EXTRA_LIKE_COUNT_STRING_WITHOUT_LIKE) + ? result.getString(NativeProtocol.EXTRA_LIKE_COUNT_STRING_WITHOUT_LIKE) + : LikeActionController.this.likeCountStringWithoutLike; + + String socialSentenceWithLike = + result.containsKey(NativeProtocol.EXTRA_SOCIAL_SENTENCE_WITH_LIKE) + ? result.getString(NativeProtocol.EXTRA_SOCIAL_SENTENCE_WITH_LIKE) + : LikeActionController.this.socialSentenceWithLike; + + String socialSentenceWithoutLike = + result.containsKey(NativeProtocol.EXTRA_SOCIAL_SENTENCE_WITHOUT_LIKE) + ? result.getString(NativeProtocol.EXTRA_SOCIAL_SENTENCE_WITHOUT_LIKE) + : LikeActionController.this.socialSentenceWithoutLike; + + String unlikeToken = + result.containsKey(NativeProtocol.EXTRA_UNLIKE_TOKEN) + ? result.getString(NativeProtocol.EXTRA_UNLIKE_TOKEN) + : LikeActionController.this.unlikeToken; updateState( objectIsLiked, @@ -1162,7 +1198,9 @@ protected void processError(FacebookRequestError error) { } private class GetOGObjectLikesRequestWrapper extends AbstractRequestWrapper { - boolean objectIsLiked; + // Initialize the like status to what we currently have. This way, empty/error responses don't end + // up clearing out the state. + boolean objectIsLiked = LikeActionController.this.isObjectLiked; String unlikeToken; GetOGObjectLikesRequestWrapper(String objectId) { @@ -1204,10 +1242,12 @@ protected void processError(FacebookRequestError error) { } private class GetEngagementRequestWrapper extends AbstractRequestWrapper { - String likeCountStringWithLike; - String likeCountStringWithoutLike; - String socialSentenceStringWithLike; - String socialSentenceStringWithoutLike; + // Initialize the like status to what we currently have. This way, empty/error responses don't end + // up clearing out the state. + String likeCountStringWithLike = LikeActionController.this.likeCountStringWithLike; + String likeCountStringWithoutLike = LikeActionController.this.likeCountStringWithoutLike; + String socialSentenceStringWithLike = LikeActionController.this.socialSentenceWithLike; + String socialSentenceStringWithoutLike = LikeActionController.this.socialSentenceWithoutLike; GetEngagementRequestWrapper(String objectId) { super(objectId); @@ -1228,10 +1268,18 @@ private class GetEngagementRequestWrapper extends AbstractRequestWrapper { protected void processSuccess(Response response) { JSONObject engagementResults = Utility.tryGetJSONObjectFromResponse(response.getGraphObject(), "engagement"); if (engagementResults != null) { - likeCountStringWithLike = engagementResults.optString("count_string_with_like"); - likeCountStringWithoutLike = engagementResults.optString("count_string_without_like"); - socialSentenceStringWithLike = engagementResults.optString("social_sentence_with_like"); - socialSentenceStringWithoutLike = engagementResults.optString("social_sentence_without_like"); + // Missing properties in the response should default to cached like status + likeCountStringWithLike = + engagementResults.optString("count_string_with_like", likeCountStringWithLike); + + likeCountStringWithoutLike = + engagementResults.optString("count_string_without_like", likeCountStringWithoutLike); + + socialSentenceStringWithLike = + engagementResults.optString("social_sentence_with_like", socialSentenceStringWithLike); + + socialSentenceStringWithoutLike = + engagementResults.optString("social_sentence_without_like", socialSentenceStringWithoutLike); } } diff --git a/facebook/src/com/facebook/internal/NativeProtocol.java b/facebook/src/com/facebook/internal/NativeProtocol.java index aae17e8943..66795855a4 100644 --- a/facebook/src/com/facebook/internal/NativeProtocol.java +++ b/facebook/src/com/facebook/internal/NativeProtocol.java @@ -62,6 +62,8 @@ public final class NativeProtocol { public static final int PROTOCOL_VERSION_20140324 = 20140324; public static final int PROTOCOL_VERSION_20140701 = 20140701; public static final int PROTOCOL_VERSION_20141001 = 20141001; + public static final int PROTOCOL_VERSION_20141028 = 20141028; + public static final int PROTOCOL_VERSION_20141107 = 20141107; // Bucketed Result Intents public static final String EXTRA_PROTOCOL_VERSION = "com.facebook.platform.protocol.PROTOCOL_VERSION"; public static final String EXTRA_PROTOCOL_ACTION = "com.facebook.platform.protocol.PROTOCOL_ACTION"; @@ -150,6 +152,11 @@ public final class NativeProtocol { "com.facebook.platform.extra.EXPIRES_SECONDS_SINCE_EPOCH"; // EXTRA_PERMISSIONS + public static final String RESULT_ARGS_ACCESS_TOKEN = "access_token"; + public static final String RESULT_ARGS_EXPIRES_SECONDS_SINCE_EPOCH = + "expires_seconds_since_epoch"; + public static final String RESULT_ARGS_PERMISSIONS = "permissions"; + // Extras supported for ACTION_FEED_DIALOG: public static final String EXTRA_PLACE_TAG = "com.facebook.platform.extra.PLACE"; public static final String EXTRA_FRIEND_TAGS = "com.facebook.platform.extra.FRIENDS"; @@ -172,6 +179,7 @@ public final class NativeProtocol { public static final String METHOD_ARGS_REF = "REF"; public static final String METHOD_ARGS_DATA_FAILURES_FATAL = "DATA_FAILURES_FATAL"; public static final String METHOD_ARGS_PHOTOS = "PHOTOS"; + public static final String METHOD_ARGS_VIDEO = "VIDEO"; // Extras supported for ACTION_OGACTIONPUBLISH_DIALOG: public static final String EXTRA_ACTION = "com.facebook.platform.extra.ACTION"; @@ -213,6 +221,12 @@ public final class NativeProtocol { public static final String STATUS_ERROR_SUBCODE = "com.facebook.platform.status.ERROR_SUBCODE"; public static final String STATUS_ERROR_JSON = "com.facebook.platform.status.ERROR_JSON"; + public static final String BRIDGE_ARG_ERROR_TYPE = "error_type"; + public static final String BRIDGE_ARG_ERROR_DESCRIPTION = "error_description"; + public static final String BRIDGE_ARG_ERROR_CODE = "error_code"; + public static final String BRIDGE_ARG_ERROR_SUBCODE = "error_subcode"; + public static final String BRIDGE_ARG_ERROR_JSON = "error_json"; + // Expected values for ERROR_KEY_TYPE. Clients should tolerate other values: public static final String ERROR_UNKNOWN_ERROR = "UnknownError"; public static final String ERROR_PROTOCOL_ERROR = "ProtocolError"; @@ -428,6 +442,8 @@ public static final int getLatestKnownVersion() { // Note: be sure this stays sorted in descending order; add new versions at the beginning private static final List KNOWN_PROTOCOL_VERSIONS = Arrays.asList( + PROTOCOL_VERSION_20141107, + PROTOCOL_VERSION_20141028, PROTOCOL_VERSION_20141001, PROTOCOL_VERSION_20140701, PROTOCOL_VERSION_20140324, @@ -578,8 +594,6 @@ public static Bundle getErrorDataFromResultIntent(Intent resultIntent) { Bundle bridgeArgs = getBridgeArgumentsFromIntent(resultIntent); if (bridgeArgs != null) { return bridgeArgs.getBundle(BRIDGE_ARG_ERROR_BUNDLE); - - } return resultIntent.getExtras(); @@ -590,10 +604,15 @@ public static Exception getExceptionFromErrorData(Bundle errorData) { return null; } - // TODO This is not going to work for JS dialogs, where the keys are not STATUS_ERROR_TYPE etc. - // TODO However, it should keep existing dialogs functional - String type = errorData.getString(STATUS_ERROR_TYPE); - String description = errorData.getString(STATUS_ERROR_DESCRIPTION); + String type = errorData.getString(BRIDGE_ARG_ERROR_TYPE); + if (type == null) { + type = errorData.getString(STATUS_ERROR_TYPE); + } + + String description = errorData.getString(BRIDGE_ARG_ERROR_DESCRIPTION); + if (description == null) { + description = errorData.getString(STATUS_ERROR_DESCRIPTION); + } if (type != null && type.equalsIgnoreCase(ERROR_USER_CANCELED)) { return new FacebookOperationCanceledException(description); diff --git a/facebook/src/com/facebook/widget/FacebookDialog.java b/facebook/src/com/facebook/widget/FacebookDialog.java index 05faf025b2..ee6a5950bb 100644 --- a/facebook/src/com/facebook/widget/FacebookDialog.java +++ b/facebook/src/com/facebook/widget/FacebookDialog.java @@ -52,6 +52,10 @@ public class FacebookDialog { "com.facebook.platform.extra.COMPLETION_GESTURE"; private static final String EXTRA_DIALOG_COMPLETION_ID_KEY = "com.facebook.platform.extra.POST_ID"; + public static final String RESULT_ARGS_DIALOG_COMPLETE_KEY = "didComplete"; + public static final String RESULT_ARGS_DIALOG_COMPLETION_GESTURE_KEY = "completionGesture"; + public static final String RESULT_ARGS_DIALOG_COMPLETION_ID_KEY = "postId"; + private static NativeAppCallAttachmentStore attachmentStore; /** @@ -123,6 +127,10 @@ public enum ShareDialogFeature implements DialogFeature { * Indicates whether the native Share dialog supports sharing of photo images. */ PHOTOS(NativeProtocol.PROTOCOL_VERSION_20140204), + /** + * Indicates whether the native Share dialog supports sharing of videos. + */ + VIDEO(NativeProtocol.PROTOCOL_VERSION_20141028), ; private int minVersion; @@ -274,6 +282,9 @@ interface OnPresentCallback { * @return true if the native dialog completed normally */ public static boolean getNativeDialogDidComplete(Bundle result) { + if (result.containsKey(RESULT_ARGS_DIALOG_COMPLETE_KEY)) { + return result.getBoolean(RESULT_ARGS_DIALOG_COMPLETE_KEY); + } return result.getBoolean(EXTRA_DIALOG_COMPLETE_KEY, false); } @@ -285,6 +296,9 @@ public static boolean getNativeDialogDidComplete(Bundle result) { * @return "post" or "cancel" as the completion gesture */ public static String getNativeDialogCompletionGesture(Bundle result) { + if (result.containsKey(RESULT_ARGS_DIALOG_COMPLETION_GESTURE_KEY)) { + return result.getString(RESULT_ARGS_DIALOG_COMPLETION_GESTURE_KEY); + } return result.getString(EXTRA_DIALOG_COMPLETION_GESTURE_KEY); } @@ -296,6 +310,9 @@ public static String getNativeDialogCompletionGesture(Bundle result) { * @return the id of the published post */ public static String getNativeDialogPostId(Bundle result) { + if (result.containsKey(RESULT_ARGS_DIALOG_COMPLETION_ID_KEY)) { + return result.getString(RESULT_ARGS_DIALOG_COMPLETION_ID_KEY); + } return result.getString(EXTRA_DIALOG_COMPLETION_ID_KEY); } @@ -503,14 +520,29 @@ private static void logDialogActivity(Activity activity, Fragment fragment, Stri static private String getEventName(Intent intent) { String action = intent.getStringExtra(NativeProtocol.EXTRA_PROTOCOL_ACTION); boolean hasPhotos = intent.hasExtra(NativeProtocol.EXTRA_PHOTOS); - return getEventName(action, hasPhotos); + boolean hasVideo = false; + + Bundle extras = intent.getBundleExtra(NativeProtocol.EXTRA_PROTOCOL_METHOD_ARGS); + if (extras != null) { + ArrayList photo = extras.getStringArrayList(NativeProtocol.METHOD_ARGS_PHOTOS); + String video = extras.getString(NativeProtocol.METHOD_ARGS_VIDEO); + if (photo != null && !photo.isEmpty()) { + hasPhotos = true; + } + if (video != null && !video.isEmpty()) { + hasVideo = true; + } + } + return getEventName(action, hasPhotos, hasVideo); } - static private String getEventName(String action, boolean hasPhotos) { + static private String getEventName(String action, boolean hasPhotos, boolean hasVideo) { String eventName; if (action.equals(NativeProtocol.ACTION_FEED_DIALOG)) { - eventName = hasPhotos ? + eventName = hasVideo ? + AnalyticsEvents.EVENT_NATIVE_DIALOG_TYPE_VIDEO_SHARE : + hasPhotos ? AnalyticsEvents.EVENT_NATIVE_DIALOG_TYPE_PHOTO_SHARE : AnalyticsEvents.EVENT_NATIVE_DIALOG_TYPE_SHARE; } else if (action.equals(NativeProtocol.ACTION_MESSAGE_DIALOG)) { @@ -543,7 +575,7 @@ public abstract static class Builder> { protected Fragment fragment; protected String applicationName; protected HashMap imageAttachments = new HashMap(); - protected HashMap imageAttachmentFiles = new HashMap(); + protected HashMap mediaAttachmentFiles = new HashMap(); /** * Constructor. @@ -632,7 +664,7 @@ public FacebookDialog build() { extras); if (intent == null) { logDialogActivity(activity, fragment, - getEventName(action, extras.containsKey(NativeProtocol.EXTRA_PHOTOS)), + getEventName(action, extras.containsKey(NativeProtocol.EXTRA_PHOTOS), false), AnalyticsEvents.PARAMETER_DIALOG_OUTCOME_VALUE_FAILED); throw new FacebookException( @@ -714,9 +746,9 @@ public void onPresent(Context context) throws Exception { if (imageAttachments != null && imageAttachments.size() > 0) { getAttachmentStore().addAttachmentsForCall(context, appCall.getCallId(), imageAttachments); } - if (imageAttachmentFiles != null && imageAttachmentFiles.size() > 0) { + if (mediaAttachmentFiles != null && mediaAttachmentFiles.size() > 0) { getAttachmentStore().addAttachmentFilesForCall(context, appCall.getCallId(), - imageAttachmentFiles); + mediaAttachmentFiles); } } }; @@ -752,6 +784,14 @@ protected List addImageAttachmentFiles(Collection bitmapFiles) { return attachmentUrls; } + protected String addVideoAttachmentFile(File videoFile) { + String attachmentName = UUID.randomUUID().toString(); + addVideoAttachment(attachmentName, videoFile); + String url = NativeAppCallContentProvider.getAttachmentUrl(applicationId, appCall.getCallId(), + attachmentName); + return url; + } + List getImageAttachmentNames() { return new ArrayList(imageAttachments.keySet()); } @@ -779,7 +819,14 @@ protected CONCRETE addImageAttachment(String imageName, Bitmap bitmap) { } protected CONCRETE addImageAttachment(String imageName, File attachment) { - imageAttachmentFiles.put(imageName, attachment); + mediaAttachmentFiles.put(imageName, attachment); + @SuppressWarnings("unchecked") + CONCRETE result = (CONCRETE) this; + return result; + } + + protected CONCRETE addVideoAttachment(String videoName, File attachment) { + mediaAttachmentFiles.put(videoName, attachment); @SuppressWarnings("unchecked") CONCRETE result = (CONCRETE) this; return result; @@ -891,7 +938,7 @@ public CONCRETE setPlace(String place) { * @return this instance of the builder */ public CONCRETE setFriends(List friends) { - this.friends = new ArrayList(friends); + this.friends = (friends == null ? null : new ArrayList(friends)); @SuppressWarnings("unchecked") CONCRETE result = (CONCRETE) this; return result; @@ -1023,7 +1070,7 @@ public CONCRETE setPlace(String place) { * @return this instance of the builder */ public CONCRETE setFriends(List friends) { - this.friends = new ArrayList(friends); + this.friends = (friends == null ? null : new ArrayList(friends)); @SuppressWarnings("unchecked") CONCRETE result = (CONCRETE) this; return result; @@ -1184,6 +1231,88 @@ public PhotoMessageDialogBuilder setFriends(List friends) { } } + private static abstract class VideoDialogBuilderBase> + extends Builder { + private String place; + private String videoAttachmentUrl; + + /** + * Constructor. + * + * @param activity the Activity which is presenting the native Share dialog; must not be null + */ + public VideoDialogBuilderBase(Activity activity) { + super(activity); + } + + /** + * Sets the place for the item to be shared. + * + * @param place the Facebook ID of the place + * @return this instance of the builder + */ + public CONCRETE setPlace(String place) { + this.place = place; + @SuppressWarnings("unchecked") + CONCRETE result = (CONCRETE) this; + return result; + } + + /** + * Adds a video to display in the native Share dialog, by specifying the location in the file system. + * The dialog's callback will be called once the user has shared the video, but the video may be uploaded + * in the background by the Facebook app; apps wishing to be notified when the video upload has succeeded + * or failed should extend the FacebookBroadcastReceiver class and register it in their AndroidManifest.xml. + * @param video a Files representing the video to be uploaded + * @return this instance of the builder + */ + public CONCRETE addVideoFile(File video) { + this.videoAttachmentUrl = addVideoAttachmentFile(video); + @SuppressWarnings("unchecked") + CONCRETE result = (CONCRETE) this; + return result; + } + + @Override + void validate() { + super.validate(); + + if (videoAttachmentUrl == null || videoAttachmentUrl.isEmpty()) { + throw new FacebookException("Must specify at least one video."); + } + } + + @Override + protected Bundle getMethodArguments() { + Bundle methodArgs = new Bundle(); + putExtra(methodArgs, NativeProtocol.METHOD_ARGS_PLACE_TAG, place); + methodArgs.putString(NativeProtocol.METHOD_ARGS_VIDEO, videoAttachmentUrl); + return methodArgs; + } + } + + /** + * Provides a builder which can construct a FacebookDialog instance suitable for presenting the native + * Share dialog for sharing videos. This builder will throw an exception if the Facebook application is not + * installed, so it should only be used if {@link FacebookDialog#canPresentShareDialog(android.content.Context, + * com.facebook.widget.FacebookDialog.ShareDialogFeature...)} indicates the capability is available. + */ + public static class VideoShareDialogBuilder extends VideoDialogBuilderBase { + /** + * Constructor. + * + * @param activity the Activity which is presenting the native Share dialog; must not be null + */ + public VideoShareDialogBuilder(Activity activity) { + super(activity); + } + + @Override + protected EnumSet getDialogFeatures() { + return EnumSet.of(ShareDialogFeature.SHARE_DIALOG, ShareDialogFeature.VIDEO); + } + } + /** * Provides a builder which can construct a FacebookDialog instance suitable for presenting the native * Message dialog. This builder will throw an exception if the Facebook Messenger application is not installed, so it diff --git a/facebook/src/com/facebook/widget/LikeView.java b/facebook/src/com/facebook/widget/LikeView.java index 8b1b8280ea..349f12ab96 100644 --- a/facebook/src/com/facebook/widget/LikeView.java +++ b/facebook/src/com/facebook/widget/LikeView.java @@ -327,7 +327,7 @@ public void setForegroundColor(int foregroundColor) { } /** - * Sets an OnErrorListener for this instance of LoginButton to call into when + * Sets an OnErrorListener for this instance of LikeView to call into when * certain exceptions occur. * * @param onErrorListener The listener object to set @@ -337,7 +337,7 @@ public void setOnErrorListener(OnErrorListener onErrorListener) { } /** - * Returns the current OnErrorListener for this instance of LoginButton. + * Returns the current OnErrorListener for this instance of LikeView. * * @return The OnErrorListener */ diff --git a/facebook/src/com/facebook/widget/LoginButton.java b/facebook/src/com/facebook/widget/LoginButton.java index 91b5ea699e..9fcb25c925 100644 --- a/facebook/src/com/facebook/widget/LoginButton.java +++ b/facebook/src/com/facebook/widget/LoginButton.java @@ -34,7 +34,6 @@ import android.view.Gravity; import android.view.View; import android.widget.Button; - import com.facebook.*; import com.facebook.android.R; import com.facebook.internal.AnalyticsEvents; diff --git a/samples/FriendPickerSample/res/drawable-hdpi/icon.png b/samples/FriendPickerSample/res/drawable-hdpi/icon.png index 6a930c6c6e..7d5a0608c4 100644 Binary files a/samples/FriendPickerSample/res/drawable-hdpi/icon.png and b/samples/FriendPickerSample/res/drawable-hdpi/icon.png differ diff --git a/samples/FriendPickerSample/res/drawable-mdpi/icon.png b/samples/FriendPickerSample/res/drawable-mdpi/icon.png index 33b418b7ab..bdfec25839 100644 Binary files a/samples/FriendPickerSample/res/drawable-mdpi/icon.png and b/samples/FriendPickerSample/res/drawable-mdpi/icon.png differ diff --git a/samples/FriendPickerSample/res/drawable-xhdpi/icon.png b/samples/FriendPickerSample/res/drawable-xhdpi/icon.png index 494e37a8d4..b9c1849184 100644 Binary files a/samples/FriendPickerSample/res/drawable-xhdpi/icon.png and b/samples/FriendPickerSample/res/drawable-xhdpi/icon.png differ diff --git a/samples/FriendPickerSample/res/drawable/icon.png b/samples/FriendPickerSample/res/drawable/icon.png index 33b418b7ab..bdfec25839 100644 Binary files a/samples/FriendPickerSample/res/drawable/icon.png and b/samples/FriendPickerSample/res/drawable/icon.png differ diff --git a/samples/HelloFacebookSample/res/drawable-hdpi/icon.png b/samples/HelloFacebookSample/res/drawable-hdpi/icon.png index e603120e14..0a0d7cc735 100644 Binary files a/samples/HelloFacebookSample/res/drawable-hdpi/icon.png and b/samples/HelloFacebookSample/res/drawable-hdpi/icon.png differ diff --git a/samples/HelloFacebookSample/res/drawable-mdpi/icon.png b/samples/HelloFacebookSample/res/drawable-mdpi/icon.png index f2fc84fb6b..b4507c0e74 100644 Binary files a/samples/HelloFacebookSample/res/drawable-mdpi/icon.png and b/samples/HelloFacebookSample/res/drawable-mdpi/icon.png differ diff --git a/samples/HelloFacebookSample/res/drawable-xhdpi/icon.png b/samples/HelloFacebookSample/res/drawable-xhdpi/icon.png index 143a69f21a..6e84246025 100644 Binary files a/samples/HelloFacebookSample/res/drawable-xhdpi/icon.png and b/samples/HelloFacebookSample/res/drawable-xhdpi/icon.png differ diff --git a/samples/HelloFacebookSample/res/drawable/icon.png b/samples/HelloFacebookSample/res/drawable/icon.png index f2fc84fb6b..b4507c0e74 100644 Binary files a/samples/HelloFacebookSample/res/drawable/icon.png and b/samples/HelloFacebookSample/res/drawable/icon.png differ diff --git a/samples/PlacePickerSample/res/drawable-hdpi/icon.png b/samples/PlacePickerSample/res/drawable-hdpi/icon.png index 4059334b5f..72320cacd2 100644 Binary files a/samples/PlacePickerSample/res/drawable-hdpi/icon.png and b/samples/PlacePickerSample/res/drawable-hdpi/icon.png differ diff --git a/samples/PlacePickerSample/res/drawable-mdpi/icon.png b/samples/PlacePickerSample/res/drawable-mdpi/icon.png index 1fa3834d05..9012b57a25 100644 Binary files a/samples/PlacePickerSample/res/drawable-mdpi/icon.png and b/samples/PlacePickerSample/res/drawable-mdpi/icon.png differ diff --git a/samples/PlacePickerSample/res/drawable-xhdpi/icon.png b/samples/PlacePickerSample/res/drawable-xhdpi/icon.png index 2b3083d444..40cd9480c9 100644 Binary files a/samples/PlacePickerSample/res/drawable-xhdpi/icon.png and b/samples/PlacePickerSample/res/drawable-xhdpi/icon.png differ diff --git a/samples/PlacePickerSample/res/drawable/icon.png b/samples/PlacePickerSample/res/drawable/icon.png index 1fa3834d05..9012b57a25 100644 Binary files a/samples/PlacePickerSample/res/drawable/icon.png and b/samples/PlacePickerSample/res/drawable/icon.png differ diff --git a/samples/RPSSample/AndroidManifest.xml b/samples/RPSSample/AndroidManifest.xml index 06c1fc4c0f..5e81e51049 100644 --- a/samples/RPSSample/AndroidManifest.xml +++ b/samples/RPSSample/AndroidManifest.xml @@ -32,6 +32,7 @@ android:label="@string/app_name" /> + android:name="com.facebook.NativeAppCallContentProvider" + android:exported="true" /> diff --git a/samples/RPSSample/res/drawable-hdpi/icon.png b/samples/RPSSample/res/drawable-hdpi/icon.png index 5bc5b2ceac..9e70a87f33 100644 Binary files a/samples/RPSSample/res/drawable-hdpi/icon.png and b/samples/RPSSample/res/drawable-hdpi/icon.png differ diff --git a/samples/RPSSample/res/drawable-mdpi/icon.png b/samples/RPSSample/res/drawable-mdpi/icon.png index f621e908c9..f8ac7a2dbe 100644 Binary files a/samples/RPSSample/res/drawable-mdpi/icon.png and b/samples/RPSSample/res/drawable-mdpi/icon.png differ diff --git a/samples/RPSSample/res/drawable-xhdpi/icon.png b/samples/RPSSample/res/drawable-xhdpi/icon.png index 1adb6bfa3b..ea8da121a8 100644 Binary files a/samples/RPSSample/res/drawable-xhdpi/icon.png and b/samples/RPSSample/res/drawable-xhdpi/icon.png differ diff --git a/samples/RPSSample/res/drawable/fb_logo.png b/samples/RPSSample/res/drawable/fb_logo.png index b4b29948cc..42c6191234 100755 Binary files a/samples/RPSSample/res/drawable/fb_logo.png and b/samples/RPSSample/res/drawable/fb_logo.png differ diff --git a/samples/RPSSample/res/drawable/icon.png b/samples/RPSSample/res/drawable/icon.png index f621e908c9..f8ac7a2dbe 100644 Binary files a/samples/RPSSample/res/drawable/icon.png and b/samples/RPSSample/res/drawable/icon.png differ diff --git a/samples/RPSSample/res/drawable/left_paper.png b/samples/RPSSample/res/drawable/left_paper.png index 7336fd2460..813e925da3 100755 Binary files a/samples/RPSSample/res/drawable/left_paper.png and b/samples/RPSSample/res/drawable/left_paper.png differ diff --git a/samples/RPSSample/res/drawable/left_rock.png b/samples/RPSSample/res/drawable/left_rock.png index bee7abe898..4226ab0741 100755 Binary files a/samples/RPSSample/res/drawable/left_rock.png and b/samples/RPSSample/res/drawable/left_rock.png differ diff --git a/samples/RPSSample/res/drawable/left_scissors.png b/samples/RPSSample/res/drawable/left_scissors.png index dac525200d..0ed1b1c16f 100755 Binary files a/samples/RPSSample/res/drawable/left_scissors.png and b/samples/RPSSample/res/drawable/left_scissors.png differ diff --git a/samples/RPSSample/res/drawable/right_paper.png b/samples/RPSSample/res/drawable/right_paper.png index d243567a91..54431fe6a1 100755 Binary files a/samples/RPSSample/res/drawable/right_paper.png and b/samples/RPSSample/res/drawable/right_paper.png differ diff --git a/samples/RPSSample/res/drawable/right_rock.png b/samples/RPSSample/res/drawable/right_rock.png index 9168b4b743..51203c4bcc 100755 Binary files a/samples/RPSSample/res/drawable/right_rock.png and b/samples/RPSSample/res/drawable/right_rock.png differ diff --git a/samples/RPSSample/res/drawable/right_scissors.png b/samples/RPSSample/res/drawable/right_scissors.png index 083c47590c..7c55471e65 100755 Binary files a/samples/RPSSample/res/drawable/right_scissors.png and b/samples/RPSSample/res/drawable/right_scissors.png differ diff --git a/samples/Scrumptious/AndroidManifest.xml b/samples/Scrumptious/AndroidManifest.xml index f5fadc8c76..715d5bc7b2 100644 --- a/samples/Scrumptious/AndroidManifest.xml +++ b/samples/Scrumptious/AndroidManifest.xml @@ -29,6 +29,7 @@ android:label="@string/app_name" /> + android:name="com.facebook.NativeAppCallContentProvider" + android:exported="true" /> diff --git a/samples/Scrumptious/res/drawable-hdpi/icon.png b/samples/Scrumptious/res/drawable-hdpi/icon.png index 0320aeb542..383503ce94 100644 Binary files a/samples/Scrumptious/res/drawable-hdpi/icon.png and b/samples/Scrumptious/res/drawable-hdpi/icon.png differ diff --git a/samples/Scrumptious/res/drawable-mdpi/icon.png b/samples/Scrumptious/res/drawable-mdpi/icon.png index 5c4b0095fb..b14f00b4d8 100644 Binary files a/samples/Scrumptious/res/drawable-mdpi/icon.png and b/samples/Scrumptious/res/drawable-mdpi/icon.png differ diff --git a/samples/Scrumptious/res/drawable-mdpi/logo.png b/samples/Scrumptious/res/drawable-mdpi/logo.png index 27fd9ffc1d..a6f07865ee 100644 Binary files a/samples/Scrumptious/res/drawable-mdpi/logo.png and b/samples/Scrumptious/res/drawable-mdpi/logo.png differ diff --git a/samples/Scrumptious/res/drawable-xhdpi/icon.png b/samples/Scrumptious/res/drawable-xhdpi/icon.png index 796e14ec2e..c86c5f0f3b 100644 Binary files a/samples/Scrumptious/res/drawable-xhdpi/icon.png and b/samples/Scrumptious/res/drawable-xhdpi/icon.png differ diff --git a/samples/Scrumptious/res/drawable-xhdpi/logo.png b/samples/Scrumptious/res/drawable-xhdpi/logo.png index 0fff04bb96..aea4d819e5 100644 Binary files a/samples/Scrumptious/res/drawable-xhdpi/logo.png and b/samples/Scrumptious/res/drawable-xhdpi/logo.png differ diff --git a/samples/Scrumptious/res/drawable/add_food.png b/samples/Scrumptious/res/drawable/add_food.png index b556dd6e3c..aeb1ae3155 100644 Binary files a/samples/Scrumptious/res/drawable/add_food.png and b/samples/Scrumptious/res/drawable/add_food.png differ diff --git a/samples/Scrumptious/res/drawable/add_friends.png b/samples/Scrumptious/res/drawable/add_friends.png index 1cafe36259..b728ebfd97 100644 Binary files a/samples/Scrumptious/res/drawable/add_friends.png and b/samples/Scrumptious/res/drawable/add_friends.png differ diff --git a/samples/Scrumptious/res/drawable/add_location.png b/samples/Scrumptious/res/drawable/add_location.png index 2df780552d..45a30b3e58 100644 Binary files a/samples/Scrumptious/res/drawable/add_location.png and b/samples/Scrumptious/res/drawable/add_location.png differ diff --git a/samples/Scrumptious/res/drawable/add_photo.png b/samples/Scrumptious/res/drawable/add_photo.png index 48f5740a64..f48ea0680b 100644 Binary files a/samples/Scrumptious/res/drawable/add_photo.png and b/samples/Scrumptious/res/drawable/add_photo.png differ diff --git a/samples/Scrumptious/res/drawable/facebook.png b/samples/Scrumptious/res/drawable/facebook.png index daf8097b14..88c2ed6a8b 100755 Binary files a/samples/Scrumptious/res/drawable/facebook.png and b/samples/Scrumptious/res/drawable/facebook.png differ diff --git a/samples/Scrumptious/res/drawable/icon.png b/samples/Scrumptious/res/drawable/icon.png index 5c4b0095fb..739392fc00 100644 Binary files a/samples/Scrumptious/res/drawable/icon.png and b/samples/Scrumptious/res/drawable/icon.png differ diff --git a/samples/Scrumptious/res/drawable/title_bar_logo.png b/samples/Scrumptious/res/drawable/title_bar_logo.png index 27fd9ffc1d..3fe6e8b977 100644 Binary files a/samples/Scrumptious/res/drawable/title_bar_logo.png and b/samples/Scrumptious/res/drawable/title_bar_logo.png differ diff --git a/samples/Scrumptious/src/com/facebook/scrumptious/MainActivity.java b/samples/Scrumptious/src/com/facebook/scrumptious/MainActivity.java index e496de8cc1..964760c75c 100644 --- a/samples/Scrumptious/src/com/facebook/scrumptious/MainActivity.java +++ b/samples/Scrumptious/src/com/facebook/scrumptious/MainActivity.java @@ -22,8 +22,6 @@ import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; -import android.view.Menu; -import android.view.MenuItem; import com.facebook.AppEventsLogger; import com.facebook.Session; import com.facebook.SessionState; @@ -39,7 +37,6 @@ public class MainActivity extends FragmentActivity { private static final int FRAGMENT_COUNT = SETTINGS +1; private Fragment[] fragments = new Fragment[FRAGMENT_COUNT]; - private MenuItem settings; private boolean isResumed = false; private boolean userSkippedLogin = false; private UiLifecycleHelper uiHelper; @@ -142,30 +139,6 @@ protected void onResumeFragments() { } } - @Override - public boolean onPrepareOptionsMenu(Menu menu) { - // only add the menu when the selection fragment is showing - if (fragments[SELECTION].isVisible()) { - if (menu.size() == 0) { - settings = menu.add(R.string.settings); - } - return true; - } else { - menu.clear(); - settings = null; - } - return false; - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - if (item.equals(settings)) { - showSettingsFragment(); - return true; - } - return false; - } - public void showSettingsFragment() { showFragment(SETTINGS, true); } diff --git a/samples/Scrumptious/src/com/facebook/scrumptious/SelectionFragment.java b/samples/Scrumptious/src/com/facebook/scrumptious/SelectionFragment.java index f6f572ce85..3cc1ad7a96 100644 --- a/samples/Scrumptious/src/com/facebook/scrumptious/SelectionFragment.java +++ b/samples/Scrumptious/src/com/facebook/scrumptious/SelectionFragment.java @@ -158,6 +158,12 @@ public void onClick(View view) { handleAnnounce(true); } }); + profilePictureView.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + activity.showSettingsFragment(); + } + }); init(savedInstanceState); diff --git a/samples/SwitchUserSample/res/drawable-hdpi/icon.png b/samples/SwitchUserSample/res/drawable-hdpi/icon.png index cda826b7f3..8e4f7040c8 100644 Binary files a/samples/SwitchUserSample/res/drawable-hdpi/icon.png and b/samples/SwitchUserSample/res/drawable-hdpi/icon.png differ diff --git a/samples/SwitchUserSample/res/drawable-mdpi/icon.png b/samples/SwitchUserSample/res/drawable-mdpi/icon.png index ffd35f432e..e193802b27 100644 Binary files a/samples/SwitchUserSample/res/drawable-mdpi/icon.png and b/samples/SwitchUserSample/res/drawable-mdpi/icon.png differ diff --git a/samples/SwitchUserSample/res/drawable-xhdpi/icon.png b/samples/SwitchUserSample/res/drawable-xhdpi/icon.png index be63ade0b5..e49838d036 100644 Binary files a/samples/SwitchUserSample/res/drawable-xhdpi/icon.png and b/samples/SwitchUserSample/res/drawable-xhdpi/icon.png differ diff --git a/samples/SwitchUserSample/res/drawable/icon.png b/samples/SwitchUserSample/res/drawable/icon.png index ffd35f432e..e193802b27 100644 Binary files a/samples/SwitchUserSample/res/drawable/icon.png and b/samples/SwitchUserSample/res/drawable/icon.png differ