Migrate to gradle, appcompat as external dependency.
authorRadek Czajka <radekczajka@nowoczesnapolska.org.pl>
Tue, 13 Jan 2015 13:40:13 +0000 (14:40 +0100)
committerRadek Czajka <radekczajka@nowoczesnapolska.org.pl>
Tue, 13 Jan 2015 13:40:13 +0000 (14:40 +0100)
904 files changed:
.gitignore
AndroidManifest.xml [deleted file]
LICENSE [new file with mode: 0644]
app/app.iml [new file with mode: 0644]
app/build.gradle [new file with mode: 0644]
app/libs/listviewanimations_lib-core_3.1.0.jar [new file with mode: 0644]
app/libs/nineoldandroids-2.4.0.jar [new file with mode: 0644]
app/lint.xml [new file with mode: 0644]
app/src/main/AndroidManifest.xml [new file with mode: 0644]
app/src/main/ic_launcher-web.png [new file with mode: 0644]
app/src/main/java/com/samsung/srpol/data/Category.java [new file with mode: 0644]
app/src/main/java/com/samsung/srpol/data/Subcategory.java [new file with mode: 0644]
app/src/main/java/com/samsung/srpol/loader/AppDetails.java [new file with mode: 0644]
app/src/main/java/com/samsung/srpol/loader/AppListChangeListener.java [new file with mode: 0644]
app/src/main/java/com/samsung/srpol/loader/AppListLoader.java [new file with mode: 0644]
app/src/main/java/com/samsung/srpol/parallax/ParallaxListView.java [new file with mode: 0644]
app/src/main/java/com/samsung/srpol/parallax/ParallaxListViewHelper.java [new file with mode: 0644]
app/src/main/java/com/samsung/srpol/parallax/ParallaxedView.java [new file with mode: 0644]
app/src/main/java/com/samsung/srpol/ui/AppInfoActivity.java [new file with mode: 0644]
app/src/main/java/com/samsung/srpol/ui/LicenseActivity.java [new file with mode: 0644]
app/src/main/java/com/samsung/srpol/ui/MainActivity.java [new file with mode: 0644]
app/src/main/java/com/samsung/srpol/ui/PopupActivity.java [new file with mode: 0644]
app/src/main/java/com/samsung/srpol/ui/WelcomeDialog.java [new file with mode: 0644]
app/src/main/java/com/samsung/srpol/ui/drawer/CategoryArrayAdapter.java [new file with mode: 0644]
app/src/main/java/com/samsung/srpol/ui/drawer/MenuFragment.java [new file with mode: 0644]
app/src/main/java/com/samsung/srpol/ui/drawer/NavigationDrawerItemListener.java [new file with mode: 0644]
app/src/main/java/com/samsung/srpol/ui/tabpager/AppListArrayAdapter.java [new file with mode: 0644]
app/src/main/java/com/samsung/srpol/ui/tabpager/PageAdapter.java [new file with mode: 0644]
app/src/main/java/com/samsung/srpol/ui/tabpager/PageFragment.java [new file with mode: 0644]
app/src/main/java/com/samsung/srpol/utils/Utils.java [new file with mode: 0644]
app/src/main/res/anim/fadein.xml [new file with mode: 0644]
app/src/main/res/anim/fadeout.xml [new file with mode: 0644]
app/src/main/res/anim/slide_right.xml [new file with mode: 0644]
app/src/main/res/drawable-hdpi/btn_co_moge_normal.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/btn_co_moge_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/btn_legenda_normal.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/btn_legenda_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/btn_odinstaluj_normal.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/btn_odinstaluj_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/btn_ok_normal.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/btn_ok_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/btn_powrot_normal.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/btn_powrot_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/btn_ustawienia_normal.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/btn_ustawienia_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/btn_wiecej_info_normal.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/btn_wiecej_info_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/drawer_shadow.9.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_broke.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_broke_dark.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_broke_disable.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_call.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_call_dark.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_call_disable.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_call_history.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_call_history_dark.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_call_history_disable.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_communication.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_communication_dark.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_communication_disable.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_cyber_profile.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_cyber_profile_dark.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_cyber_profile_disable.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_data_sending.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_data_sending_dark.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_data_sending_disable.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_data_transmission.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_data_transmission_dark.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_data_transmission_disable.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_device.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_device_control.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_device_control_dark.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_device_control_disable.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_device_dark.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_device_disable.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_device_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_disturb.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_disturb_dark.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_disturb_disable.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_files.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_files_dark.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_files_disable.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_files_edit.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_files_edit_dark.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_files_edit_disable.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_launcher.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_location.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_location_dark.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_location_disable.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_profile_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_sms.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_sms_dark.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_sms_disable.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_system.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_system_dark.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_system_disable.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_system_red.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_system_red_dark.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_system_red_disable.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_wallet_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_warning_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_wiretapping.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_wiretapping_dark.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/ic_wiretapping_disable.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/img_welcome_screen.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/logo_fnp.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/logo_maic.png [new file with mode: 0644]
app/src/main/res/drawable-hdpi/logo_samsung.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/btn_co_moge_normal.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/btn_co_moge_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/btn_legenda_normal.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/btn_legenda_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/btn_odinstaluj_normal.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/btn_odinstaluj_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/btn_ok_normal.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/btn_ok_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/btn_powrot_normal.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/btn_powrot_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/btn_ustawienia_normal.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/btn_ustawienia_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/btn_wiecej_info_normal.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/btn_wiecej_info_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_broke.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_broke_dark.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_broke_disable.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_call.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_call_dark.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_call_disable.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_call_history.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_call_history_dark.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_call_history_disable.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_communication.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_communication_dark.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_communication_disable.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_cyber_profile.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_cyber_profile_dark.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_cyber_profile_disable.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_data_sending.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_data_sending_dark.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_data_sending_disable.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_data_transmission.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_data_transmission_dark.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_data_transmission_disable.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_device.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_device_control.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_device_control_dark.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_device_control_disable.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_device_dark.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_device_disable.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_device_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_disturb.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_disturb_dark.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_disturb_disable.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_files.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_files_dark.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_files_disable.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_files_edit.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_files_edit_dark.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_files_edit_disable.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_launcher.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_location.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_location_dark.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_location_disable.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_profile_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_sms.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_sms_dark.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_sms_disable.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_system.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_system_dark.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_system_disable.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_system_red.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_system_red_dark.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_system_red_disable.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_wallet_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_warning_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_wiretapping.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_wiretapping_dark.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/ic_wiretapping_disable.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/img_welcome_screen.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/logo_fnp.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/logo_maic.png [new file with mode: 0644]
app/src/main/res/drawable-ldpi/logo_samsung.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/btn_co_moge_normal.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/btn_co_moge_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/btn_legenda_normal.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/btn_legenda_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/btn_odinstaluj_normal.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/btn_odinstaluj_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/btn_ok_normal.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/btn_ok_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/btn_powrot_normal.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/btn_powrot_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/btn_ustawienia_normal.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/btn_ustawienia_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/btn_wiecej_info_normal.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/btn_wiecej_info_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/drawer_shadow.9.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_broke.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_broke_dark.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_broke_disable.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_call.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_call_dark.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_call_disable.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_call_history.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_call_history_dark.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_call_history_disable.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_communication.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_communication_dark.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_communication_disable.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_cyber_profile.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_cyber_profile_dark.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_cyber_profile_disable.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_data_sending.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_data_sending_dark.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_data_sending_disable.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_data_transmission.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_data_transmission_dark.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_data_transmission_disable.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_device.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_device_control.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_device_control_dark.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_device_control_disable.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_device_dark.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_device_disable.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_device_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_disturb.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_disturb_dark.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_disturb_disable.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_files.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_files_dark.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_files_disable.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_files_edit.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_files_edit_dark.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_files_edit_disable.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_launcher.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_location.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_location_dark.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_location_disable.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_profile_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_sms.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_sms_dark.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_sms_disable.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_system.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_system_dark.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_system_disable.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_system_red.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_system_red_dark.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_system_red_disable.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_wallet_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_warning_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_wiretapping.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_wiretapping_dark.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/ic_wiretapping_disable.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/img_welcome_screen.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/logo_fnp.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/logo_maic.png [new file with mode: 0644]
app/src/main/res/drawable-mdpi/logo_samsung.png [new file with mode: 0644]
app/src/main/res/drawable-nodpi/nav_drawer_separator.9.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/btn_co_moge_normal.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/btn_co_moge_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/btn_legenda_normal.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/btn_legenda_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/btn_odinstaluj_normal.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/btn_odinstaluj_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/btn_ok_normal.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/btn_ok_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/btn_powrot_normal.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/btn_powrot_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/btn_ustawienia_normal.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/btn_ustawienia_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/btn_wiecej_info_normal.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/btn_wiecej_info_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/drawer_shadow.9.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_broke.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_broke_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_broke_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_call.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_call_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_call_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_call_history.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_call_history_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_call_history_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_communication.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_communication_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_communication_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_cyber_profile.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_cyber_profile_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_cyber_profile_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_data_sending.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_data_sending_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_data_sending_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_data_transmission.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_data_transmission_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_data_transmission_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_device.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_device_control.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_device_control_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_device_control_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_device_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_device_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_device_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_disturb.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_disturb_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_disturb_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_files.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_files_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_files_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_files_edit.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_files_edit_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_files_edit_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_launcher.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_location.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_location_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_location_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_profile_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_sms.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_sms_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_sms_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_system.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_system_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_system_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_system_red.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_system_red_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_system_red_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_wallet_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_warning_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_wiretapping.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_wiretapping_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/ic_wiretapping_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/img_welcome_screen.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/logo_fnp.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/logo_maic.png [new file with mode: 0644]
app/src/main/res/drawable-xhdpi/logo_samsung.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/btn_co_moge_normal.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/btn_co_moge_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/btn_legenda_normal.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/btn_legenda_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/btn_odinstaluj_normal.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/btn_odinstaluj_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/btn_ok_normal.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/btn_ok_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/btn_powrot_normal.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/btn_powrot_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/btn_ustawienia_normal.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/btn_ustawienia_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/btn_wiecej_info_normal.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/btn_wiecej_info_pressed.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/drawer_shadow.9.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_broke.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_broke_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_broke_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_call.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_call_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_call_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_call_history.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_call_history_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_call_history_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_communication.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_communication_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_communication_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_cyber_profile.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_cyber_profile_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_cyber_profile_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_data_sending.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_data_sending_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_data_sending_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_data_transmission.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_data_transmission_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_data_transmission_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_device.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_device_control.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_device_control_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_device_control_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_device_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_device_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_device_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_disturb.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_disturb_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_disturb_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_files.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_files_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_files_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_files_edit.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_files_edit_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_files_edit_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_launcher.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_location.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_location_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_location_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_profile_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_sms.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_sms_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_sms_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_system.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_system_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_system_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_system_red.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_system_red_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_system_red_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_wallet_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_warning_drawer.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_wiretapping.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_wiretapping_dark.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/ic_wiretapping_disable.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/img_welcome_screen.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/logo_fnp.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/logo_maic.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/logo_samsung.png [new file with mode: 0644]
app/src/main/res/drawable-xxhdpi/title_welcome_screen.png [new file with mode: 0644]
app/src/main/res/drawable/actionbar_background.xml [new file with mode: 0644]
app/src/main/res/drawable/app_info_settings_button.xml [new file with mode: 0644]
app/src/main/res/drawable/app_info_uninstall_button.xml [new file with mode: 0644]
app/src/main/res/drawable/app_info_what_can_button.xml [new file with mode: 0644]
app/src/main/res/drawable/back_button.xml [new file with mode: 0644]
app/src/main/res/drawable/custom_border.xml [new file with mode: 0644]
app/src/main/res/drawable/drawer_background_selector.xml [new file with mode: 0644]
app/src/main/res/drawable/legend_btn_selector.xml [new file with mode: 0644]
app/src/main/res/drawable/more_info_button.xml [new file with mode: 0644]
app/src/main/res/drawable/nav_drawer_separator.9.png [new file with mode: 0644]
app/src/main/res/drawable/ok_button.xml [new file with mode: 0644]
app/src/main/res/layout-land/activity_app_info.xml [new file with mode: 0644]
app/src/main/res/layout-land/activity_popup.xml [new file with mode: 0644]
app/src/main/res/layout-land/welcome_dialog.xml [new file with mode: 0644]
app/src/main/res/layout-large-land/activity_main.xml [new file with mode: 0644]
app/src/main/res/layout/activity_app_info.xml [new file with mode: 0644]
app/src/main/res/layout/activity_license.xml [new file with mode: 0644]
app/src/main/res/layout/activity_main.xml [new file with mode: 0644]
app/src/main/res/layout/activity_popup.xml [new file with mode: 0644]
app/src/main/res/layout/app_list_item_view.xml [new file with mode: 0644]
app/src/main/res/layout/drawer_list_item.xml [new file with mode: 0644]
app/src/main/res/layout/fragment_main.xml [new file with mode: 0644]
app/src/main/res/layout/fragment_navigation_drawer.xml [new file with mode: 0644]
app/src/main/res/layout/header_layout.xml [new file with mode: 0644]
app/src/main/res/layout/threats_list_item.xml [new file with mode: 0644]
app/src/main/res/layout/welcome_dialog.xml [new file with mode: 0644]
app/src/main/res/menu/main.xml [new file with mode: 0644]
app/src/main/res/values-v11/styles.xml [new file with mode: 0644]
app/src/main/res/values-v14/styles.xml [new file with mode: 0644]
app/src/main/res/values-w820dp/dimens.xml [new file with mode: 0644]
app/src/main/res/values/attrs.xml [new file with mode: 0644]
app/src/main/res/values/color.xml [new file with mode: 0644]
app/src/main/res/values/dimens.xml [new file with mode: 0644]
app/src/main/res/values/strings.xml [new file with mode: 0644]
app/src/main/res/values/styles.xml [new file with mode: 0644]
app/src/main/res/xml/categories.xml [new file with mode: 0644]
app/src/main/res/xml/data_send_subcategory.xml [new file with mode: 0644]
build.gradle [new file with mode: 0644]
build.xml [deleted file]
gradlew [new file with mode: 0755]
gradlew.bat [new file with mode: 0644]
ic_launcher-web.png [deleted file]
libs/android-support-v4.jar [deleted file]
libs/listviewanimations_lib-core_3.1.0.jar [deleted file]
libs/nineoldandroids-2.4.0.jar [deleted file]
license.txt [deleted file]
lint.xml [deleted file]
proguard-project.txt [deleted file]
project.properties [deleted file]
res/anim/fadein.xml [deleted file]
res/anim/fadeout.xml [deleted file]
res/anim/slide_right.xml [deleted file]
res/drawable-hdpi/btn_co_moge_normal.png [deleted file]
res/drawable-hdpi/btn_co_moge_pressed.png [deleted file]
res/drawable-hdpi/btn_legenda_normal.png [deleted file]
res/drawable-hdpi/btn_legenda_pressed.png [deleted file]
res/drawable-hdpi/btn_odinstaluj_normal.png [deleted file]
res/drawable-hdpi/btn_odinstaluj_pressed.png [deleted file]
res/drawable-hdpi/btn_ok_normal.png [deleted file]
res/drawable-hdpi/btn_ok_pressed.png [deleted file]
res/drawable-hdpi/btn_powrot_normal.png [deleted file]
res/drawable-hdpi/btn_powrot_pressed.png [deleted file]
res/drawable-hdpi/btn_ustawienia_normal.png [deleted file]
res/drawable-hdpi/btn_ustawienia_pressed.png [deleted file]
res/drawable-hdpi/btn_wiecej_info_normal.png [deleted file]
res/drawable-hdpi/btn_wiecej_info_pressed.png [deleted file]
res/drawable-hdpi/drawer_shadow.9.png [deleted file]
res/drawable-hdpi/ic_broke.png [deleted file]
res/drawable-hdpi/ic_broke_dark.png [deleted file]
res/drawable-hdpi/ic_broke_disable.png [deleted file]
res/drawable-hdpi/ic_call.png [deleted file]
res/drawable-hdpi/ic_call_dark.png [deleted file]
res/drawable-hdpi/ic_call_disable.png [deleted file]
res/drawable-hdpi/ic_call_history.png [deleted file]
res/drawable-hdpi/ic_call_history_dark.png [deleted file]
res/drawable-hdpi/ic_call_history_disable.png [deleted file]
res/drawable-hdpi/ic_communication.png [deleted file]
res/drawable-hdpi/ic_communication_dark.png [deleted file]
res/drawable-hdpi/ic_communication_disable.png [deleted file]
res/drawable-hdpi/ic_cyber_profile.png [deleted file]
res/drawable-hdpi/ic_cyber_profile_dark.png [deleted file]
res/drawable-hdpi/ic_cyber_profile_disable.png [deleted file]
res/drawable-hdpi/ic_data_sending.png [deleted file]
res/drawable-hdpi/ic_data_sending_dark.png [deleted file]
res/drawable-hdpi/ic_data_sending_disable.png [deleted file]
res/drawable-hdpi/ic_data_transmission.png [deleted file]
res/drawable-hdpi/ic_data_transmission_dark.png [deleted file]
res/drawable-hdpi/ic_data_transmission_disable.png [deleted file]
res/drawable-hdpi/ic_device.png [deleted file]
res/drawable-hdpi/ic_device_control.png [deleted file]
res/drawable-hdpi/ic_device_control_dark.png [deleted file]
res/drawable-hdpi/ic_device_control_disable.png [deleted file]
res/drawable-hdpi/ic_device_dark.png [deleted file]
res/drawable-hdpi/ic_device_disable.png [deleted file]
res/drawable-hdpi/ic_device_drawer.png [deleted file]
res/drawable-hdpi/ic_disturb.png [deleted file]
res/drawable-hdpi/ic_disturb_dark.png [deleted file]
res/drawable-hdpi/ic_disturb_disable.png [deleted file]
res/drawable-hdpi/ic_drawer.png [deleted file]
res/drawable-hdpi/ic_files.png [deleted file]
res/drawable-hdpi/ic_files_dark.png [deleted file]
res/drawable-hdpi/ic_files_disable.png [deleted file]
res/drawable-hdpi/ic_files_edit.png [deleted file]
res/drawable-hdpi/ic_files_edit_dark.png [deleted file]
res/drawable-hdpi/ic_files_edit_disable.png [deleted file]
res/drawable-hdpi/ic_launcher.png [deleted file]
res/drawable-hdpi/ic_location.png [deleted file]
res/drawable-hdpi/ic_location_dark.png [deleted file]
res/drawable-hdpi/ic_location_disable.png [deleted file]
res/drawable-hdpi/ic_profile_drawer.png [deleted file]
res/drawable-hdpi/ic_sms.png [deleted file]
res/drawable-hdpi/ic_sms_dark.png [deleted file]
res/drawable-hdpi/ic_sms_disable.png [deleted file]
res/drawable-hdpi/ic_system.png [deleted file]
res/drawable-hdpi/ic_system_dark.png [deleted file]
res/drawable-hdpi/ic_system_disable.png [deleted file]
res/drawable-hdpi/ic_system_red.png [deleted file]
res/drawable-hdpi/ic_system_red_dark.png [deleted file]
res/drawable-hdpi/ic_system_red_disable.png [deleted file]
res/drawable-hdpi/ic_wallet_drawer.png [deleted file]
res/drawable-hdpi/ic_warning_drawer.png [deleted file]
res/drawable-hdpi/ic_wiretapping.png [deleted file]
res/drawable-hdpi/ic_wiretapping_dark.png [deleted file]
res/drawable-hdpi/ic_wiretapping_disable.png [deleted file]
res/drawable-hdpi/img_welcome_screen.png [deleted file]
res/drawable-hdpi/logo_fnp.png [deleted file]
res/drawable-hdpi/logo_maic.png [deleted file]
res/drawable-hdpi/logo_samsung.png [deleted file]
res/drawable-ldpi/btn_co_moge_normal.png [deleted file]
res/drawable-ldpi/btn_co_moge_pressed.png [deleted file]
res/drawable-ldpi/btn_legenda_normal.png [deleted file]
res/drawable-ldpi/btn_legenda_pressed.png [deleted file]
res/drawable-ldpi/btn_odinstaluj_normal.png [deleted file]
res/drawable-ldpi/btn_odinstaluj_pressed.png [deleted file]
res/drawable-ldpi/btn_ok_normal.png [deleted file]
res/drawable-ldpi/btn_ok_pressed.png [deleted file]
res/drawable-ldpi/btn_powrot_normal.png [deleted file]
res/drawable-ldpi/btn_powrot_pressed.png [deleted file]
res/drawable-ldpi/btn_ustawienia_normal.png [deleted file]
res/drawable-ldpi/btn_ustawienia_pressed.png [deleted file]
res/drawable-ldpi/btn_wiecej_info_normal.png [deleted file]
res/drawable-ldpi/btn_wiecej_info_pressed.png [deleted file]
res/drawable-ldpi/ic_broke.png [deleted file]
res/drawable-ldpi/ic_broke_dark.png [deleted file]
res/drawable-ldpi/ic_broke_disable.png [deleted file]
res/drawable-ldpi/ic_call.png [deleted file]
res/drawable-ldpi/ic_call_dark.png [deleted file]
res/drawable-ldpi/ic_call_disable.png [deleted file]
res/drawable-ldpi/ic_call_history.png [deleted file]
res/drawable-ldpi/ic_call_history_dark.png [deleted file]
res/drawable-ldpi/ic_call_history_disable.png [deleted file]
res/drawable-ldpi/ic_communication.png [deleted file]
res/drawable-ldpi/ic_communication_dark.png [deleted file]
res/drawable-ldpi/ic_communication_disable.png [deleted file]
res/drawable-ldpi/ic_cyber_profile.png [deleted file]
res/drawable-ldpi/ic_cyber_profile_dark.png [deleted file]
res/drawable-ldpi/ic_cyber_profile_disable.png [deleted file]
res/drawable-ldpi/ic_data_sending.png [deleted file]
res/drawable-ldpi/ic_data_sending_dark.png [deleted file]
res/drawable-ldpi/ic_data_sending_disable.png [deleted file]
res/drawable-ldpi/ic_data_transmission.png [deleted file]
res/drawable-ldpi/ic_data_transmission_dark.png [deleted file]
res/drawable-ldpi/ic_data_transmission_disable.png [deleted file]
res/drawable-ldpi/ic_device.png [deleted file]
res/drawable-ldpi/ic_device_control.png [deleted file]
res/drawable-ldpi/ic_device_control_dark.png [deleted file]
res/drawable-ldpi/ic_device_control_disable.png [deleted file]
res/drawable-ldpi/ic_device_dark.png [deleted file]
res/drawable-ldpi/ic_device_disable.png [deleted file]
res/drawable-ldpi/ic_device_drawer.png [deleted file]
res/drawable-ldpi/ic_disturb.png [deleted file]
res/drawable-ldpi/ic_disturb_dark.png [deleted file]
res/drawable-ldpi/ic_disturb_disable.png [deleted file]
res/drawable-ldpi/ic_files.png [deleted file]
res/drawable-ldpi/ic_files_dark.png [deleted file]
res/drawable-ldpi/ic_files_disable.png [deleted file]
res/drawable-ldpi/ic_files_edit.png [deleted file]
res/drawable-ldpi/ic_files_edit_dark.png [deleted file]
res/drawable-ldpi/ic_files_edit_disable.png [deleted file]
res/drawable-ldpi/ic_launcher.png [deleted file]
res/drawable-ldpi/ic_location.png [deleted file]
res/drawable-ldpi/ic_location_dark.png [deleted file]
res/drawable-ldpi/ic_location_disable.png [deleted file]
res/drawable-ldpi/ic_profile_drawer.png [deleted file]
res/drawable-ldpi/ic_sms.png [deleted file]
res/drawable-ldpi/ic_sms_dark.png [deleted file]
res/drawable-ldpi/ic_sms_disable.png [deleted file]
res/drawable-ldpi/ic_system.png [deleted file]
res/drawable-ldpi/ic_system_dark.png [deleted file]
res/drawable-ldpi/ic_system_disable.png [deleted file]
res/drawable-ldpi/ic_system_red.png [deleted file]
res/drawable-ldpi/ic_system_red_dark.png [deleted file]
res/drawable-ldpi/ic_system_red_disable.png [deleted file]
res/drawable-ldpi/ic_wallet_drawer.png [deleted file]
res/drawable-ldpi/ic_warning_drawer.png [deleted file]
res/drawable-ldpi/ic_wiretapping.png [deleted file]
res/drawable-ldpi/ic_wiretapping_dark.png [deleted file]
res/drawable-ldpi/ic_wiretapping_disable.png [deleted file]
res/drawable-ldpi/img_welcome_screen.png [deleted file]
res/drawable-ldpi/logo_fnp.png [deleted file]
res/drawable-ldpi/logo_maic.png [deleted file]
res/drawable-ldpi/logo_samsung.png [deleted file]
res/drawable-mdpi/btn_co_moge_normal.png [deleted file]
res/drawable-mdpi/btn_co_moge_pressed.png [deleted file]
res/drawable-mdpi/btn_legenda_normal.png [deleted file]
res/drawable-mdpi/btn_legenda_pressed.png [deleted file]
res/drawable-mdpi/btn_odinstaluj_normal.png [deleted file]
res/drawable-mdpi/btn_odinstaluj_pressed.png [deleted file]
res/drawable-mdpi/btn_ok_normal.png [deleted file]
res/drawable-mdpi/btn_ok_pressed.png [deleted file]
res/drawable-mdpi/btn_powrot_normal.png [deleted file]
res/drawable-mdpi/btn_powrot_pressed.png [deleted file]
res/drawable-mdpi/btn_ustawienia_normal.png [deleted file]
res/drawable-mdpi/btn_ustawienia_pressed.png [deleted file]
res/drawable-mdpi/btn_wiecej_info_normal.png [deleted file]
res/drawable-mdpi/btn_wiecej_info_pressed.png [deleted file]
res/drawable-mdpi/drawer_shadow.9.png [deleted file]
res/drawable-mdpi/ic_broke.png [deleted file]
res/drawable-mdpi/ic_broke_dark.png [deleted file]
res/drawable-mdpi/ic_broke_disable.png [deleted file]
res/drawable-mdpi/ic_call.png [deleted file]
res/drawable-mdpi/ic_call_dark.png [deleted file]
res/drawable-mdpi/ic_call_disable.png [deleted file]
res/drawable-mdpi/ic_call_history.png [deleted file]
res/drawable-mdpi/ic_call_history_dark.png [deleted file]
res/drawable-mdpi/ic_call_history_disable.png [deleted file]
res/drawable-mdpi/ic_communication.png [deleted file]
res/drawable-mdpi/ic_communication_dark.png [deleted file]
res/drawable-mdpi/ic_communication_disable.png [deleted file]
res/drawable-mdpi/ic_cyber_profile.png [deleted file]
res/drawable-mdpi/ic_cyber_profile_dark.png [deleted file]
res/drawable-mdpi/ic_cyber_profile_disable.png [deleted file]
res/drawable-mdpi/ic_data_sending.png [deleted file]
res/drawable-mdpi/ic_data_sending_dark.png [deleted file]
res/drawable-mdpi/ic_data_sending_disable.png [deleted file]
res/drawable-mdpi/ic_data_transmission.png [deleted file]
res/drawable-mdpi/ic_data_transmission_dark.png [deleted file]
res/drawable-mdpi/ic_data_transmission_disable.png [deleted file]
res/drawable-mdpi/ic_device.png [deleted file]
res/drawable-mdpi/ic_device_control.png [deleted file]
res/drawable-mdpi/ic_device_control_dark.png [deleted file]
res/drawable-mdpi/ic_device_control_disable.png [deleted file]
res/drawable-mdpi/ic_device_dark.png [deleted file]
res/drawable-mdpi/ic_device_disable.png [deleted file]
res/drawable-mdpi/ic_device_drawer.png [deleted file]
res/drawable-mdpi/ic_disturb.png [deleted file]
res/drawable-mdpi/ic_disturb_dark.png [deleted file]
res/drawable-mdpi/ic_disturb_disable.png [deleted file]
res/drawable-mdpi/ic_drawer.png [deleted file]
res/drawable-mdpi/ic_files.png [deleted file]
res/drawable-mdpi/ic_files_dark.png [deleted file]
res/drawable-mdpi/ic_files_disable.png [deleted file]
res/drawable-mdpi/ic_files_edit.png [deleted file]
res/drawable-mdpi/ic_files_edit_dark.png [deleted file]
res/drawable-mdpi/ic_files_edit_disable.png [deleted file]
res/drawable-mdpi/ic_launcher.png [deleted file]
res/drawable-mdpi/ic_location.png [deleted file]
res/drawable-mdpi/ic_location_dark.png [deleted file]
res/drawable-mdpi/ic_location_disable.png [deleted file]
res/drawable-mdpi/ic_profile_drawer.png [deleted file]
res/drawable-mdpi/ic_sms.png [deleted file]
res/drawable-mdpi/ic_sms_dark.png [deleted file]
res/drawable-mdpi/ic_sms_disable.png [deleted file]
res/drawable-mdpi/ic_system.png [deleted file]
res/drawable-mdpi/ic_system_dark.png [deleted file]
res/drawable-mdpi/ic_system_disable.png [deleted file]
res/drawable-mdpi/ic_system_red.png [deleted file]
res/drawable-mdpi/ic_system_red_dark.png [deleted file]
res/drawable-mdpi/ic_system_red_disable.png [deleted file]
res/drawable-mdpi/ic_wallet_drawer.png [deleted file]
res/drawable-mdpi/ic_warning_drawer.png [deleted file]
res/drawable-mdpi/ic_wiretapping.png [deleted file]
res/drawable-mdpi/ic_wiretapping_dark.png [deleted file]
res/drawable-mdpi/ic_wiretapping_disable.png [deleted file]
res/drawable-mdpi/img_welcome_screen.png [deleted file]
res/drawable-mdpi/logo_fnp.png [deleted file]
res/drawable-mdpi/logo_maic.png [deleted file]
res/drawable-mdpi/logo_samsung.png [deleted file]
res/drawable-nodpi/nav_drawer_separator.9.png [deleted file]
res/drawable-xhdpi/btn_co_moge_normal.png [deleted file]
res/drawable-xhdpi/btn_co_moge_pressed.png [deleted file]
res/drawable-xhdpi/btn_legenda_normal.png [deleted file]
res/drawable-xhdpi/btn_legenda_pressed.png [deleted file]
res/drawable-xhdpi/btn_odinstaluj_normal.png [deleted file]
res/drawable-xhdpi/btn_odinstaluj_pressed.png [deleted file]
res/drawable-xhdpi/btn_ok_normal.png [deleted file]
res/drawable-xhdpi/btn_ok_pressed.png [deleted file]
res/drawable-xhdpi/btn_powrot_normal.png [deleted file]
res/drawable-xhdpi/btn_powrot_pressed.png [deleted file]
res/drawable-xhdpi/btn_ustawienia_normal.png [deleted file]
res/drawable-xhdpi/btn_ustawienia_pressed.png [deleted file]
res/drawable-xhdpi/btn_wiecej_info_normal.png [deleted file]
res/drawable-xhdpi/btn_wiecej_info_pressed.png [deleted file]
res/drawable-xhdpi/drawer_shadow.9.png [deleted file]
res/drawable-xhdpi/ic_broke.png [deleted file]
res/drawable-xhdpi/ic_broke_dark.png [deleted file]
res/drawable-xhdpi/ic_broke_disable.png [deleted file]
res/drawable-xhdpi/ic_call.png [deleted file]
res/drawable-xhdpi/ic_call_dark.png [deleted file]
res/drawable-xhdpi/ic_call_disable.png [deleted file]
res/drawable-xhdpi/ic_call_history.png [deleted file]
res/drawable-xhdpi/ic_call_history_dark.png [deleted file]
res/drawable-xhdpi/ic_call_history_disable.png [deleted file]
res/drawable-xhdpi/ic_communication.png [deleted file]
res/drawable-xhdpi/ic_communication_dark.png [deleted file]
res/drawable-xhdpi/ic_communication_disable.png [deleted file]
res/drawable-xhdpi/ic_cyber_profile.png [deleted file]
res/drawable-xhdpi/ic_cyber_profile_dark.png [deleted file]
res/drawable-xhdpi/ic_cyber_profile_disable.png [deleted file]
res/drawable-xhdpi/ic_data_sending.png [deleted file]
res/drawable-xhdpi/ic_data_sending_dark.png [deleted file]
res/drawable-xhdpi/ic_data_sending_disable.png [deleted file]
res/drawable-xhdpi/ic_data_transmission.png [deleted file]
res/drawable-xhdpi/ic_data_transmission_dark.png [deleted file]
res/drawable-xhdpi/ic_data_transmission_disable.png [deleted file]
res/drawable-xhdpi/ic_device.png [deleted file]
res/drawable-xhdpi/ic_device_control.png [deleted file]
res/drawable-xhdpi/ic_device_control_dark.png [deleted file]
res/drawable-xhdpi/ic_device_control_disable.png [deleted file]
res/drawable-xhdpi/ic_device_dark.png [deleted file]
res/drawable-xhdpi/ic_device_disable.png [deleted file]
res/drawable-xhdpi/ic_device_drawer.png [deleted file]
res/drawable-xhdpi/ic_disturb.png [deleted file]
res/drawable-xhdpi/ic_disturb_dark.png [deleted file]
res/drawable-xhdpi/ic_disturb_disable.png [deleted file]
res/drawable-xhdpi/ic_drawer.png [deleted file]
res/drawable-xhdpi/ic_files.png [deleted file]
res/drawable-xhdpi/ic_files_dark.png [deleted file]
res/drawable-xhdpi/ic_files_disable.png [deleted file]
res/drawable-xhdpi/ic_files_edit.png [deleted file]
res/drawable-xhdpi/ic_files_edit_dark.png [deleted file]
res/drawable-xhdpi/ic_files_edit_disable.png [deleted file]
res/drawable-xhdpi/ic_launcher.png [deleted file]
res/drawable-xhdpi/ic_location.png [deleted file]
res/drawable-xhdpi/ic_location_dark.png [deleted file]
res/drawable-xhdpi/ic_location_disable.png [deleted file]
res/drawable-xhdpi/ic_profile_drawer.png [deleted file]
res/drawable-xhdpi/ic_sms.png [deleted file]
res/drawable-xhdpi/ic_sms_dark.png [deleted file]
res/drawable-xhdpi/ic_sms_disable.png [deleted file]
res/drawable-xhdpi/ic_system.png [deleted file]
res/drawable-xhdpi/ic_system_dark.png [deleted file]
res/drawable-xhdpi/ic_system_disable.png [deleted file]
res/drawable-xhdpi/ic_system_red.png [deleted file]
res/drawable-xhdpi/ic_system_red_dark.png [deleted file]
res/drawable-xhdpi/ic_system_red_disable.png [deleted file]
res/drawable-xhdpi/ic_wallet_drawer.png [deleted file]
res/drawable-xhdpi/ic_warning_drawer.png [deleted file]
res/drawable-xhdpi/ic_wiretapping.png [deleted file]
res/drawable-xhdpi/ic_wiretapping_dark.png [deleted file]
res/drawable-xhdpi/ic_wiretapping_disable.png [deleted file]
res/drawable-xhdpi/img_welcome_screen.png [deleted file]
res/drawable-xhdpi/logo_fnp.png [deleted file]
res/drawable-xhdpi/logo_maic.png [deleted file]
res/drawable-xhdpi/logo_samsung.png [deleted file]
res/drawable-xxhdpi/btn_co_moge_normal.png [deleted file]
res/drawable-xxhdpi/btn_co_moge_pressed.png [deleted file]
res/drawable-xxhdpi/btn_legenda_normal.png [deleted file]
res/drawable-xxhdpi/btn_legenda_pressed.png [deleted file]
res/drawable-xxhdpi/btn_odinstaluj_normal.png [deleted file]
res/drawable-xxhdpi/btn_odinstaluj_pressed.png [deleted file]
res/drawable-xxhdpi/btn_ok_normal.png [deleted file]
res/drawable-xxhdpi/btn_ok_pressed.png [deleted file]
res/drawable-xxhdpi/btn_powrot_normal.png [deleted file]
res/drawable-xxhdpi/btn_powrot_pressed.png [deleted file]
res/drawable-xxhdpi/btn_ustawienia_normal.png [deleted file]
res/drawable-xxhdpi/btn_ustawienia_pressed.png [deleted file]
res/drawable-xxhdpi/btn_wiecej_info_normal.png [deleted file]
res/drawable-xxhdpi/btn_wiecej_info_pressed.png [deleted file]
res/drawable-xxhdpi/drawer_shadow.9.png [deleted file]
res/drawable-xxhdpi/ic_broke.png [deleted file]
res/drawable-xxhdpi/ic_broke_dark.png [deleted file]
res/drawable-xxhdpi/ic_broke_disable.png [deleted file]
res/drawable-xxhdpi/ic_call.png [deleted file]
res/drawable-xxhdpi/ic_call_dark.png [deleted file]
res/drawable-xxhdpi/ic_call_disable.png [deleted file]
res/drawable-xxhdpi/ic_call_history.png [deleted file]
res/drawable-xxhdpi/ic_call_history_dark.png [deleted file]
res/drawable-xxhdpi/ic_call_history_disable.png [deleted file]
res/drawable-xxhdpi/ic_communication.png [deleted file]
res/drawable-xxhdpi/ic_communication_dark.png [deleted file]
res/drawable-xxhdpi/ic_communication_disable.png [deleted file]
res/drawable-xxhdpi/ic_cyber_profile.png [deleted file]
res/drawable-xxhdpi/ic_cyber_profile_dark.png [deleted file]
res/drawable-xxhdpi/ic_cyber_profile_disable.png [deleted file]
res/drawable-xxhdpi/ic_data_sending.png [deleted file]
res/drawable-xxhdpi/ic_data_sending_dark.png [deleted file]
res/drawable-xxhdpi/ic_data_sending_disable.png [deleted file]
res/drawable-xxhdpi/ic_data_transmission.png [deleted file]
res/drawable-xxhdpi/ic_data_transmission_dark.png [deleted file]
res/drawable-xxhdpi/ic_data_transmission_disable.png [deleted file]
res/drawable-xxhdpi/ic_device.png [deleted file]
res/drawable-xxhdpi/ic_device_control.png [deleted file]
res/drawable-xxhdpi/ic_device_control_dark.png [deleted file]
res/drawable-xxhdpi/ic_device_control_disable.png [deleted file]
res/drawable-xxhdpi/ic_device_dark.png [deleted file]
res/drawable-xxhdpi/ic_device_disable.png [deleted file]
res/drawable-xxhdpi/ic_device_drawer.png [deleted file]
res/drawable-xxhdpi/ic_disturb.png [deleted file]
res/drawable-xxhdpi/ic_disturb_dark.png [deleted file]
res/drawable-xxhdpi/ic_disturb_disable.png [deleted file]
res/drawable-xxhdpi/ic_drawer.png [deleted file]
res/drawable-xxhdpi/ic_files.png [deleted file]
res/drawable-xxhdpi/ic_files_dark.png [deleted file]
res/drawable-xxhdpi/ic_files_disable.png [deleted file]
res/drawable-xxhdpi/ic_files_edit.png [deleted file]
res/drawable-xxhdpi/ic_files_edit_dark.png [deleted file]
res/drawable-xxhdpi/ic_files_edit_disable.png [deleted file]
res/drawable-xxhdpi/ic_launcher.png [deleted file]
res/drawable-xxhdpi/ic_location.png [deleted file]
res/drawable-xxhdpi/ic_location_dark.png [deleted file]
res/drawable-xxhdpi/ic_location_disable.png [deleted file]
res/drawable-xxhdpi/ic_profile_drawer.png [deleted file]
res/drawable-xxhdpi/ic_sms.png [deleted file]
res/drawable-xxhdpi/ic_sms_dark.png [deleted file]
res/drawable-xxhdpi/ic_sms_disable.png [deleted file]
res/drawable-xxhdpi/ic_system.png [deleted file]
res/drawable-xxhdpi/ic_system_dark.png [deleted file]
res/drawable-xxhdpi/ic_system_disable.png [deleted file]
res/drawable-xxhdpi/ic_system_red.png [deleted file]
res/drawable-xxhdpi/ic_system_red_dark.png [deleted file]
res/drawable-xxhdpi/ic_system_red_disable.png [deleted file]
res/drawable-xxhdpi/ic_wallet_drawer.png [deleted file]
res/drawable-xxhdpi/ic_warning_drawer.png [deleted file]
res/drawable-xxhdpi/ic_wiretapping.png [deleted file]
res/drawable-xxhdpi/ic_wiretapping_dark.png [deleted file]
res/drawable-xxhdpi/ic_wiretapping_disable.png [deleted file]
res/drawable-xxhdpi/img_welcome_screen.png [deleted file]
res/drawable-xxhdpi/logo_fnp.png [deleted file]
res/drawable-xxhdpi/logo_maic.png [deleted file]
res/drawable-xxhdpi/logo_samsung.png [deleted file]
res/drawable-xxhdpi/title_welcome_screen.png [deleted file]
res/drawable/actionbar_background.xml [deleted file]
res/drawable/app_info_settings_button.xml [deleted file]
res/drawable/app_info_uninstall_button.xml [deleted file]
res/drawable/app_info_what_can_button.xml [deleted file]
res/drawable/back_button.xml [deleted file]
res/drawable/custom_border.xml [deleted file]
res/drawable/drawer_background_selector.xml [deleted file]
res/drawable/legend_btn_selector.xml [deleted file]
res/drawable/more_info_button.xml [deleted file]
res/drawable/nav_drawer_separator.9.png [deleted file]
res/drawable/ok_button.xml [deleted file]
res/layout-land/activity_app_info.xml [deleted file]
res/layout-land/activity_popup.xml [deleted file]
res/layout-land/welcome_dialog.xml [deleted file]
res/layout-large-land/activity_main.xml [deleted file]
res/layout/activity_app_info.xml [deleted file]
res/layout/activity_license.xml [deleted file]
res/layout/activity_main.xml [deleted file]
res/layout/activity_popup.xml [deleted file]
res/layout/app_list_item_view.xml [deleted file]
res/layout/drawer_list_item.xml [deleted file]
res/layout/fragment_main.xml [deleted file]
res/layout/fragment_navigation_drawer.xml [deleted file]
res/layout/header_layout.xml [deleted file]
res/layout/threats_list_item.xml [deleted file]
res/layout/welcome_dialog.xml [deleted file]
res/menu/main.xml [deleted file]
res/values-v11/styles.xml [deleted file]
res/values-v14/styles.xml [deleted file]
res/values-w820dp/dimens.xml [deleted file]
res/values/attrs.xml [deleted file]
res/values/color.xml [deleted file]
res/values/dimens.xml [deleted file]
res/values/strings.xml [deleted file]
res/values/styles.xml [deleted file]
res/xml/categories.xml [deleted file]
res/xml/data_send_subcategory.xml [deleted file]
settings.gradle [new file with mode: 0644]
src/com/samsung/srpol/data/Category.java [deleted file]
src/com/samsung/srpol/data/Subcategory.java [deleted file]
src/com/samsung/srpol/loader/AppDetails.java [deleted file]
src/com/samsung/srpol/loader/AppListChangeListener.java [deleted file]
src/com/samsung/srpol/loader/AppListLoader.java [deleted file]
src/com/samsung/srpol/parallax/ParallaxListView.java [deleted file]
src/com/samsung/srpol/parallax/ParallaxListViewHelper.java [deleted file]
src/com/samsung/srpol/parallax/ParallaxedView.java [deleted file]
src/com/samsung/srpol/ui/AppInfoActivity.java [deleted file]
src/com/samsung/srpol/ui/LicenseActivity.java [deleted file]
src/com/samsung/srpol/ui/MainActivity.java [deleted file]
src/com/samsung/srpol/ui/PopupActivity.java [deleted file]
src/com/samsung/srpol/ui/WelcomeDialog.java [deleted file]
src/com/samsung/srpol/ui/drawer/CategoryArrayAdapter.java [deleted file]
src/com/samsung/srpol/ui/drawer/MenuFragment.java [deleted file]
src/com/samsung/srpol/ui/drawer/NavigationDrawerItemListener.java [deleted file]
src/com/samsung/srpol/ui/tabpager/AppListArrayAdapter.java [deleted file]
src/com/samsung/srpol/ui/tabpager/PageAdapter.java [deleted file]
src/com/samsung/srpol/ui/tabpager/PageFragment.java [deleted file]
src/com/samsung/srpol/utils/Utils.java [deleted file]
srpol.iml [new file with mode: 0644]

index bcfdb84..c62b2fb 100644 (file)
@@ -1,4 +1,3 @@
-/bin
-/gen
+/build
 /local.properties
 
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
deleted file mode 100644 (file)
index e7decd3..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-   Copyright (C) 2014  Samsung Electronics Polska Sp. z o.o.
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU AFFERO General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-    You may obtain a copy of the License at
-
-                http://www.gnu.org/licenses/agpl-3.0.txt
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
--->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.samsung.srpol"
-    android:versionCode="7"
-    android:versionName="1.01" >
-
-    <uses-sdk
-        android:minSdkVersion="8"
-        android:targetSdkVersion="21" />
-
-    <application
-        android:allowBackup="true"
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/AppTheme" >
-        <activity
-            android:name="com.samsung.srpol.ui.MainActivity"
-            android:label="@string/app_name"
-            android:launchMode="singleTask" >
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-        <activity
-            android:name="com.samsung.srpol.ui.AppInfoActivity"
-            android:label="@string/app_name" >
-        </activity>
-        <activity
-            android:name="com.samsung.srpol.ui.PopupActivity"
-            android:label="@string/app_name" >
-        </activity>
-        <activity
-            android:name="com.samsung.srpol.ui.LicenseActivity"
-            android:label="@string/app_name" >
-        </activity>
-    </application>
-
-</manifest>
diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..dba13ed
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,661 @@
+                    GNU AFFERO GENERAL PUBLIC LICENSE
+                       Version 3, 19 November 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU Affero General Public License is a free, copyleft license for
+software and other kinds of works, specifically designed to ensure
+cooperation with the community in the case of network server software.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+our General Public Licenses are intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  Developers that use our General Public Licenses protect your rights
+with two steps: (1) assert copyright on the software, and (2) offer
+you this License which gives you legal permission to copy, distribute
+and/or modify the software.
+
+  A secondary benefit of defending all users' freedom is that
+improvements made in alternate versions of the program, if they
+receive widespread use, become available for other developers to
+incorporate.  Many developers of free software are heartened and
+encouraged by the resulting cooperation.  However, in the case of
+software used on network servers, this result may fail to come about.
+The GNU General Public License permits making a modified version and
+letting the public access it on a server without ever releasing its
+source code to the public.
+
+  The GNU Affero General Public License is designed specifically to
+ensure that, in such cases, the modified source code becomes available
+to the community.  It requires the operator of a network server to
+provide the source code of the modified version running there to the
+users of that server.  Therefore, public use of a modified version, on
+a publicly accessible server, gives the public access to the source
+code of the modified version.
+
+  An older license, called the Affero General Public License and
+published by Affero, was designed to accomplish similar goals.  This is
+a different license, not a version of the Affero GPL, but Affero has
+released a new version of the Affero GPL which permits relicensing under
+this license.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU Affero General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Remote Network Interaction; Use with the GNU General Public License.
+
+  Notwithstanding any other provision of this License, if you modify the
+Program, your modified version must prominently offer all users
+interacting with it remotely through a computer network (if your version
+supports such interaction) an opportunity to receive the Corresponding
+Source of your version by providing access to the Corresponding Source
+from a network server at no charge, through some standard or customary
+means of facilitating copying of software.  This Corresponding Source
+shall include the Corresponding Source for any work covered by version 3
+of the GNU General Public License that is incorporated pursuant to the
+following paragraph.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the work with which it is combined will remain governed by version
+3 of the GNU General Public License.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU Affero General Public License from time to time.  Such new versions
+will be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU Affero General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU Affero General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU Affero General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If your software can interact with users remotely through a computer
+network, you should also make sure that it provides a way for users to
+get its source.  For example, if your program is a web application, its
+interface could display a "Source" link that leads users to an archive
+of the code.  There are many ways you could offer source, and different
+solutions will be better for different programs; see section 13 for the
+specific requirements.
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU AGPL, see
+<http://www.gnu.org/licenses/>.
diff --git a/app/app.iml b/app/app.iml
new file mode 100644 (file)
index 0000000..8e83694
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="android-gradle" name="Android-Gradle">
+      <configuration>
+        <option name="GRADLE_PROJECT_PATH" value=":app" />
+      </configuration>
+    </facet>
+    <facet type="android" name="Android">
+      <configuration>
+        <option name="SELECTED_BUILD_VARIANT" value="debug" />
+        <option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
+        <option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
+        <option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugTest" />
+        <option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
+        <option name="TEST_SOURCE_GEN_TASK_NAME" value="generateDebugTestSources" />
+        <option name="ALLOW_USER_CONFIGURATION" value="false" />
+        <option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
+        <option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
+        <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
+      </configuration>
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" inherit-compiler-output="false">
+    <output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/debug" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/test/debug" isTestSource="true" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/test/debug" isTestSource="true" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/test/debug" isTestSource="true" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/test/debug" isTestSource="true" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/test/debug" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/test/debug" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/coverage-instrumented-classes" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/libs" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/ndk" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
+      <excludeFolder url="file://$MODULE_DIR$/build/outputs" />
+    </content>
+    <orderEntry type="jdk" jdkName="Android 5.0.1 Google APIs" jdkType="Android SDK" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" exported="" name="listviewanimations_lib-core_3.1.0" level="project" />
+    <orderEntry type="library" exported="" name="appcompat-v7-21.0.3" level="project" />
+    <orderEntry type="library" exported="" name="support-annotations-21.0.3" level="project" />
+    <orderEntry type="library" exported="" name="nineoldandroids-2.4.0" level="project" />
+    <orderEntry type="library" exported="" name="support-v4-21.0.3" level="project" />
+  </component>
+</module>
+
diff --git a/app/build.gradle b/app/build.gradle
new file mode 100644 (file)
index 0000000..421d2a1
--- /dev/null
@@ -0,0 +1,25 @@
+apply plugin: 'com.android.application'
+
+android {
+    compileSdkVersion 'Google Inc.:Google APIs:21'
+    buildToolsVersion "21.1.2"
+
+    defaultConfig {
+        applicationId "com.samsung.srpol"
+        minSdkVersion 8
+        targetSdkVersion 21
+    }
+
+    buildTypes {
+        release {
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
+        }
+    }
+}
+
+dependencies {
+    compile 'com.android.support:appcompat-v7:21.0.3'
+    compile files('libs/listviewanimations_lib-core_3.1.0.jar')
+    compile files('libs/nineoldandroids-2.4.0.jar')
+}
diff --git a/app/libs/listviewanimations_lib-core_3.1.0.jar b/app/libs/listviewanimations_lib-core_3.1.0.jar
new file mode 100644 (file)
index 0000000..68e3c5a
Binary files /dev/null and b/app/libs/listviewanimations_lib-core_3.1.0.jar differ
diff --git a/app/libs/nineoldandroids-2.4.0.jar b/app/libs/nineoldandroids-2.4.0.jar
new file mode 100644 (file)
index 0000000..43ee45f
Binary files /dev/null and b/app/libs/nineoldandroids-2.4.0.jar differ
diff --git a/app/lint.xml b/app/lint.xml
new file mode 100644 (file)
index 0000000..8423c0e
--- /dev/null
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<lint>
+</lint>
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
new file mode 100644 (file)
index 0000000..e7decd3
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+   Copyright (C) 2014  Samsung Electronics Polska Sp. z o.o.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU AFFERO General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+    You may obtain a copy of the License at
+
+                http://www.gnu.org/licenses/agpl-3.0.txt
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.samsung.srpol"
+    android:versionCode="7"
+    android:versionName="1.01" >
+
+    <uses-sdk
+        android:minSdkVersion="8"
+        android:targetSdkVersion="21" />
+
+    <application
+        android:allowBackup="true"
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme" >
+        <activity
+            android:name="com.samsung.srpol.ui.MainActivity"
+            android:label="@string/app_name"
+            android:launchMode="singleTask" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity
+            android:name="com.samsung.srpol.ui.AppInfoActivity"
+            android:label="@string/app_name" >
+        </activity>
+        <activity
+            android:name="com.samsung.srpol.ui.PopupActivity"
+            android:label="@string/app_name" >
+        </activity>
+        <activity
+            android:name="com.samsung.srpol.ui.LicenseActivity"
+            android:label="@string/app_name" >
+        </activity>
+    </application>
+
+</manifest>
diff --git a/app/src/main/ic_launcher-web.png b/app/src/main/ic_launcher-web.png
new file mode 100644 (file)
index 0000000..b843eee
Binary files /dev/null and b/app/src/main/ic_launcher-web.png differ
diff --git a/app/src/main/java/com/samsung/srpol/data/Category.java b/app/src/main/java/com/samsung/srpol/data/Category.java
new file mode 100644 (file)
index 0000000..8127b82
--- /dev/null
@@ -0,0 +1,147 @@
+/*
+   Copyright (C) 2014  Samsung Electronics Polska Sp. z o.o.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU AFFERO General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+    You may obtain a copy of the License at
+
+                http://www.gnu.org/licenses/agpl-3.0.txt
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+package com.samsung.srpol.data;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import com.samsung.srpol.loader.AppDetails;
+
+import android.content.Context;
+import android.graphics.drawable.Drawable;
+
+public class Category {
+
+    private String mTitle;
+    private String mHeader;
+    private String mDescription;
+    private String mShortDescription;
+    private int mSubCategoriesMask;
+    private int mIconRes;
+    private String mLink;
+    private boolean mCanSendData;
+    private Drawable mIconDrawable;
+    private ArrayList<Subcategory> mSubCategories;
+    private ArrayList<AppDetails> mRelatedApps = new ArrayList<AppDetails>();
+    private int mCurrentlyVisible;
+
+    public Category(Context ctx, String title, String header,
+            String shortDescription, String description, int icon, String link,
+            boolean dataSend, ArrayList<Subcategory> subCategories) {
+        mTitle = title;
+        mHeader = header;
+        mShortDescription = shortDescription;
+        mDescription = description;
+        mIconRes = icon;
+        mLink = link;
+        mIconDrawable = ctx.getResources().getDrawable(mIconRes);
+        mSubCategories = subCategories;
+        for (Subcategory subcategory : mSubCategories)
+            mSubCategoriesMask = mSubCategoriesMask | subcategory.getId();
+        mCanSendData = dataSend;
+        mCurrentlyVisible = mRelatedApps.size();
+    }
+
+    public void removeAppFromList(AppDetails removed) {
+        mRelatedApps.remove(removed);
+    }
+
+    public int getSubCategoriesMask() {
+        return mSubCategoriesMask;
+    }
+    
+    public void addApplicationToCategory(AppDetails toBeAdded) {
+        int size = mRelatedApps.size();
+        addAppToList(toBeAdded);
+        if (size < mRelatedApps.size())
+            Collections.sort(mRelatedApps, AppDetails.SMART_COMPARATOR);
+    }
+
+    private void addAppToList(AppDetails toBeAdded) {
+        // Checking if any subcategory fits
+        if (!toBeAdded.isInSubcategory(mSubCategoriesMask)
+                || (mCanSendData && !toBeAdded
+                        .isInSubcategory(Subcategory.CAN_SEND_DATA_SUB_CATEGORY_ID)))
+            return;
+        mRelatedApps.add(toBeAdded);
+    }
+
+    public List<Subcategory> getSubCategories() {
+        return mSubCategories;
+    }
+
+    /**
+     * Create app list
+     */
+    public void assignAppsToCategory(List<AppDetails> appDetailsList) {
+        mRelatedApps.clear();
+
+        if (appDetailsList != null && mSubCategories != null) {
+            for (AppDetails appDetails : appDetailsList) {
+                addAppToList(appDetails);
+            }
+        }
+    }
+
+    /**
+     * @return the mRelatedApps
+     */
+    public ArrayList<AppDetails> getRelatedApps() {
+        return mRelatedApps;
+    }
+
+    public int getIconRes() {
+        return mIconRes;
+    }
+
+    public Drawable getIconDrawable() {
+        return mIconDrawable;
+    }
+
+    public String getTitle() {
+        return mTitle;
+    }
+
+    public String getDescription() {
+        return mDescription;
+    }
+
+    public String getHeader() {
+        return mHeader;
+    }
+
+    public String getShortDescription() {
+        return mShortDescription;
+    }
+
+    public void updateVisibleCount(int size) {
+        mCurrentlyVisible = size;
+    }
+
+    public int getCurrentlyVisible() {
+        return mCurrentlyVisible;
+    }
+
+    public String getLink() {
+        return mLink;
+    }
+}
diff --git a/app/src/main/java/com/samsung/srpol/data/Subcategory.java b/app/src/main/java/com/samsung/srpol/data/Subcategory.java
new file mode 100644 (file)
index 0000000..6eb1bc5
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+   Copyright (C) 2014  Samsung Electronics Polska Sp. z o.o.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU AFFERO General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+    You may obtain a copy of the License at
+
+                http://www.gnu.org/licenses/agpl-3.0.txt
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+package com.samsung.srpol.data;
+
+import java.util.ArrayList;
+
+import android.content.Context;
+import android.content.res.Resources.NotFoundException;
+import android.graphics.drawable.Drawable;
+
+public class Subcategory {
+
+    public static final int CAN_SEND_DATA_SUB_CATEGORY_ID = 1;
+    public static final String CAN_SEND_DATA_SUB_CATEGORY_HEADER = "uprawnienia do przesyƂu danych";
+    private static final String DARK_SUFIX = "_dark";
+    private static final String DISABLE_SUFIX = "_disable";
+    private static int mIdGenerator = 2;
+
+    private int mSubcatId;
+    private String mHeader;
+    private String mDescription;
+    private int mIconRes;
+    private Drawable mIconDrawable;
+    private Drawable mIconDarkDrawable;
+    private Drawable mIconDisabledDrawable;
+    private ArrayList<String> mPermissions;
+
+    public Subcategory(Context context, String header, String description,
+            String icon, ArrayList<String> permissions) {
+        mHeader = header;
+        mDescription = description;
+        if (mHeader.equals(CAN_SEND_DATA_SUB_CATEGORY_HEADER)) {
+            mSubcatId = CAN_SEND_DATA_SUB_CATEGORY_ID;
+        } else {
+            mSubcatId = mIdGenerator;
+            mIdGenerator = mIdGenerator << 1;
+        }
+
+        String packageName = context.getPackageName();
+        mIconRes = context.getResources().getIdentifier(icon, "drawable",
+                packageName);
+        mIconDrawable = context.getResources().getDrawable(mIconRes);
+
+        int iconDarkRes = context.getResources().getIdentifier(
+                icon.concat(DARK_SUFIX), "drawable", packageName);
+        try {
+            mIconDarkDrawable = context.getResources().getDrawable(iconDarkRes);
+        } catch (NotFoundException ex) {
+            mIconDarkDrawable = mIconDrawable;
+        }
+        
+        int iconDisableRes = context.getResources().getIdentifier(icon.concat(DISABLE_SUFIX), "drawable", packageName);
+        try {
+            mIconDisabledDrawable = context.getResources().getDrawable(iconDisableRes);
+        } catch (NotFoundException ex) {
+            mIconDisabledDrawable = mIconDrawable;
+        }
+        
+        mPermissions = permissions;
+    }
+
+    public ArrayList<String> getPermissions() {
+        return mPermissions;
+    }
+
+    public int getId() {
+        return mSubcatId;
+    }
+
+    public String getHeader() {
+        return mHeader;
+    }
+
+    public Drawable getIconDrawable() {
+        return mIconDrawable;
+    }
+
+    public Drawable getDarkIcon() {
+        return mIconDarkDrawable;
+    }
+    
+    public Drawable getDisabledIcon() {
+        return mIconDisabledDrawable;
+    }
+
+    public String getDescription() {
+        return mDescription;
+    }
+
+    public static void resetGenerator() {
+        mIdGenerator = 2;
+    }
+
+}
diff --git a/app/src/main/java/com/samsung/srpol/loader/AppDetails.java b/app/src/main/java/com/samsung/srpol/loader/AppDetails.java
new file mode 100644 (file)
index 0000000..6fff62b
--- /dev/null
@@ -0,0 +1,198 @@
+/*
+   Copyright (C) 2014  Samsung Electronics Polska Sp. z o.o.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU AFFERO General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+    You may obtain a copy of the License at
+
+                http://www.gnu.org/licenses/agpl-3.0.txt
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+package com.samsung.srpol.loader;
+
+import java.io.File;
+import java.util.Comparator;
+
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.graphics.ColorMatrix;
+import android.graphics.ColorMatrixColorFilter;
+import android.graphics.drawable.Drawable;
+import android.os.Build;
+
+/**
+ * Helper class containing details about given permission
+ * 
+ * This Class contains : String mPermissionName; String
+ *         mPermissionLabel; String mPermissionDetails;
+ */
+public class AppDetails {
+    public static final String TAG = "AppDetails";
+    private static final ColorMatrixColorFilter mGrayscaleFilter;
+
+    private String mAppName;
+    private String mPackageName;
+    private Drawable mAppIcon;
+    private boolean mSystemApp;
+
+    private int mSubCategoriesMask;
+
+    private static AppListLoader mLoader;
+    private boolean mEnabled;
+    private boolean mMounted;
+    private final File mApkFile;
+
+    static {
+        ColorMatrix matrix = new ColorMatrix();
+        matrix.setSaturation(0);
+        mGrayscaleFilter = new ColorMatrixColorFilter(matrix);
+    }
+
+    public AppDetails(AppListLoader loader, PackageInfo packageinfo) {
+        mLoader = loader;
+        mPackageName = packageinfo.applicationInfo.packageName;
+        mEnabled = packageinfo.applicationInfo.enabled;
+        mApkFile = new File(packageinfo.applicationInfo.sourceDir);
+        if (!mApkFile.exists()) {
+            mMounted = false;
+            mAppName = packageinfo.applicationInfo.packageName;
+        } else {
+            mMounted = true;
+            CharSequence label = packageinfo.applicationInfo.loadLabel(mLoader.getPm());
+            mAppName = label != null ? label.toString()
+                    : packageinfo.applicationInfo.packageName;
+        }
+        mSystemApp = (packageinfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) > 0;
+    }
+
+    /**
+     * @return the mAppName
+     */
+    public String getAppName() {
+        return mAppName;
+    }
+
+    /**
+     * @return the mAppPackageName
+     */
+    public String getAppPackageName() {
+        return mPackageName;
+    }
+
+    /**
+     * @return the mAppIcon
+     */
+    public Drawable getAppIcon() {
+        if (mAppIcon == null || !mMounted) {
+            if (mApkFile.exists()) {
+                try {
+                    mAppIcon = mLoader.getPm().getApplicationIcon(mPackageName);
+                } catch (NameNotFoundException e) {
+                    mAppIcon = mLoader.getContext().getResources()
+                            .getDrawable(android.R.drawable.sym_def_app_icon);
+                }
+                mMounted = true;
+                return updateAppIconColor(mAppIcon);
+            } else {
+                mMounted = false;
+                return updateAppIconColor(mLoader.getContext().getResources()
+                        .getDrawable(android.R.drawable.sym_def_app_icon));
+            }
+        } else
+            return mAppIcon;
+    }
+
+    public int getSubcategoriesMask() {
+        return mSubCategoriesMask;
+    }
+
+    public boolean isInSubcategory(int subcategoryId) {
+        return (mSubCategoriesMask & subcategoryId) > 0;
+    }
+    
+    public boolean isInAllSubcategories(int subcategoryIds) {
+        return (mSubCategoriesMask & subcategoryIds) == subcategoryIds;
+    }
+
+    public boolean isEnabled() {
+        return mEnabled;
+    }
+
+    public void setEnabled(boolean state) {
+        mEnabled = state;
+        updateAppIconColor(mAppIcon);
+    }
+
+    private Drawable updateAppIconColor(Drawable icon) {
+        // disabling and enabling apps in system application manager is
+        // available since API 4.0
+        if (icon != null
+                && Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
+            if (mEnabled) {
+                icon.setColorFilter(null);
+            } else {
+                icon.setColorFilter(mGrayscaleFilter);
+            }
+        }
+        return icon;
+    }
+
+    /**
+     * @return the mSystemApp
+     */
+    public boolean isSystemApp() {
+        return mSystemApp;
+    }
+
+    public void addSubcategory(int id) {
+        mSubCategoriesMask |= id;
+    }
+
+    /**
+     * @return the mAppPackageName
+     */
+    @Override
+    public String toString() {
+        return mPackageName;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (o instanceof AppDetails) {
+            AppDetails appDetails = (AppDetails) o;
+            if (appDetails.getAppPackageName().equals(mPackageName)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Perform inteligent comparison of application entry objects.
+     */
+    public static final Comparator<AppDetails> SMART_COMPARATOR = new Comparator<AppDetails>() {
+        @Override
+        public int compare(AppDetails object1, AppDetails object2) {
+            if (object1.mSystemApp) {
+                if (object2.mSystemApp)
+                    return object1.mAppName.compareTo(object2.mAppName);
+                return 1;
+            } else {
+                if (object2.mSystemApp)
+                    return -1;
+                return object1.mAppName.compareTo(object2.mAppName);
+            }
+        }
+    };
+}
diff --git a/app/src/main/java/com/samsung/srpol/loader/AppListChangeListener.java b/app/src/main/java/com/samsung/srpol/loader/AppListChangeListener.java
new file mode 100644 (file)
index 0000000..d176903
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+   Copyright (C) 2014  Samsung Electronics Polska Sp. z o.o.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU AFFERO General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+    You may obtain a copy of the License at
+
+                http://www.gnu.org/licenses/agpl-3.0.txt
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+package com.samsung.srpol.loader;
+
+public interface AppListChangeListener {
+
+    public void onAppListChanged();
+}
diff --git a/app/src/main/java/com/samsung/srpol/loader/AppListLoader.java b/app/src/main/java/com/samsung/srpol/loader/AppListLoader.java
new file mode 100644 (file)
index 0000000..3dfdb0f
--- /dev/null
@@ -0,0 +1,627 @@
+/*
+   Copyright (C) 2014  Samsung Electronics Polska Sp. z o.o.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU AFFERO General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+    You may obtain a copy of the License at
+
+                http://www.gnu.org/licenses/agpl-3.0.txt
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+package com.samsung.srpol.loader;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+
+import org.xmlpull.v1.XmlPullParserException;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.pm.Signature;
+import android.content.res.XmlResourceParser;
+import android.support.v4.content.AsyncTaskLoader;
+
+import com.samsung.srpol.R;
+import com.samsung.srpol.data.Category;
+import com.samsung.srpol.data.Subcategory;
+
+/**
+ * A custom Loader that loads all of the installed applications.
+ */
+public class AppListLoader extends AsyncTaskLoader<List<AppDetails>> {
+    private static final String SYSTEM_UI = "com.android.systemui";
+    private static final String PHONE = "com.android.phone";
+
+    public static final String PREF_INCLUDE_SYSTEM_APPS = "include_system_apps";
+
+    private final PackageManager mPm;
+
+    private static List<AppDetails> mAppDetailsList = null;
+    private static List<Category> mCategories;
+    private static ArrayList<Subcategory> mSubcategories;
+    private static HashMap<String, Integer> mAllPermissionsHash;
+
+    private PackageIntentReceiver mPackageObserver;
+    private boolean mWasDataReloaded = true;
+    private static OnAppRemoveListener mChangeListener = null;
+
+    public AppListLoader(Context context) {
+        super(context);
+
+        if (mCategories == null || mSubcategories == null
+                || mAllPermissionsHash == null)
+            initCategories(context);
+
+        mPm = getContext().getPackageManager();
+    }
+
+    private void initCategories(Context context) {
+        mCategories = new ArrayList<Category>();
+        mSubcategories = new ArrayList<Subcategory>();
+        Subcategory.resetGenerator();
+
+        // Reading "data send" subcategory as it is common
+        try {
+            XmlResourceParser parser = context.getResources().getXml(
+                    R.xml.data_send_subcategory);
+            int eventType = 0;
+            while (eventType != XmlResourceParser.END_DOCUMENT
+                    && eventType != XmlResourceParser.START_TAG)
+                eventType = parser.next();
+            if (eventType != XmlResourceParser.END_DOCUMENT) {
+                Subcategory subcategory = readSubCategory(parser);
+                mSubcategories.add(subcategory);
+            }
+        } catch (XmlPullParserException ex) {
+            ex.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
+        // Reading all categories and subcategories from xml
+        try {
+            XmlResourceParser parser = context.getResources().getXml(
+                    R.xml.categories);
+            int eventType = 0;
+            while (eventType != XmlResourceParser.END_DOCUMENT
+                    && eventType != XmlResourceParser.START_TAG)
+                eventType = parser.next();
+            if (eventType != XmlResourceParser.END_DOCUMENT) {
+                parser.require(XmlResourceParser.START_TAG, null, "container");
+                while (parser.next() != XmlResourceParser.END_TAG) {
+                    if (parser.getEventType() != XmlResourceParser.START_TAG)
+                        continue;
+                    if (!parser.getName().equals("category"))
+                        continue;
+                    Category cat = readCategory(parser);
+                    mCategories.add(cat);
+                    mSubcategories.addAll(cat.getSubCategories());
+                }
+            }
+        } catch (XmlPullParserException ex) {
+            ex.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
+        mAllPermissionsHash = new HashMap<String, Integer>();
+        for (Subcategory subcat : mSubcategories) {
+            for (String perm : subcat.getPermissions()) {
+                Integer value = mAllPermissionsHash.get(perm);
+                if (value == null) {
+                    mAllPermissionsHash.put(perm, Integer.valueOf(subcat.getId()));
+                } else {
+                    value |= subcat.getId();
+                    mAllPermissionsHash.put(perm, value);
+                }
+            }
+        }
+    }
+
+    private Category readCategory(XmlResourceParser parser)
+            throws XmlPullParserException, IOException {
+        parser.require(XmlResourceParser.START_TAG, null, "category");
+        String title = null, header = null, description = null, shortDescription = null, link = null;
+        int icon = 0;
+        boolean dataSend = false;
+        ArrayList<Subcategory> subCategories = new ArrayList<Subcategory>();
+
+        while (parser.next() != XmlResourceParser.END_TAG) {
+            if (parser.getEventType() != XmlResourceParser.START_TAG)
+                continue;
+            String name = parser.getName();
+            if (name.equals("title")) {
+                title = readTextElement(parser, name);
+            } else if (name.equals("header")) {
+                header = readTextElement(parser, name);
+            } else if (name.equals("short_description")) {
+                shortDescription = readTextElement(parser, name);
+            } else if (name.equals("description")) {
+                description = readTextElement(parser, name);
+            } else if (name.equals("icon")) {
+                icon = getContext().getResources().getIdentifier(
+                        readTextElement(parser, name), "drawable",
+                        getContext().getPackageName());
+            } else if (name.equals("link")) {
+                link = readTextElement(parser, name);
+            } else if (name.equals("dataSend")) {
+                dataSend = Boolean.parseBoolean(readTextElement(parser, name));
+            } else if (name.equals("subcategories")) {
+                while (parser.next() != XmlResourceParser.END_TAG) {
+                    subCategories.add(readSubCategory(parser));
+                }
+            } else
+                skip(parser);
+        }
+        return new Category(getContext(), title, header, shortDescription,
+                description, icon, link, dataSend, subCategories);
+    }
+
+    private Subcategory readSubCategory(XmlResourceParser parser)
+            throws XmlPullParserException, IOException {
+        parser.require(XmlResourceParser.START_TAG, null, "subcategory");
+        String header = null, description = null, icon = null;
+        ArrayList<String> permissions = new ArrayList<String>();
+
+        while (parser.next() != XmlResourceParser.END_TAG) {
+            if (parser.getEventType() != XmlResourceParser.START_TAG)
+                continue;
+            String name = parser.getName();
+            if (name.equals("header")) {
+                header = readTextElement(parser, name);
+            } else if (name.equals("description")) {
+                description = readTextElement(parser, name);
+            } else if (name.equals("icon")) {
+                icon = readTextElement(parser, name);
+            } else if (name.equals("permissions")) {
+                while (parser.next() != XmlResourceParser.END_TAG) {
+                    permissions.add(readTextElement(parser, "item"));
+                }
+            } else
+                skip(parser);
+        }
+
+        return new Subcategory(getContext(), header, description, icon,
+                permissions);
+    }
+
+    private String readTextElement(XmlResourceParser parser, String element)
+            throws XmlPullParserException, IOException {
+        parser.require(XmlResourceParser.START_TAG, null, element);
+        String title = readText(parser);
+        parser.require(XmlResourceParser.END_TAG, null, element);
+        return title;
+    }
+
+    private String readText(XmlResourceParser parser)
+            throws XmlPullParserException, IOException {
+        String result = "";
+        if (parser.next() == XmlResourceParser.TEXT) {
+            result = parser.getText();
+            parser.nextTag();
+        }
+        return result;
+    }
+
+    private void skip(XmlResourceParser parser) throws XmlPullParserException,
+            IOException {
+        if (parser.getEventType() != XmlResourceParser.START_TAG) {
+            throw new IllegalStateException();
+        }
+        int depth = 1;
+        while (depth != 0) {
+            switch (parser.next()) {
+            case XmlResourceParser.END_TAG:
+                depth--;
+                break;
+            case XmlResourceParser.START_TAG:
+                depth++;
+                break;
+            }
+        }
+    }
+
+    /**
+     * Get Signature keys of given package
+     * 
+     * @param packageName
+     *            package name to retrieve signature keys
+     * @return Signature[] containing given package name signature keys
+     */
+    private Signature[] getSignature(String packageName) {
+
+        try {
+            PackageInfo packageInfo = getPm().getPackageInfo(packageName,
+                    PackageManager.GET_SIGNATURES);
+            Signature[] sigs = packageInfo.signatures;
+            return sigs;
+        } catch (NameNotFoundException e) {
+            return null;
+        }
+
+    }
+
+    /**
+     * Get Signature keys for given PackageInfo
+     * 
+     * @param packageInfo
+     *            PackageInfo to retrieve signature keys
+     * @return Signature[] containing given PackageInfo signature keys
+     */
+    @SuppressWarnings("unused")
+    private Signature[] getSignature(PackageInfo packageInfo) {
+
+        Signature[] sigs = packageInfo.signatures;
+        return sigs;
+
+    }
+
+    /**
+     * Get Platform signature key. we check signature of SystemUI process or
+     * Phone process
+     * 
+     * @return Signature platform sign key or null if not found
+     */
+    @SuppressWarnings("unused")
+    private Signature getPlatformSignature() {
+        Signature sig = getSignature(SYSTEM_UI)[0];
+        if (sig == null) {
+            sig = getSignature(PHONE)[0];
+        }
+        return sig;
+    }
+
+    /**
+     * Filter given ApplicationInfo list only to apps that are not platform
+     * signed
+     * 
+     * @param appList
+     *            List<ApplicationInfo> with a list of apps to filter
+     * @return List<ApplicationInfo> filtred app list
+     */
+    private List<PackageInfo> filterToNotPlatformKeyAppList(List<PackageInfo> packageList) {
+        if (packageList != null) {
+
+            List<PackageInfo> noPlatformKeyAppList = new ArrayList<PackageInfo>();
+            for (PackageInfo packageInfo : packageList) {
+                try {
+                    packageInfo = mPm.getPackageInfo(packageInfo.packageName,
+                            PackageManager.GET_ACTIVITIES
+                                    | PackageManager.GET_PERMISSIONS
+                                    | PackageManager.GET_SIGNATURES);
+                } catch (NameNotFoundException e) {
+                    continue;
+                }
+                // Check signature match with SystemUI
+                if (((packageInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) == 0 || (packageInfo.activities != null && packageInfo.activities.length > 0))
+                        && getPm().checkSignatures(SYSTEM_UI,
+                                packageInfo.packageName) != PackageManager.SIGNATURE_MATCH) {
+                    noPlatformKeyAppList.add(packageInfo);
+                }
+            }
+            return noPlatformKeyAppList;
+        } else {
+            return null;
+        }
+    }
+
+    private PackageInfo getInstalledAppDetails(String packageName) {
+        PackageInfo info = null;
+        try {
+            info = getPm().getPackageInfo(
+                    packageName,
+                    PackageManager.GET_META_DATA
+                            | PackageManager.GET_PERMISSIONS
+                            | PackageManager.GET_SIGNATURES);
+        } catch (NameNotFoundException e) {
+            e.printStackTrace();
+        }
+        return info;
+    }
+
+    @Override
+    public List<AppDetails> loadInBackground() {
+        List<PackageInfo> appList = mPm.getInstalledPackages(0);
+
+        appList = filterToNotPlatformKeyAppList(appList);
+
+        HashMap<String, AppDetails> appDetailsHash = new HashMap<String, AppDetails>(
+                appList.size());
+        if (mSubcategories.size() == 0) {
+            for (PackageInfo pInfo : appList) {
+                appDetailsHash.put(pInfo.packageName, new AppDetails(this,
+                        pInfo));
+            }
+        } else {
+            for (PackageInfo packageInfo : appList) {
+                String[] requestedPermissions = packageInfo.requestedPermissions;
+                if (requestedPermissions != null) {
+                    AppDetails appDetails = appDetailsHash.get(packageInfo.packageName);
+                    for (String permissionName : requestedPermissions) {
+                        Integer subcategories = mAllPermissionsHash.get(permissionName);
+                        if (subcategories != null 
+                                && (appDetails == null || !appDetails.isInAllSubcategories(subcategories))
+                                && getPm().checkPermission(permissionName,
+                                        packageInfo.packageName) == PackageManager.PERMISSION_GRANTED) {
+                            if (appDetails == null) {
+                                appDetails = new AppDetails(this, packageInfo);
+                                appDetailsHash.put(packageInfo.packageName,
+                                        appDetails);
+                            }
+                            appDetails.addSubcategory(subcategories);
+                        }
+                    }
+                }
+            }
+        }
+        // Sort the list.
+        List<AppDetails> list = new ArrayList<AppDetails>(
+                appDetailsHash.values());
+        Collections.sort(list, AppDetails.SMART_COMPARATOR);
+
+        for (Category category : mCategories)
+            category.assignAppsToCategory(list);
+
+        mWasDataReloaded = true;
+        return list;
+    }
+
+    /**
+     * Called when there is new data to deliver to the client. The super class
+     * will take care of delivering it; the implementation here just adds a
+     * little more logic.
+     */
+    @Override
+    public void deliverResult(List<AppDetails> apps) {
+        if (isReset()) {
+            apps = null;
+        }
+        mAppDetailsList = apps;
+
+        if (isStarted()) {
+            // If the Loader is currently started, we can immediately
+            // deliver its results.
+            super.deliverResult(apps);
+        }
+    }
+
+    /**
+     * Handles a request to start the Loader.
+     */
+    @Override
+    protected void onStartLoading() {
+        if (mAppDetailsList != null) {
+            // If we currently have a result available, deliver it
+            // immediately.
+            deliverResult(mAppDetailsList);
+        }
+
+        // Start watching for changes in the app data.
+        if (mPackageObserver == null) {
+            mPackageObserver = new PackageIntentReceiver(this);
+        }
+
+        if (takeContentChanged() || mAppDetailsList == null) {
+            // If the data has changed since the last time it was loaded
+            // or is not currently available, start a load.
+            forceLoad();
+        }
+    }
+
+    /**
+     * Handles a request to stop the Loader.
+     */
+    @Override
+    protected void onStopLoading() {
+        // Attempt to cancel the current load task if possible.
+        cancelLoad();
+    }
+
+    /**
+     * Handles a request to completely reset the Loader.
+     */
+    @Override
+    protected void onReset() {
+
+        // Ensure the loader is stopped
+        onStopLoading();
+
+        // Stop monitoring for changes.
+        if (mPackageObserver != null) {
+            getContext().unregisterReceiver(mPackageObserver);
+            mPackageObserver = null;
+        }
+    }
+
+    /**
+     * Gets AppDetails from mAppDetailsList for a given PackageName
+     * 
+     * @param packageName
+     *            PackageName for which to get AppDetails
+     * @return AppDetails for given PackageName
+     */
+    public static AppDetails getAppDetails(String packageName) {
+        if (packageName != null && mAppDetailsList != null) {
+            for (AppDetails appDetails : mAppDetailsList) {
+                if (packageName.equals(appDetails.getAppPackageName())) {
+                    return appDetails;
+                }
+            }
+        }
+        return null;
+    }
+
+    public static void setOnChangeListener(OnAppRemoveListener listener) {
+        mChangeListener = listener;
+    }
+
+    /**
+     * @return the mAppDetailsList
+     */
+    public static List<AppDetails> getAppDetailsList() {
+        return mAppDetailsList;
+    }
+
+    /**
+     * @return the mCategories
+     */
+    static public List<Category> getCategories() {
+        return mCategories;
+    }
+
+    public static List<Subcategory> getSubcategoriesOfMask(int subcategoriesMask) {
+        ArrayList<Subcategory> list = new ArrayList<Subcategory>();
+        for (Subcategory subcategory : mSubcategories) {
+            if ((subcategoriesMask & subcategory.getId()) > 0) {
+                list.add(subcategory);
+            }
+        }
+        return list;
+    }
+
+    public PackageManager getPm() {
+        return mPm;
+    }
+
+    public interface OnAppRemoveListener {
+        public void onPackageRemoved(String packageName);
+    }
+
+    /**
+     * Helper class to look for interesting changes to the installed apps so
+     * that the loader can be updated.
+     */
+    public static class PackageIntentReceiver extends BroadcastReceiver {
+        private final AppListLoader mLoader;
+
+        public PackageIntentReceiver(AppListLoader loader) {
+            mLoader = loader;
+            IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED);
+            filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
+            filter.addAction(Intent.ACTION_PACKAGE_CHANGED);
+            filter.addDataScheme("package");
+            mLoader.getContext().registerReceiver(this, filter);
+            // Register for events related to sdcard installation.
+            IntentFilter sdFilter = new IntentFilter();
+            sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE);
+            sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE);
+            mLoader.getContext().registerReceiver(this, sdFilter);
+        }
+
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            if (intent.getAction().equals(
+                    Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE)) {
+                mLoader.onPackagesAdded(intent
+                        .getStringArrayExtra(Intent.EXTRA_CHANGED_PACKAGE_LIST));
+            } else if (intent.getAction().equals(
+                    Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE)) {
+                mLoader.onPackagesRemoved(intent
+                        .getStringArrayExtra(Intent.EXTRA_CHANGED_PACKAGE_LIST));
+            } else if (intent.getAction().equals(Intent.ACTION_PACKAGE_REMOVED))
+                mLoader.onPackageRemoved(intent.getData()
+                        .getSchemeSpecificPart(), true);
+            else if (intent.getAction().equals(Intent.ACTION_PACKAGE_ADDED))
+                mLoader.onPackageAdded(
+                        intent.getData().getSchemeSpecificPart(), true);
+            else if (intent.getAction().equals(Intent.ACTION_PACKAGE_CHANGED))
+                mLoader.onPackageChanged(intent.getData()
+                        .getSchemeSpecificPart());
+        }
+    }
+
+    public void onPackageRemoved(String packageName, boolean deliverResult) {
+        if (mChangeListener != null)
+            mChangeListener.onPackageRemoved(packageName);
+        for (AppDetails details : mAppDetailsList) {
+            if (details.getAppPackageName().equals(packageName)) {
+                mAppDetailsList.remove(details);
+                for (Category category : mCategories)
+                    category.removeAppFromList(details);
+                if (deliverResult)
+                    deliverResult(new ArrayList<AppDetails>(mAppDetailsList));
+                break;
+            }
+        }
+    }
+
+    public void onPackagesRemoved(String[] packageNames) {
+        for (String packageName : packageNames) {
+            onPackageRemoved(packageName, false);
+        }
+        deliverResult(new ArrayList<AppDetails>(mAppDetailsList));
+    }
+
+    public void onPackageChanged(String packageName) {
+        for (AppDetails details : mAppDetailsList) {
+            if (details.getAppPackageName().equals(packageName)) {
+                PackageInfo packageInfo = getInstalledAppDetails(packageName);
+                if (packageInfo == null)
+                    return;
+                details.setEnabled(packageInfo.applicationInfo.enabled);
+                deliverResult(new ArrayList<AppDetails>(mAppDetailsList));
+                break;
+            }
+        }
+    }
+
+    public void onPackageAdded(String packageName, boolean deliverResult) {
+        PackageInfo packageInfo = getInstalledAppDetails(packageName);
+        if (packageInfo == null)
+            return;
+        AppDetails newPackage = new AppDetails(this, packageInfo);
+
+        String[] requestedPermissions = packageInfo.requestedPermissions;
+        if (requestedPermissions != null && mSubcategories != null) {
+            for (String permissionName : requestedPermissions) {
+                Integer subcategories = mAllPermissionsHash.get(permissionName);
+                if (subcategories != null
+                        && getPm().checkPermission(permissionName,
+                                packageInfo.packageName) == PackageManager.PERMISSION_GRANTED) {
+                    newPackage.addSubcategory(subcategories);
+                }
+            }
+        }
+        mAppDetailsList.add(newPackage);
+
+        for (Category category : mCategories)
+            category.addApplicationToCategory(newPackage);
+        if (deliverResult)
+            deliverResult(new ArrayList<AppDetails>(mAppDetailsList));
+    }
+
+    public void onPackagesAdded(String[] packageNames) {
+        for (String packageStr : packageNames) {
+            onPackageAdded(packageStr, false);
+        }
+
+        deliverResult(new ArrayList<AppDetails>(mAppDetailsList));
+    }
+
+    public boolean wasDataReloaded() {
+        return mWasDataReloaded;
+    }
+
+    public void resetWasDataReloaded() {
+        mWasDataReloaded = false;
+    }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/samsung/srpol/parallax/ParallaxListView.java b/app/src/main/java/com/samsung/srpol/parallax/ParallaxListView.java
new file mode 100644 (file)
index 0000000..5fb5ebd
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+    The MIT License (MIT)
+    
+    Copyright (c) 2014 Nir Hartmann
+    
+    Permission is hereby granted, free of charge, to any person obtaining a copy
+    of this software and associated documentation files (the "Software"), to deal
+    in the Software without restriction, including without limitation the rights
+    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+    copies of the Software, and to permit persons to whom the Software is
+    furnished to do so, subject to the following conditions:
+    
+    The above copyright notice and this permission notice shall be included in all
+    copies or substantial portions of the Software.
+    
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+    SOFTWARE.
+ */
+package com.samsung.srpol.parallax;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.View;
+import android.widget.ListView;
+
+public class ParallaxListView extends ListView {
+
+    private ParallaxListViewHelper helper;
+
+    public ParallaxListView(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+        init(context, attrs);
+    }
+
+    public ParallaxListView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        init(context, attrs);
+    }
+
+    protected void init(Context context, AttributeSet attrs) {
+        helper = new ParallaxListViewHelper(context, attrs, this);
+        super.setOnScrollListener(helper);
+    }
+
+    @Override
+    public void setOnScrollListener(OnScrollListener l) {
+        helper.setOnScrollListener(l);
+    }
+
+    public void addParallaxedHeaderView(View v) {
+        super.addHeaderView(v);
+        helper.addParallaxedHeaderView(v);
+    }
+
+    public void addParallaxedHeaderView(View v, Object data,
+            boolean isSelectable) {
+        super.addHeaderView(v, data, isSelectable);
+        helper.addParallaxedHeaderView(v, data, isSelectable);
+    }
+}
diff --git a/app/src/main/java/com/samsung/srpol/parallax/ParallaxListViewHelper.java b/app/src/main/java/com/samsung/srpol/parallax/ParallaxListViewHelper.java
new file mode 100644 (file)
index 0000000..9e1a055
--- /dev/null
@@ -0,0 +1,169 @@
+/*
+    The MIT License (MIT)
+    
+    Copyright (c) 2014 Nir Hartmann
+    
+    Permission is hereby granted, free of charge, to any person obtaining a copy
+    of this software and associated documentation files (the "Software"), to deal
+    in the Software without restriction, including without limitation the rights
+    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+    copies of the Software, and to permit persons to whom the Software is
+    furnished to do so, subject to the following conditions:
+    
+    The above copyright notice and this permission notice shall be included in all
+    copies or substantial portions of the Software.
+    
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+    SOFTWARE.
+ */
+package com.samsung.srpol.parallax;
+
+import com.samsung.srpol.R;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.animation.TranslateAnimation;
+import android.widget.AbsListView;
+import android.widget.AbsListView.OnScrollListener;
+import android.widget.ListView;
+
+public class ParallaxListViewHelper implements OnScrollListener {
+
+    private static final float DEFAULT_ALPHA_FACTOR = -1F;
+    private static final float DEFAULT_PARALLAX_FACTOR = 1.9F;
+    private static final boolean DEFAULT_IS_CIRCULAR = false;
+    private float parallaxFactor = DEFAULT_PARALLAX_FACTOR;
+    private float alphaFactor = DEFAULT_ALPHA_FACTOR;
+    private ParallaxedView parallaxedView;
+    private boolean isCircular;
+    private OnScrollListener listener = null;
+    private ListView listView;
+
+    protected ParallaxListViewHelper(Context context, AttributeSet attrs,
+            ListView listView) {
+        init(context, attrs, listView);
+    }
+
+    protected void init(Context context, AttributeSet attrs, ListView listView) {
+        this.listView = listView;
+        TypedArray typeArray = context.obtainStyledAttributes(attrs,
+                R.styleable.ParallaxScroll);
+        this.parallaxFactor = typeArray.getFloat(
+                R.styleable.ParallaxScroll_parallax_factor,
+                DEFAULT_PARALLAX_FACTOR);
+        this.alphaFactor = typeArray.getFloat(
+                R.styleable.ParallaxScroll_alpha_factor, DEFAULT_ALPHA_FACTOR);
+        this.isCircular = typeArray.getBoolean(
+                R.styleable.ParallaxScroll_circular_parallax,
+                DEFAULT_IS_CIRCULAR);
+        typeArray.recycle();
+    }
+
+    protected void setOnScrollListener(OnScrollListener l) {
+        this.listener = l;
+    }
+
+    protected void addParallaxedHeaderView(View v) {
+        addParallaxedView(v);
+    }
+
+    protected void addParallaxedHeaderView(View v, Object data,
+            boolean isSelectable) {
+        addParallaxedView(v);
+    }
+
+    protected void addParallaxedView(View v) {
+        this.parallaxedView = new ListViewParallaxedItem(v);
+    }
+
+    protected void parallaxScroll() {
+        if (isCircular)
+            circularParallax();
+        else
+            headerParallax();
+    }
+
+    private void circularParallax() {
+        if (listView.getChildCount() > 0) {
+            int top = -listView.getChildAt(0).getTop();
+            if (top >= 0) {
+                fillParallaxedViews();
+                setFilters(top);
+            }
+        }
+    }
+
+    private void headerParallax() {
+        if (parallaxedView != null) {
+            if (listView.getChildCount() > 0) {
+                int top = -listView.getChildAt(0).getTop();
+                if (top >= 0) {
+                    setFilters(top);
+                }
+            }
+        }
+    }
+
+    private void setFilters(int top) {
+        parallaxedView.setOffset((float) top / parallaxFactor);
+        if (alphaFactor != DEFAULT_ALPHA_FACTOR) {
+            float alpha = (top <= 0) ? 1 : (100 / ((float) top * alphaFactor));
+            parallaxedView.setAlpha(alpha);
+        }
+        parallaxedView.animateNow();
+    }
+
+    private void fillParallaxedViews() {
+        if (parallaxedView == null
+                || parallaxedView.is(listView.getChildAt(0)) == false) {
+            if (parallaxedView != null) {
+                resetFilters();
+                parallaxedView.setView(listView.getChildAt(0));
+            } else {
+                parallaxedView = new ListViewParallaxedItem(
+                        listView.getChildAt(0));
+            }
+        }
+    }
+
+    private void resetFilters() {
+        parallaxedView.setOffset(0);
+        if (alphaFactor != DEFAULT_ALPHA_FACTOR)
+            parallaxedView.setAlpha(1F);
+        parallaxedView.animateNow();
+    }
+
+    @Override
+    public void onScroll(AbsListView view, int firstVisibleItem,
+            int visibleItemCount, int totalItemCount) {
+        parallaxScroll();
+        if (this.listener != null)
+            this.listener.onScroll(view, firstVisibleItem, visibleItemCount,
+                    totalItemCount);
+    }
+
+    @Override
+    public void onScrollStateChanged(AbsListView view, int scrollState) {
+        if (this.listener != null)
+            this.listener.onScrollStateChanged(view, scrollState);
+    }
+
+    protected class ListViewParallaxedItem extends ParallaxedView {
+
+        public ListViewParallaxedItem(View view) {
+            super(view);
+        }
+
+        @Override
+        protected void translatePreICS(View view, float offset) {
+            addAnimation(new TranslateAnimation(0, 0, offset, offset));
+        }
+    }
+}
diff --git a/app/src/main/java/com/samsung/srpol/parallax/ParallaxedView.java b/app/src/main/java/com/samsung/srpol/parallax/ParallaxedView.java
new file mode 100644 (file)
index 0000000..e41e3a1
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+    The MIT License (MIT)
+    
+    Copyright (c) 2014 Nir Hartmann
+    
+    Permission is hereby granted, free of charge, to any person obtaining a copy
+    of this software and associated documentation files (the "Software"), to deal
+    in the Software without restriction, including without limitation the rights
+    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+    copies of the Software, and to permit persons to whom the Software is
+    furnished to do so, subject to the following conditions:
+    
+    The above copyright notice and this permission notice shall be included in all
+    copies or substantial portions of the Software.
+    
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+    SOFTWARE.
+ */
+package com.samsung.srpol.parallax;
+
+import java.lang.ref.WeakReference;
+import java.util.ArrayList;
+import java.util.List;
+
+import android.annotation.SuppressLint;
+import android.os.Build;
+import android.view.View;
+import android.view.animation.AlphaAnimation;
+import android.view.animation.Animation;
+import android.view.animation.AnimationSet;
+
+public abstract class ParallaxedView {
+    static public boolean isAPI11 = Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB;
+    protected WeakReference<View> view;
+    protected int lastOffset;
+    protected List<Animation> animations;
+
+    abstract protected void translatePreICS(View view, float offset);
+
+    public ParallaxedView(View view) {
+        this.lastOffset = 0;
+        this.animations = new ArrayList<Animation>();
+        this.view = new WeakReference<View>(view);
+    }
+
+    public boolean is(View v) {
+        return (v != null && view != null && view.get() != null && view.get()
+                .equals(v));
+    }
+
+    @SuppressLint("NewApi")
+    public void setOffset(float offset) {
+        View view = this.view.get();
+        if (view != null)
+            if (isAPI11) {
+                view.setTranslationY(offset);
+            } else {
+                translatePreICS(view, offset);
+            }
+    }
+
+    public void setAlpha(float alpha) {
+        View view = this.view.get();
+        if (view != null)
+            if (isAPI11) {
+                view.setAlpha(alpha);
+            } else {
+                alphaPreICS(view, alpha);
+            }
+    }
+
+    protected synchronized void addAnimation(Animation animation) {
+        animations.add(animation);
+    }
+
+    protected void alphaPreICS(View view, float alpha) {
+        addAnimation(new AlphaAnimation(alpha, alpha));
+    }
+
+    protected synchronized void animateNow() {
+        View view = this.view.get();
+        if (view != null) {
+            AnimationSet set = new AnimationSet(true);
+            for (Animation animation : animations)
+                if (animation != null)
+                    set.addAnimation(animation);
+            set.setDuration(0);
+            set.setFillAfter(true);
+            view.setAnimation(set);
+            set.start();
+            animations.clear();
+        }
+    }
+
+    public void setView(View view) {
+        this.view = new WeakReference<View>(view);
+    }
+
+    public View getView() {
+        return this.view.get();
+    }
+}
diff --git a/app/src/main/java/com/samsung/srpol/ui/AppInfoActivity.java b/app/src/main/java/com/samsung/srpol/ui/AppInfoActivity.java
new file mode 100644 (file)
index 0000000..c29ed30
--- /dev/null
@@ -0,0 +1,210 @@
+/*
+   Copyright (C) 2014  Samsung Electronics Polska Sp. z o.o.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU AFFERO General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+    You may obtain a copy of the License at
+
+                http://www.gnu.org/licenses/agpl-3.0.txt
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+package com.samsung.srpol.ui;
+
+import java.util.List;
+
+import com.nhaarman.listviewanimations.appearance.AnimationAdapter;
+import com.nhaarman.listviewanimations.appearance.simple.AlphaInAnimationAdapter;
+import com.samsung.srpol.R;
+import com.samsung.srpol.data.Subcategory;
+import com.samsung.srpol.loader.AppDetails;
+import com.samsung.srpol.loader.AppListLoader;
+import com.samsung.srpol.loader.AppListLoader.OnAppRemoveListener;
+import com.samsung.srpol.utils.Utils;
+
+import android.support.v7.app.ActionBarActivity;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Build;
+import android.os.Bundle;
+import android.view.Menu;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.ImageButton;
+import android.widget.ImageView;
+import android.widget.ListView;
+import android.widget.TextView;
+
+public class AppInfoActivity extends ActionBarActivity implements OnAppRemoveListener {
+    public static final String APP_PACKAGE_NAME = "APP_PACKAGE_NAME";
+    
+    private AppDetails mAppDetails;
+    private String mPackageName = null;
+    private ThreatsArrayAdapter mAdapter;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_app_info);
+        Intent intent = getIntent();
+        if (intent != null) {
+            mPackageName = intent
+                    .getStringExtra(AppInfoActivity.APP_PACKAGE_NAME);
+        }
+        mAppDetails = AppListLoader.getAppDetails(mPackageName);
+        if(mAppDetails == null){
+            return;
+        }
+        ImageView imageView = (ImageView) findViewById(R.id.app_icon);
+        imageView.setImageDrawable(mAppDetails.getAppIcon());
+        TextView textView = (TextView) findViewById(R.id.app_name);
+        textView.setText(mAppDetails.getAppName());
+
+        grayoutText(textView);
+
+        ListView listView = (ListView) findViewById(R.id.threats_list);
+        mAdapter = new ThreatsArrayAdapter(getApplicationContext(),
+                AppListLoader.getSubcategoriesOfMask(mAppDetails
+                        .getSubcategoriesMask()));
+        AnimationAdapter adapter = new AlphaInAnimationAdapter(mAdapter);
+        adapter.setAbsListView(listView);
+        listView.setAdapter(adapter);
+
+        ImageButton uninstallButton = (ImageButton) findViewById(R.id.uninstall_button);
+        ImageButton moreInfoButton = (ImageButton) findViewById(R.id.more_info_button);
+        TextView systemAppTextView = (TextView) findViewById(R.id.system_app_text);
+        View activityLayout = findViewById(R.id.container);
+        if (mAppDetails.isSystemApp()) {
+            moreInfoButton.setVisibility(View.VISIBLE);
+            systemAppTextView.setVisibility(View.VISIBLE);
+            uninstallButton
+                    .setImageResource(R.drawable.app_info_settings_button);
+            uninstallButton.setContentDescription(getResources().getText(R.string.app_detail_settings_button));
+            activityLayout.setBackgroundResource(R.color.grayout_list_item_bg);
+        } else {
+            moreInfoButton.setVisibility(View.GONE);
+            systemAppTextView.setVisibility(View.GONE);
+            uninstallButton
+                    .setImageResource(R.drawable.app_info_uninstall_button);
+            uninstallButton.setContentDescription(getResources().getText(R.string.app_detail_uninstall_button));
+            activityLayout.setBackgroundResource(R.color.app_detail_bg);
+        }
+
+        uninstallButton.setOnClickListener(new OnClickListener() {
+
+            @Override
+            public void onClick(View v) {
+                Utils.showInstalledAppDetails(getApplicationContext(), mPackageName);
+            }
+        });
+        moreInfoButton.setOnClickListener(new OnClickListener() {
+
+            @Override
+            public void onClick(View v) {
+                Utils.startBrowser(getApplicationContext(), getResources().getString(R.string.app_info_more_info));
+            }
+        });
+        AppListLoader.setOnChangeListener(this);
+    }
+
+    @Override
+    protected void onResume() {
+        ImageView systemAppIcon = (ImageView) findViewById(R.id.list_system_app_icon);
+        if (mAppDetails.isSystemApp()) {
+            systemAppIcon.setVisibility(View.VISIBLE);
+            if (mAppDetails.isEnabled()) {
+                systemAppIcon.setImageDrawable(Utils.getmSystemIcon(this));
+            } else {
+                systemAppIcon.setImageDrawable(Utils
+                        .getmSystemIconDisable(this));
+            }
+        } else {
+            systemAppIcon.setVisibility(View.INVISIBLE);
+        }
+        super.onResume();
+    }
+
+    @Override
+    protected void onDestroy() {
+        AppListLoader.setOnChangeListener(null);
+        super.onDestroy();
+    }
+
+    class ThreatsArrayAdapter extends ArrayAdapter<Subcategory> {
+
+        public ThreatsArrayAdapter(Context context, List<Subcategory> resources) {
+            super(context, R.layout.threats_list_item, resources);
+        }
+
+        class ViewHolder {
+            public TextView textView;
+            public ImageView imageView;
+        }
+
+        @Override
+        public boolean isEnabled(int position) {
+            return false;
+        }
+        
+        @Override
+        public View getView(int position, View convertView, ViewGroup parent) {
+            ViewHolder holder;
+            if (convertView == null) {
+                convertView = getLayoutInflater().inflate(R.layout.threats_list_item,
+                        parent, false);
+                holder = new ViewHolder();
+                holder.imageView = (ImageView) convertView
+                        .findViewById(R.id.threat_icon);
+                holder.textView = (TextView) convertView
+                        .findViewById(R.id.threat_text);
+                convertView.setTag(holder);
+            } else {
+                holder = (ViewHolder) convertView.getTag();
+            }
+            Subcategory subgroupContainer = getItem(position);
+            if (subgroupContainer != null) {
+                holder.imageView
+                        .setImageDrawable(subgroupContainer.getDarkIcon());
+                holder.textView.setText(subgroupContainer.getDescription());
+            }
+            return convertView;
+        }
+    }
+
+    private void grayoutText(TextView textView){
+     // disabling and enabling apps in system application manager is
+        // available since API 4.0
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
+            if (mAppDetails.isEnabled()) {
+                textView.setTextColor(getResources().getColor(
+                        android.R.color.black));
+            } else {
+                textView.setTextColor(getResources().getColor(
+                        R.color.disabled_app_name));
+            }
+        }
+    }
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        return true;
+    }
+
+    @Override
+    public void onPackageRemoved(String packageName) {
+        if (mPackageName.equals(packageName)) {
+            finish();
+        }
+    }
+
+}
diff --git a/app/src/main/java/com/samsung/srpol/ui/LicenseActivity.java b/app/src/main/java/com/samsung/srpol/ui/LicenseActivity.java
new file mode 100644 (file)
index 0000000..a69f7b2
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+   Copyright (C) 2014  Samsung Electronics Polska Sp. z o.o.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU AFFERO General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+    You may obtain a copy of the License at
+
+                http://www.gnu.org/licenses/agpl-3.0.txt
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+package com.samsung.srpol.ui;
+
+import com.samsung.srpol.R;
+import com.samsung.srpol.utils.Utils;
+
+import android.graphics.Paint;
+import android.os.Bundle;
+import android.support.v7.app.ActionBarActivity;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.ImageButton;
+import android.widget.TextView;
+
+public class LicenseActivity extends ActionBarActivity {
+
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_license);
+
+        TextView descriptionTextLink = (TextView) findViewById(R.id.license_link);
+        descriptionTextLink.setPaintFlags(Paint.UNDERLINE_TEXT_FLAG);
+        descriptionTextLink.setOnClickListener(new OnClickListener() {
+            
+            @Override
+            public void onClick(View v) {
+                Utils.startBrowser(LicenseActivity.this, getString(R.string.license_link));
+            }
+        });
+        
+        ImageButton backBtn = (ImageButton) findViewById(R.id.back_button);
+        backBtn.setOnClickListener(new OnClickListener() {
+
+            @Override
+            public void onClick(View arg0) {
+                finish();
+            }
+        });
+    }
+    
+}
diff --git a/app/src/main/java/com/samsung/srpol/ui/MainActivity.java b/app/src/main/java/com/samsung/srpol/ui/MainActivity.java
new file mode 100644 (file)
index 0000000..1d311c9
--- /dev/null
@@ -0,0 +1,352 @@
+/*
+   Copyright (C) 2014  Samsung Electronics Polska Sp. z o.o.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU AFFERO General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+    You may obtain a copy of the License at
+
+                http://www.gnu.org/licenses/agpl-3.0.txt
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+package com.samsung.srpol.ui;
+
+import java.util.List;
+
+import com.samsung.srpol.R;
+import com.samsung.srpol.loader.AppDetails;
+import com.samsung.srpol.loader.AppListLoader;
+import com.samsung.srpol.ui.drawer.MenuFragment;
+import com.samsung.srpol.ui.drawer.NavigationDrawerItemListener;
+import com.samsung.srpol.ui.tabpager.PageAdapter;
+
+import android.support.v7.app.ActionBarActivity;
+import android.support.v7.app.ActionBar;
+import android.support.v4.app.ActionBarDrawerToggle;
+import android.support.v4.app.LoaderManager;
+import android.support.v4.content.Loader;
+import android.content.DialogInterface;
+import android.content.DialogInterface.OnDismissListener;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.os.Handler;
+import android.preference.PreferenceManager;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.support.v4.view.GravityCompat;
+import android.support.v4.view.PagerTabStrip;
+import android.support.v4.view.ViewPager;
+import android.support.v4.widget.DrawerLayout;
+
+public class MainActivity extends ActionBarActivity implements
+        LoaderManager.LoaderCallbacks<List<AppDetails>> {
+    public static final String TAG = "MainActivity";
+
+    private static final String STATE_WELCOME_DIALOG_IS_OPEN = "welcome_dialog_is_open";
+    private static final String STATE_WELCOME_DIALOG_OPENED_FROM_MENU = "welcome_dialog_opened_from_menu";
+    private static final String STATE_DRAWER_MENU_IS_OPEN = "state_drawer_menu_is_open";
+
+    private MenuFragment mMenuFragment;
+
+    private WelcomeDialog mWelcomeDialog;
+    private ViewPager mViewPager;
+    private PageAdapter mFramePagerAdapter;
+    private boolean mDrawerOpenState = false;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+
+        if (savedInstanceState != null) {
+            boolean isWelcomeDialogOpen = savedInstanceState.getBoolean(
+                    STATE_WELCOME_DIALOG_IS_OPEN, false);
+            if (isWelcomeDialogOpen) {
+                boolean isOpenedFromMenu = savedInstanceState.getBoolean(
+                        STATE_WELCOME_DIALOG_OPENED_FROM_MENU, false);
+                showWelcomeDialog(isOpenedFromMenu);
+            }
+            mDrawerOpenState = savedInstanceState.getBoolean(STATE_DRAWER_MENU_IS_OPEN, false);
+        } else {
+            showWelcomeDialog(false);
+        }
+
+        getSupportLoaderManager().initLoader(0, null, this);
+
+        // if Loader was created then we have all data to create
+        // NavigationDrawer otherwise wait for loader to be created and then
+        // create NavigationDrawer
+        if (getSupportLoaderManager().getLoader(0) != null) {
+            initNavigationDrawer();
+        }
+
+        mFramePagerAdapter = new PageAdapter(getSupportFragmentManager(), getApplicationContext());
+        mViewPager = (ViewPager) findViewById(R.id.myviewpager);
+        mViewPager.setAdapter(mFramePagerAdapter);
+
+        PagerTabStrip pagerTabStrip = (PagerTabStrip) findViewById(R.id.titlestrip);
+        pagerTabStrip.setDrawFullUnderline(true);
+        pagerTabStrip.setTabIndicatorColor(getResources().getColor(R.color.tab_underline_color));
+    }
+
+    @Override
+    public void onSaveInstanceState(Bundle outState) {
+        super.onSaveInstanceState(outState);
+        if (mWelcomeDialog != null) {
+            outState.putBoolean(STATE_WELCOME_DIALOG_IS_OPEN,
+                    mWelcomeDialog.isShowing());
+            outState.putBoolean(STATE_WELCOME_DIALOG_OPENED_FROM_MENU,
+                    mWelcomeDialog.ismOpenedFromMenu());
+        }
+        if (isDrawerOpen() || (mDrawerOpenState && mDrawerLayout == null)) {
+            outState.putBoolean(STATE_DRAWER_MENU_IS_OPEN, true);
+        }
+    }
+
+    protected void onDestroy() {
+        if (mWelcomeDialog != null) {
+            if (mWelcomeDialog.isShowing()) {
+                mWelcomeDialog.dismiss();
+            }
+        }
+        super.onDestroy();
+    }
+
+    public void restoreActionBar() {
+        ActionBar actionBar = getSupportActionBar();
+        actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
+        actionBar.setDisplayShowTitleEnabled(true);
+    }
+
+    @Override
+    protected boolean onPrepareOptionsPanel(View view, Menu menu) {
+        SharedPreferences sp = PreferenceManager
+                .getDefaultSharedPreferences(this);
+        boolean showSystemApp = sp.getBoolean(
+                AppListLoader.PREF_INCLUDE_SYSTEM_APPS,
+                true);
+        MenuItem menuItemSystem = menu.findItem(R.id.action_toggle_system_visibility);
+        if (menuItemSystem != null) {
+            if (showSystemApp) {
+                menuItemSystem.setTitle(R.string.hide_system_visibility);
+            } else {
+                menuItemSystem.setTitle(R.string.show_system_visibility);
+            }
+        }
+        return super.onPrepareOptionsPanel(view, menu);
+    }
+    
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        getMenuInflater().inflate(R.menu.main, menu);
+        restoreActionBar();
+        return true;
+    }
+
+    @Override
+    public void onBackPressed() {
+        if (isDrawerOpen()) {
+            closeDrawer();
+        } else {
+            super.onBackPressed();
+        }
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        if (mActionBarDrawerToggle != null
+                && mActionBarDrawerToggle.onOptionsItemSelected(item))
+            return true;
+        int id = item.getItemId();
+        switch (id) {
+            case R.id.action_about:
+                showWelcomeDialog(true);
+                return true;
+            case R.id.action_licence:
+                showLicense();
+                return true;
+            case R.id.action_toggle_system_visibility:
+                toggleSharedPrefences(AppListLoader.PREF_INCLUDE_SYSTEM_APPS);
+                refreshAfterChanges();
+                return true;
+        }
+        return super.onOptionsItemSelected(item);
+    }
+
+    public void toggleSharedPrefences(String preferenceName) {
+        SharedPreferences sp = PreferenceManager
+                .getDefaultSharedPreferences(this);
+        boolean actualValue = sp.getBoolean(preferenceName, true);
+        sp.edit().putBoolean(preferenceName, !actualValue).commit();
+    }
+
+    public void refreshAfterChanges() {
+        supportInvalidateOptionsMenu();
+        if (mFramePagerAdapter != null) {
+            mFramePagerAdapter.refreshAdapterNotify();
+            mFramePagerAdapter.notifyDataSetChanged();
+        }
+        if (mMenuFragment != null) {
+            mMenuFragment.notifyDataSetChanged();
+        }
+    }
+
+    @Override
+    public Loader<List<AppDetails>> onCreateLoader(int id, Bundle args) {
+        AppListLoader loader = new AppListLoader(this.getApplicationContext());
+        initNavigationDrawer();
+
+        return loader;
+    }
+
+    @Override
+    public void onLoadFinished(Loader<List<AppDetails>> loader,
+            List<AppDetails> data) {
+        Log.d(TAG, "onLoadFinished");
+
+        AppListLoader appLoader = (AppListLoader) loader;
+        if (appLoader.wasDataReloaded()) {
+            appLoader.resetWasDataReloaded();
+            mViewPager.setOffscreenPageLimit(AppListLoader.getCategories().size());
+            mFramePagerAdapter.refreshPages();
+        } else {
+            mFramePagerAdapter.refreshAdapterNotify();
+        }
+        if (mWelcomeDialog != null && mWelcomeDialog.isShowing()) {
+            mWelcomeDialog.loadingDone();
+        }
+        if (mMenuFragment != null) {
+            mMenuFragment.notifyDataSetChanged();
+        }
+    }
+
+    public void onLoaderReset(Loader<List<AppDetails>> arg0) {
+        mFramePagerAdapter.refreshAdapterNotify();
+    }
+
+    private void showWelcomeDialog(boolean fromMenu) {
+        Log.d(TAG, "showWelcomeActivity flag: " + fromMenu);
+        if (mWelcomeDialog == null) {
+            mWelcomeDialog = new WelcomeDialog(this, fromMenu);
+        }
+        if (!mWelcomeDialog.isShowing()) {
+            mWelcomeDialog.show(fromMenu);
+        }
+        if (!fromMenu) {
+            mWelcomeDialog.setOnDismissListener(new OnDismissListener() {
+
+                @Override
+                public void onDismiss(DialogInterface dialog) {
+                    openDrawerAnimate();
+                }
+            });
+        }
+    }
+
+    private void showLicense() {
+        Intent intent = new Intent(this, LicenseActivity.class);
+        startActivity(intent);
+    }
+
+    private DrawerLayout mDrawerLayout;
+    private View mFragmentContainerView;
+    private ActionBarDrawerToggle mActionBarDrawerToggle;
+
+    private void initNavigationDrawer() {
+        mMenuFragment = (MenuFragment) getSupportFragmentManager()
+                .findFragmentById(R.id.menu_container);
+        mMenuFragment.setDrawerItemListener(mDrawerItemListener);
+        mFragmentContainerView = findViewById(R.id.menu_container);
+        mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
+        setUp();
+        mMenuFragment.refresh();
+    }
+    
+    private NavigationDrawerItemListener mDrawerItemListener = new NavigationDrawerItemListener() {
+
+        public void onNavigationDrawerItemSelected(int position) {
+            if (mViewPager != null) {
+                mViewPager.setCurrentItem(position, true);
+                closeDrawer();
+            }
+        }
+    };
+
+    public void closeDrawer() {
+        if(mDrawerLayout != null){
+            mDrawerLayout.closeDrawer(Gravity.LEFT);
+            mDrawerOpenState=false;
+        }
+    }
+    
+    public boolean isDrawerOpen() {
+        return mDrawerLayout != null
+                && mDrawerLayout.isDrawerOpen(mFragmentContainerView);
+    }
+    
+    public void setUp() {
+        if (mDrawerLayout == null)
+            return;
+        mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow,
+                GravityCompat.START);
+        ActionBar actionBar = getSupportActionBar();
+        actionBar.setDisplayHomeAsUpEnabled(true);
+        actionBar.setHomeButtonEnabled(true);
+
+        mActionBarDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout,
+                R.drawable.ic_drawer, R.string.navigation_drawer_open,
+                R.string.navigation_drawer_close) {
+            @Override
+            public void onDrawerClosed(View drawerView) {
+                super.onDrawerClosed(drawerView);
+                supportInvalidateOptionsMenu();
+            }
+
+            @Override
+            public void onDrawerOpened(View drawerView) {
+                super.onDrawerOpened(drawerView);
+                supportInvalidateOptionsMenu(); 
+            }
+        };
+        mDrawerLayout.post(new Runnable() {
+            @Override
+            public void run() {
+                mActionBarDrawerToggle.syncState();
+            }
+        });
+        if (mDrawerOpenState && !isDrawerOpen()) {
+            mDrawerLayout.openDrawer(Gravity.LEFT);
+        }
+        mDrawerLayout.setDrawerListener(mActionBarDrawerToggle);
+    }
+
+    public void openDrawerAnimate() {
+        new Handler().post(new Runnable() {
+
+            @Override
+            public void run() {
+                if (mDrawerLayout != null) {
+                    mDrawerLayout.openDrawer(Gravity.LEFT);
+                    mDrawerOpenState = true;
+                }
+            }
+        });
+
+        if (mWelcomeDialog != null) {
+            mWelcomeDialog.setOnDismissListener(null);
+        }
+    }
+}
diff --git a/app/src/main/java/com/samsung/srpol/ui/PopupActivity.java b/app/src/main/java/com/samsung/srpol/ui/PopupActivity.java
new file mode 100644 (file)
index 0000000..c7e9849
--- /dev/null
@@ -0,0 +1,145 @@
+/*
+   Copyright (C) 2014  Samsung Electronics Polska Sp. z o.o.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU AFFERO General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+    You may obtain a copy of the License at
+
+                http://www.gnu.org/licenses/agpl-3.0.txt
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+package com.samsung.srpol.ui;
+
+import java.util.List;
+
+import com.nhaarman.listviewanimations.appearance.AnimationAdapter;
+import com.nhaarman.listviewanimations.appearance.simple.AlphaInAnimationAdapter;
+import com.samsung.srpol.R;
+import com.samsung.srpol.data.Category;
+import com.samsung.srpol.data.Subcategory;
+import com.samsung.srpol.loader.AppListLoader;
+
+import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.support.v7.app.ActionBarActivity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.View.OnClickListener;
+import android.widget.ArrayAdapter;
+import android.widget.ImageButton;
+import android.widget.ImageView;
+import android.widget.ListView;
+import android.widget.TextView;
+
+public class PopupActivity extends ActionBarActivity {
+
+    public static final String POPUP_CATEGORY = "POPUP_CATEGORY";
+
+    private Category mCategory;
+    private ThreatsAdapter mAdapter;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_popup);
+        int categotyId = 0;
+        Intent intent = getIntent();
+        if (intent != null) {
+            categotyId = intent.getIntExtra(POPUP_CATEGORY, -1);
+        }
+
+        TextView header = (TextView) findViewById(R.id.header_text);
+        List<Category> containerList = AppListLoader.getCategories();
+        if (containerList != null && categotyId >= 0) {
+            mCategory = containerList.get(categotyId);
+            header.setText(getString(R.string.apps_that)
+                    + mCategory.getHeader());
+        }
+
+        ListView listview = (ListView) findViewById(R.id.threats_list);
+        mAdapter = new ThreatsAdapter(this);
+        for (Subcategory subCat : mCategory.getSubCategories())
+            mAdapter.add(subCat);
+        AnimationAdapter adapter = new AlphaInAnimationAdapter(mAdapter);
+        adapter.setAbsListView(listview);
+        listview.setAdapter(adapter);
+
+        ImageButton back = (ImageButton) findViewById(R.id.back_button);
+        back.setOnClickListener(new OnClickListener() {
+
+            @Override
+            public void onClick(View arg0) {
+                finish();
+            }
+        });
+
+        ImageButton more = (ImageButton) findViewById(R.id.moreinfo_button);
+        more.setOnClickListener(new OnClickListener() {
+
+            @Override
+            public void onClick(View v) {
+                Intent intent = new Intent(Intent.ACTION_VIEW, Uri
+                        .parse(mCategory.getLink()));
+                startActivity(intent);
+            }
+        });
+    }
+
+    private class ThreatsAdapter extends ArrayAdapter<Subcategory> {
+
+        private class ViewHolder {
+            ImageView icon;
+            TextView description;
+        }
+
+        public ThreatsAdapter(Context context) {
+            super(context, R.layout.threats_list_item);
+        }
+
+        @Override
+        public boolean isEnabled(int position) {
+            return false;
+        }
+
+        @Override
+        public View getView(int position, View convertView, ViewGroup parent) {
+            ViewHolder holder;
+            if (convertView == null) {
+                LayoutInflater inflater = getLayoutInflater();
+                convertView = inflater.inflate(R.layout.threats_list_item,
+                        parent, false);
+                holder = new ViewHolder();
+                holder.icon = (ImageView) convertView
+                        .findViewById(R.id.threat_icon);
+                holder.description = (TextView) convertView
+                        .findViewById(R.id.threat_text);
+                convertView.setTag(holder);
+            } else {
+                holder = (ViewHolder) convertView.getTag();
+            }
+
+            Subcategory item = getItem(position);
+
+            holder.icon.setImageDrawable(item.getIconDrawable());
+            holder.description.setText(item.getDescription());
+            holder.description.setTextColor(getResources().getColor(
+                    android.R.color.white));
+
+            return convertView;
+        }
+    }
+
+}
diff --git a/app/src/main/java/com/samsung/srpol/ui/WelcomeDialog.java b/app/src/main/java/com/samsung/srpol/ui/WelcomeDialog.java
new file mode 100644 (file)
index 0000000..2cd1659
--- /dev/null
@@ -0,0 +1,174 @@
+/*
+   Copyright (C) 2014  Samsung Electronics Polska Sp. z o.o.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU AFFERO General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+    You may obtain a copy of the License at
+
+                http://www.gnu.org/licenses/agpl-3.0.txt
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+package com.samsung.srpol.ui;
+
+import java.util.Timer;
+import java.util.TimerTask;
+import com.samsung.srpol.R;
+import com.samsung.srpol.utils.Utils;
+
+import android.app.Dialog;
+import android.content.Context;
+import android.graphics.Paint;
+import android.view.View;
+import android.widget.ImageButton;
+import android.widget.ImageView;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+
+public class WelcomeDialog extends Dialog implements android.view.View.OnClickListener{
+    private boolean isFirstTime;
+    private ImageButton mOkButton;
+    private TextView mDescriptionTextLink;
+    private ImageView mNpLogo, mSamsungLogo, mGovLogo;
+    private ProgressBar mProgressBar;
+    private Context mContext;
+    private boolean attachedToWindow = false;
+    private boolean mCanBeClosed;
+    private boolean mOpenedFromMenu = false;
+
+    public WelcomeDialog(Context context, boolean openedFromMenu) {
+        super(context, R.style.WelcomeDialog);
+        mContext = context;
+        mOpenedFromMenu = openedFromMenu;
+        setContentView(R.layout.welcome_dialog);
+
+        mOkButton = (ImageButton) this.findViewById(R.id.button);
+        mDescriptionTextLink = (TextView) this.findViewById(R.id.welcome_description_link);
+        mDescriptionTextLink.setPaintFlags(Paint.UNDERLINE_TEXT_FLAG);
+        mProgressBar = (ProgressBar) this.findViewById(R.id.progressBar);
+        mNpLogo = (ImageView) findViewById(R.id.fondation_logo);
+        mSamsungLogo = (ImageView) findViewById(R.id.samsung_logo);
+        mGovLogo = (ImageView) findViewById(R.id.gov_logo);
+        TextView versionName = (TextView) findViewById(R.id.app_version);
+        versionName.setText(Utils.getAppVersionCode(context));
+        mOkButton.setOnClickListener(this);
+        mDescriptionTextLink.setOnClickListener(this);
+        mNpLogo.setOnClickListener(this);
+        mSamsungLogo.setOnClickListener(this);
+        mGovLogo.setOnClickListener(this);
+
+        isFirstTime = Utils.isFirstRun(this.getContext());
+
+        mCanBeClosed = false;
+        
+        if (!isFirstTime && !mOpenedFromMenu) {
+            new Timer().schedule(new TimerTask() {
+                
+                @Override
+                public void run() {
+                    synchronized (WelcomeDialog.this) {
+                        if (mCanBeClosed)
+                            WelcomeDialog.this.dismissDialog();
+                        else
+                            mCanBeClosed = true;
+                    }
+                }
+            }, 2000);
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see android.app.Dialog#onBackPressed()
+     */
+    @Override
+    public void onBackPressed() {
+        if(mOkButton.getVisibility() == View.VISIBLE){
+            super.onBackPressed();
+        }
+    }
+
+
+    @Override
+    public void onClick(View v) {
+        if(v == mOkButton){
+            this.dismissDialog();
+        } else if(v == mDescriptionTextLink){
+            Utils.startBrowser(mContext, mContext.getString(R.string.app_info_more_info));
+        } else if(v == mNpLogo){
+            Utils.startBrowser(mContext, mContext.getString(R.string.fond_site));
+        } else if(v == mSamsungLogo){
+            Utils.startBrowser(mContext, mContext.getString(R.string.samsung_site));
+        } else if(v == mGovLogo){
+            Utils.startBrowser(mContext, mContext.getString(R.string.gov_site));
+        }
+    }
+    /* (non-Javadoc)
+     * @see android.app.Dialog#onAttachedToWindow()
+     */
+    @Override
+    public void onAttachedToWindow() {
+        super.onAttachedToWindow();
+        attachedToWindow = true;
+    }
+
+
+    /* (non-Javadoc)
+     * @see android.app.Dialog#onDetachedFromWindow()
+     */
+    @Override
+    public void onDetachedFromWindow() {
+        attachedToWindow = false;
+        super.onDetachedFromWindow();
+    }
+
+    public void loadingDone() {
+        if (mOpenedFromMenu) {
+            return;
+        }
+        if (isFirstTime) {
+            mProgressBar.setVisibility(View.GONE);
+            mOkButton.setVisibility(View.VISIBLE);
+        } else {
+            synchronized (this) {
+                if (mCanBeClosed) {
+                    dismissDialog();
+                }
+                mCanBeClosed = true;
+            }
+        }
+    }
+
+    private void dismissDialog(){
+        if(attachedToWindow){
+            this.dismiss();
+        }
+    }
+
+    /**
+     * @return the mOpenedFromMenu
+     */
+    public boolean ismOpenedFromMenu() {
+        return mOpenedFromMenu;
+    }
+
+    public void show(boolean openedFromMenu) {
+        mOpenedFromMenu = openedFromMenu;
+        if (openedFromMenu) {
+            mOkButton.setVisibility(View.VISIBLE);
+            mProgressBar.setVisibility(View.GONE);
+        } else {
+            mProgressBar.setVisibility(View.VISIBLE);
+            mOkButton.setVisibility(View.GONE);
+        }
+        this.show();
+    }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/samsung/srpol/ui/drawer/CategoryArrayAdapter.java b/app/src/main/java/com/samsung/srpol/ui/drawer/CategoryArrayAdapter.java
new file mode 100644 (file)
index 0000000..b95febf
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+   Copyright (C) 2014  Samsung Electronics Polska Sp. z o.o.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU AFFERO General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+    You may obtain a copy of the License at
+
+                http://www.gnu.org/licenses/agpl-3.0.txt
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+package com.samsung.srpol.ui.drawer;
+
+import java.util.Collection;
+
+import com.samsung.srpol.R;
+import com.samsung.srpol.data.Category;
+
+import android.content.Context;
+import android.text.Spannable;
+import android.text.SpannableString;
+import android.text.style.ForegroundColorSpan;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+public class CategoryArrayAdapter extends ArrayAdapter<Category> {
+    private final Context mContext;
+    private String mTextPrefix ;
+    private String mCountTextPrefix;
+    private int mSpanTextColor;
+
+    private static class ViewHolder {
+        TextView textView1;
+        TextView textView2;
+        TextView textView3;
+        ImageView imageView;
+    }
+    
+    public CategoryArrayAdapter(Context context) {
+        super(context, R.layout.drawer_list_item);
+        mTextPrefix = context.getResources().getString(R.string.drawer_header_text_prefix);
+        mCountTextPrefix = context.getResources().getString(R.string.items_string_quantity);
+        mSpanTextColor = context.getResources().getColor(R.color.text_menu);
+        mContext = context;
+    }
+
+    @Override
+    public void addAll(Collection<? extends Category> collection) {
+        for (Category category : collection) {
+            super.add(category);
+        }
+    }
+    
+    @Override
+    public View getView(int position, View convertView, ViewGroup parent) {
+        ViewHolder holder = null;
+        if (convertView == null) {
+            LayoutInflater inflater = (LayoutInflater) mContext
+                    .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+            convertView = inflater.inflate(R.layout.drawer_list_item, parent,
+                    false);
+            holder = new ViewHolder();
+            holder.textView1 = (TextView) convertView.findViewById(R.id.text1);
+            holder.textView2 = (TextView) convertView.findViewById(R.id.text2);
+            holder.textView3 = (TextView) convertView.findViewById(R.id.text3);
+            holder.imageView = (ImageView) convertView.findViewById(R.id.icon);
+
+            convertView.setTag(holder);
+        } else {
+            holder = (ViewHolder) convertView.getTag();
+        }
+
+        Category category = getItem(position);
+        if (category.getIconRes() > 0)
+            holder.imageView.setImageResource(category.getIconRes());
+        holder.textView1.setText(mTextPrefix + category.getHeader());
+        holder.textView2.setText(category.getShortDescription());
+        holder.textView3.setText(createSpannableCountText(category.getCurrentlyVisible()));
+        return convertView;
+    }
+
+    private Spannable createSpannableCountText(int count){
+        
+        Spannable spannable = new SpannableString(mCountTextPrefix + count);
+        spannable.setSpan(new ForegroundColorSpan(mSpanTextColor),mCountTextPrefix.length(), spannable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+        return spannable;
+    }
+}
diff --git a/app/src/main/java/com/samsung/srpol/ui/drawer/MenuFragment.java b/app/src/main/java/com/samsung/srpol/ui/drawer/MenuFragment.java
new file mode 100644 (file)
index 0000000..42d7c6e
--- /dev/null
@@ -0,0 +1,128 @@
+/*
+   Copyright (C) 2014  Samsung Electronics Polska Sp. z o.o.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU AFFERO General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+    You may obtain a copy of the License at
+
+                http://www.gnu.org/licenses/agpl-3.0.txt
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+package com.samsung.srpol.ui.drawer;
+
+import com.samsung.srpol.R;
+import com.samsung.srpol.loader.AppListLoader;
+
+import android.support.v4.app.Fragment;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.ListView;
+
+
+public class MenuFragment extends Fragment {
+
+    private static final String SAVED_POSITION = "saved_position";
+
+    private NavigationDrawerItemListener mDrawerItemListener;
+    
+    private ListView mMenuListView;
+    private CategoryArrayAdapter mAdapter;
+
+    private int mSelectedPosition = 0;
+
+    public MenuFragment() {
+    }
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        if (savedInstanceState != null) {
+            mSelectedPosition = savedInstanceState
+                    .getInt(SAVED_POSITION);
+            selectItem(mSelectedPosition);
+        }
+    }
+
+    @Override
+    public void onActivityCreated(Bundle savedInstanceState) {
+        super.onActivityCreated(savedInstanceState);
+        setHasOptionsMenu(true);
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+            Bundle savedInstanceState) {
+        View mRootView = (View) inflater.inflate(
+                R.layout.fragment_navigation_drawer, container, false);
+        mMenuListView = (ListView) mRootView
+                .findViewById(R.id.fragment_listView);
+        mMenuListView
+                .setOnItemClickListener(new AdapterView.OnItemClickListener() {
+                    @Override
+                    public void onItemClick(AdapterView<?> parent, View view,
+                            int position, long id) {
+                        selectItem(position);
+                    }
+                });
+        mAdapter = new CategoryArrayAdapter(getActivity().getApplicationContext());
+        mMenuListView.setAdapter(mAdapter);
+
+        mMenuListView.setItemChecked(mSelectedPosition, true);
+        return mRootView;
+    }
+
+    public void refresh() {
+        if (mAdapter != null) {
+            mAdapter.clear();
+            mAdapter.addAll(AppListLoader.getCategories());
+            mAdapter.notifyDataSetChanged();
+        }
+    }
+
+
+    private void selectItem(int position) {
+        mSelectedPosition = position;
+        if (mMenuListView != null) {
+            mMenuListView.setItemChecked(position, true);
+        }
+
+        if (mDrawerItemListener != null) {
+            mDrawerItemListener.onNavigationDrawerItemSelected(position);
+        }
+    }
+
+    @Override
+    public void onDetach() {
+        super.onDetach();
+        mDrawerItemListener = null;
+    }
+
+    public void setDrawerItemListener(NavigationDrawerItemListener drawerItemListener) {
+        mDrawerItemListener = drawerItemListener;
+    }
+
+    @Override
+    public void onSaveInstanceState(Bundle outState) {
+        super.onSaveInstanceState(outState);
+        outState.putInt(SAVED_POSITION, mSelectedPosition);
+    }
+
+    public void notifyDataSetChanged(){
+        if(mAdapter != null){
+            mAdapter.notifyDataSetChanged();
+        }
+    }
+}
diff --git a/app/src/main/java/com/samsung/srpol/ui/drawer/NavigationDrawerItemListener.java b/app/src/main/java/com/samsung/srpol/ui/drawer/NavigationDrawerItemListener.java
new file mode 100644 (file)
index 0000000..495c51b
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+   Copyright (C) 2014  Samsung Electronics Polska Sp. z o.o.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU AFFERO General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+    You may obtain a copy of the License at
+
+                http://www.gnu.org/licenses/agpl-3.0.txt
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+package com.samsung.srpol.ui.drawer;
+
+public interface NavigationDrawerItemListener {
+
+    void onNavigationDrawerItemSelected(int position);
+
+}
diff --git a/app/src/main/java/com/samsung/srpol/ui/tabpager/AppListArrayAdapter.java b/app/src/main/java/com/samsung/srpol/ui/tabpager/AppListArrayAdapter.java
new file mode 100644 (file)
index 0000000..92ca1c1
--- /dev/null
@@ -0,0 +1,195 @@
+/*
+   Copyright (C) 2014  Samsung Electronics Polska Sp. z o.o.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU AFFERO General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+    You may obtain a copy of the License at
+
+                http://www.gnu.org/licenses/agpl-3.0.txt
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+package com.samsung.srpol.ui.tabpager;
+
+import java.util.ArrayList;
+
+import com.samsung.srpol.R;
+import com.samsung.srpol.data.Category;
+import com.samsung.srpol.data.Subcategory;
+import com.samsung.srpol.loader.AppDetails;
+import com.samsung.srpol.loader.AppListLoader;
+import com.samsung.srpol.utils.Utils;
+
+import android.annotation.TargetApi;
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.graphics.drawable.Drawable;
+import android.os.Build;
+import android.preference.PreferenceManager;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+public class AppListArrayAdapter extends ArrayAdapter<AppDetails> {
+
+    private static SharedPreferences mSp;
+    
+    private final Context mContext;
+    private final Category mCategory;
+    private ArrayList<AppDetails> mDisplayedList;
+
+    private static class ViewHolder {
+        public TextView appName;
+        public TextView appPackageName;
+        public ImageView appIcon;
+        public ImageView systemAppIcon;
+        public LinearLayout groupIcons;
+        public ImageView[] groupIconsView;
+    }
+
+    public AppListArrayAdapter(Context context, Category category) {
+        super(context, R.layout.app_list_item_view);
+        mContext = context;
+        mCategory = category;
+        mDisplayedList = new ArrayList<AppDetails>();
+        if (mSp == null)
+            mSp = PreferenceManager.getDefaultSharedPreferences(mContext);
+        refreshVisibleList();
+    }
+
+    private void refreshVisibleList() {
+        boolean includeSystemApps = mSp.getBoolean(
+                AppListLoader.PREF_INCLUDE_SYSTEM_APPS, true);
+        
+        mDisplayedList.clear();
+        for (AppDetails app : mCategory.getRelatedApps()) {
+            if (isVisible(app, includeSystemApps))
+                mDisplayedList.add(app);
+        }
+        mCategory.updateVisibleCount(mDisplayedList.size());
+    }
+
+    @Override
+    public void notifyDataSetChanged() {
+        refreshVisibleList();
+        super.notifyDataSetChanged();
+    }
+    
+    @Override
+    public AppDetails getItem(int position) {
+        return mDisplayedList.get(position);
+    }
+    
+    @Override
+    public int getCount() {
+        return mDisplayedList.size();
+    }
+    
+    private boolean isVisible(AppDetails item, boolean includeSystemApps) {
+
+        return !item.isSystemApp() 
+                || (includeSystemApps && item.isSystemApp());
+    }
+    
+    @SuppressWarnings("deprecation")
+    @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
+    @Override
+    public View getView(int position, View convertView, ViewGroup parent) {
+        ViewHolder holder;
+        if (convertView == null) {
+            LayoutInflater inflater = (LayoutInflater) mContext
+                    .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+            convertView = inflater.inflate(R.layout.app_list_item_view, parent,
+                    false);
+            holder = new ViewHolder();
+            holder.appName = (TextView) convertView
+                    .findViewById(R.id.list_app_name);
+            holder.appPackageName = (TextView) convertView
+                    .findViewById(R.id.list_app_package);
+            holder.appIcon = (ImageView) convertView
+                    .findViewById(R.id.list_app_icon);
+            holder.systemAppIcon = (ImageView) convertView
+                    .findViewById(R.id.list_system_app_icon);
+            holder.groupIcons = (LinearLayout) convertView
+                    .findViewById(R.id.app_list_group_icons);
+            
+            int i = 0;
+            holder.groupIconsView = new ImageView[mCategory.getSubCategories().size()];
+            for (Subcategory category : mCategory.getSubCategories()){
+                ImageView icon = new ImageView(mContext);
+                icon.setImageDrawable(category.getDarkIcon());
+                holder.groupIconsView[i++] = icon;
+                holder.groupIcons.addView(icon);
+            }
+            convertView.setTag(holder);
+        } else
+            holder = (ViewHolder) convertView.getTag();
+
+        AppDetails details = getItem(position);
+        holder.appName.setText(details.getAppName());
+        holder.appPackageName.setText(details.getAppPackageName());
+        holder.appIcon.setImageDrawable(details.getAppIcon());
+
+        // disabling and enabling apps in system application manager is available since API 4.0
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
+            if (details.isEnabled()) {
+                holder.appName.setTextColor(mContext.getResources().getColor(android.R.color.black));
+            } else {
+                holder.appName.setTextColor(mContext.getResources().getColor(R.color.disabled_app_name));
+            }
+        }
+        if(details.isSystemApp()){
+            holder.systemAppIcon.setVisibility(View.VISIBLE);
+            if(details.isEnabled()){
+                holder.systemAppIcon.setImageDrawable(Utils.getmSystemIcon(mContext));
+            } else {
+                holder.systemAppIcon.setImageDrawable(Utils.getmSystemIconDisable(mContext));
+            }
+        } else {
+            holder.systemAppIcon.setVisibility(View.INVISIBLE);
+        }
+
+        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN)
+            convertView.setBackgroundDrawable(mContext
+                    .getResources()
+                    .getDrawable(
+                            details.isSystemApp() ? R.color.grayout_list_item_bg
+                                    : android.R.color.white));
+        else {
+            convertView.setBackground(mContext
+                    .getResources()
+                    .getDrawable(
+                            details.isSystemApp() ? R.color.grayout_list_item_bg
+                                    : android.R.color.white));
+        }
+        for (int i = 0; i < mCategory.getSubCategories().size(); ++i) {
+            if (details.isInSubcategory(mCategory.getSubCategories().get(i).getId())) {
+                // disabling and enabling apps in system application manager is available since API 4.0
+                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
+                    if (details.isEnabled())
+                        holder.groupIconsView[i].setImageDrawable(mCategory.getSubCategories().get(i).getDarkIcon());
+                    else
+                        holder.groupIconsView[i].setImageDrawable(mCategory.getSubCategories().get(i).getDisabledIcon());
+                }
+                holder.groupIconsView[i].setVisibility(View.VISIBLE);
+            } else {
+                holder.groupIconsView[i].setVisibility(View.GONE);
+            }
+        }
+        return convertView;
+    }
+    
+}
diff --git a/app/src/main/java/com/samsung/srpol/ui/tabpager/PageAdapter.java b/app/src/main/java/com/samsung/srpol/ui/tabpager/PageAdapter.java
new file mode 100644 (file)
index 0000000..df90409
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+   Copyright (C) 2014  Samsung Electronics Polska Sp. z o.o.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU AFFERO General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+    You may obtain a copy of the License at
+
+                http://www.gnu.org/licenses/agpl-3.0.txt
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+package com.samsung.srpol.ui.tabpager;
+
+import java.util.List;
+
+import android.content.Context;
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentManager;
+import android.support.v4.app.FragmentPagerAdapter;
+
+import com.samsung.srpol.data.Category;
+import com.samsung.srpol.loader.AppListLoader;
+
+public class PageAdapter extends FragmentPagerAdapter {
+
+    private static List<Category> mCategories;
+    private static PageFragment[] mCreatedFragments = null;
+    
+    public PageAdapter(FragmentManager fm, Context context) {
+        super(fm);
+    }
+    
+    public void refreshPages() {
+        if (mCategories == null) {
+            mCategories = AppListLoader.getCategories();
+            notifyDataSetChanged();
+        } else {
+            refreshAdapterNotify();
+        }
+    }
+
+    public void refreshAdapterNotify() {
+        for (PageFragment fragment : mCreatedFragments) {
+            if (fragment != null)
+                fragment.notifyDataSetChanged();
+        }
+    }
+    @Override
+    public Fragment getItem(int position) {
+        if (mCreatedFragments == null)
+            mCreatedFragments = new PageFragment[mCategories.size()];
+        PageFragment f = mCreatedFragments[position];
+        if (f == null) {
+            f = new PageFragment();
+            
+            Bundle args = new Bundle();
+            args.putInt("position", position);
+            f.setArguments(args);
+            mCreatedFragments[position] = f;
+        }
+        return f;
+    }
+
+    @Override
+    public CharSequence getPageTitle(int position) {
+        return mCategories.get(position).getTitle();
+    }
+    
+    @Override
+    public int getCount() {
+        return mCategories == null ? 0 : mCategories.size();
+    }
+    
+}
diff --git a/app/src/main/java/com/samsung/srpol/ui/tabpager/PageFragment.java b/app/src/main/java/com/samsung/srpol/ui/tabpager/PageFragment.java
new file mode 100644 (file)
index 0000000..bdb7a22
--- /dev/null
@@ -0,0 +1,133 @@
+/*
+   Copyright (C) 2014  Samsung Electronics Polska Sp. z o.o.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU AFFERO General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+    You may obtain a copy of the License at
+
+                http://www.gnu.org/licenses/agpl-3.0.txt
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+package com.samsung.srpol.ui.tabpager;
+
+import com.nhaarman.listviewanimations.appearance.AnimationAdapter;
+import com.nhaarman.listviewanimations.appearance.simple.AlphaInAnimationAdapter;
+import com.samsung.srpol.R;
+import com.samsung.srpol.data.Category;
+import com.samsung.srpol.data.Subcategory;
+import com.samsung.srpol.loader.AppListLoader;
+import com.samsung.srpol.parallax.ParallaxListView;
+import com.samsung.srpol.ui.AppInfoActivity;
+import com.samsung.srpol.ui.PopupActivity;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.View.OnClickListener;
+import android.widget.AdapterView;
+import android.widget.ImageButton;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.ListView;
+import android.widget.TextView;
+import android.widget.AdapterView.OnItemClickListener;
+
+public class PageFragment extends Fragment {
+
+    private AppListArrayAdapter mAppListArrayAdapter;
+    private Category mCategory;
+    private int mPosition;
+
+    @Override