auto import from //branches/cupcake/...@131421
This commit is contained in:
@@ -479,7 +479,7 @@
|
||||
|
||||
<activity android:name="GadgetPickActivity" android:label="@string/gadget_picker_title">
|
||||
<intent-filter>
|
||||
<action android:name="android.gadget.action.PICK_GADGET" />
|
||||
<action android:name="android.gadget.action.GADGET_PICK" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
BIN
res/drawable/ic_menu_filter_settings.png
Executable file
BIN
res/drawable/ic_menu_filter_settings.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
@@ -20,19 +20,17 @@
|
||||
android:layout_height="fill_parent">
|
||||
<ListView
|
||||
android:id="@android:id/list"
|
||||
android:layout_weight="1"
|
||||
android:drawSelectorOnTop="false"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
</ListView>
|
||||
<TextView android:id="@android:id/empty"
|
||||
android:layout_height="wrap_content" />
|
||||
<TextView android:id="@+id/empty_view"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingLeft="20dip"
|
||||
android:paddingTop="5dip"
|
||||
android:text="@string/empty_list_msg"
|
||||
android:textSize="15sp" />
|
||||
android:gravity="center"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
19
res/values-nb-nokeys/strings.xml
Normal file
19
res/values-nb-nokeys/strings.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright (C) 2009 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="applications_settings_summary">"Installerte applikasjoner, hurtigtaster"</string>
|
||||
</resources>
|
@@ -49,8 +49,7 @@
|
||||
<string name="radioInfo_lac">"LAC"</string>
|
||||
<string name="radioInfo_cid">"CID"</string>
|
||||
<string name="sdcard_unmount">"Unmount SD card"</string>
|
||||
<!-- no translation found for sdcard_format (362497552060004057) -->
|
||||
<skip />
|
||||
<string name="sdcard_format">"Format SD card"</string>
|
||||
<string name="small_font">"Liten"</string>
|
||||
<string name="medium_font">"Middels"</string>
|
||||
<string name="large_font">"Stor"</string>
|
||||
@@ -160,8 +159,7 @@
|
||||
<string name="radio_info_smsc_label">"SMSC:"</string>
|
||||
<string name="radio_info_smsc_update_label">"Update"</string>
|
||||
<string name="radio_info_smsc_refresh_label">"Refresh"</string>
|
||||
<!-- no translation found for radio_info_toggle_dns_check_label (8292252930563286858) -->
|
||||
<skip />
|
||||
<string name="radio_info_toggle_dns_check_label">"Toggle DNS check"</string>
|
||||
<string name="band_mode_title">"Velg GSM/UMTS-bånd"</string>
|
||||
<string name="band_mode_loading">"Henter båndliste…"</string>
|
||||
<string name="band_mode_set">"Velg"</string>
|
||||
@@ -184,8 +182,7 @@
|
||||
<string name="activity_picker_label">"Velg aktivitet"</string>
|
||||
<string name="device_info_label">"Enhetsinformasjon"</string>
|
||||
<string name="battery_info_label">"Batteriinformasjon"</string>
|
||||
<!-- no translation found for battery_history_label (8242244969757414501) -->
|
||||
<skip />
|
||||
<string name="battery_history_label">"Batterihistorikk"</string>
|
||||
<string name="display_label">"Skjerm"</string>
|
||||
<string name="phone_info_label">"Telefoninformasjon"</string>
|
||||
<string name="sd_card_settings_label">"Minnekort"</string>
|
||||
@@ -317,12 +314,9 @@
|
||||
<string name="wifi_setting_num_channels_summary">"Velg antall kanaler som skal brukes"</string>
|
||||
<string name="wifi_setting_num_channels_error">"Kunne ikke velge juridisk område."</string>
|
||||
<string name="wifi_setting_num_channels_channel_phrase">"<xliff:g id="NUM_CHANNELS">%1$d</xliff:g> kanaler"</string>
|
||||
<!-- no translation found for wifi_setting_sleep_policy_title (1367731352485585528) -->
|
||||
<skip />
|
||||
<!-- no translation found for wifi_setting_sleep_policy_summary (7573693311804602041) -->
|
||||
<skip />
|
||||
<!-- no translation found for wifi_setting_sleep_policy_error (5103670439972135148) -->
|
||||
<skip />
|
||||
<string name="wifi_setting_sleep_policy_title">"Soveinnstillinger for trådløst nett"</string>
|
||||
<string name="wifi_setting_sleep_policy_summary">"Spesifiser når telefonen skal bytte fra trådløsnett til mobiltelefonidata"</string>
|
||||
<string name="wifi_setting_sleep_policy_error">"Det oppsto et problem under setting av soveinnstilling."</string>
|
||||
<string name="wifi_advanced_mac_address_title">"MAC-adresse"</string>
|
||||
<string name="fragment_status_scanning">"Søker…"</string>
|
||||
<string name="fragment_status_connecting">"Kobler til <xliff:g id="NETWORK_NAME">%1$s</xliff:g>…"</string>
|
||||
@@ -365,12 +359,9 @@
|
||||
<string name="sound_effects_enable_title">"Hørbart valg"</string>
|
||||
<string name="sound_effects_enable_summary_on">"Lag lyd under skjermvalg"</string>
|
||||
<string name="sound_effects_enable_summary_off">"Lag lyd under skjermvalg"</string>
|
||||
<!-- no translation found for play_media_notification_sounds_enable_title (1008791464029179529) -->
|
||||
<skip />
|
||||
<!-- no translation found for play_media_notification_sounds_enable_summary_on (426729807044947187) -->
|
||||
<skip />
|
||||
<!-- no translation found for play_media_notification_sounds_enable_summary_off (803791141563778934) -->
|
||||
<skip />
|
||||
<string name="play_media_notification_sounds_enable_title">"Varsling for minnekort"</string>
|
||||
<string name="play_media_notification_sounds_enable_summary_on">"Deaktiver varslingslyder for minnekort"</string>
|
||||
<string name="play_media_notification_sounds_enable_summary_off">"Aktiver varslingslyder for minnekort"</string>
|
||||
<string name="sync_settings">"Datasynkronisering"</string>
|
||||
<string name="sync_settings_summary">"Applikasjoner som skal synkroniseres"</string>
|
||||
<string name="display_settings">"Skjerminnstillinger"</string>
|
||||
@@ -378,11 +369,9 @@
|
||||
<string name="animations_summary_on">"Vis animasjon når vinduer åpnes/lukkes"</string>
|
||||
<string name="animations_summary_off">"Vis animasjon når vinduer åpnes/lukkes"</string>
|
||||
<string name="brightness">"Lysstyrke"</string>
|
||||
<!-- no translation found for brightness_summary (838917350127550703) -->
|
||||
<skip />
|
||||
<string name="brightness_summary">"Juster skjermens lysstyrke"</string>
|
||||
<string name="screen_timeout">"Skjermsparer"</string>
|
||||
<!-- no translation found for screen_timeout_summary (2905757633140605334) -->
|
||||
<skip />
|
||||
<string name="screen_timeout_summary">"Juster hvor lang tid som skal gå før skjermen slås av automatisk"</string>
|
||||
<string name="sim_lock_settings">"Innstillinger for SIM-kort-lås"</string>
|
||||
<string name="sim_lock_settings_category">"Sett opp SIM-kort-lås"</string>
|
||||
<string name="sim_lock_settings_title">"SIM-kort-lås"</string>
|
||||
@@ -428,10 +417,8 @@
|
||||
<string name="status_wifi_mac_address">"MAC-adresse for WLAN"</string>
|
||||
<string name="status_bt_address">"Bluetooth-adresse"</string>
|
||||
<string name="status_unavailable">"Ikke tilgjengelig"</string>
|
||||
<!-- no translation found for status_network_traffic_stats (2089739529980224804) -->
|
||||
<skip />
|
||||
<!-- no translation found for status_network_traffic_summary (1456797220417923108) -->
|
||||
<skip />
|
||||
<string name="status_network_traffic_stats">"Nettverksbruk"</string>
|
||||
<string name="status_network_traffic_summary">"Sendt: <xliff:g id="NETWORK_TRAFFIC_0">%1$d packets, %2$d bytes%n</xliff:g>Mottatt: <xliff:g id="NETWORK_TRAFFIC_1">%3$d packets, %4$d bytes</xliff:g>"</string>
|
||||
<string name="status_up_time">"Oppetid"</string>
|
||||
<string name="status_awake_time">"Våken tid"</string>
|
||||
<string name="internal_memory">"Intern lagringsplass"</string>
|
||||
@@ -439,12 +426,9 @@
|
||||
<string name="memory_available">"Tilgjengelig plass"</string>
|
||||
<string name="memory_size">"Total plass"</string>
|
||||
<string name="sd_eject">"Avmonter/løs ut minnekort"</string>
|
||||
<!-- no translation found for sd_eject_summary (3315557796211542962) -->
|
||||
<skip />
|
||||
<!-- no translation found for sd_format (5448738337382712203) -->
|
||||
<skip />
|
||||
<!-- no translation found for sd_format_summary (6616491027883134004) -->
|
||||
<skip />
|
||||
<string name="sd_eject_summary">"Løs ut minnekortet for trygg fjerning"</string>
|
||||
<string name="sd_format">"Formater minnekort"</string>
|
||||
<string name="sd_format_summary">"Formater (fjern alt fra) minnekortet"</string>
|
||||
<string name="sd_unavailable">"Ikke tilgjengelig"</string>
|
||||
<string name="read_only">"(skrivebeskyttet)"</string>
|
||||
<string name="battery_status_title">"Batteristatus"</string>
|
||||
@@ -483,22 +467,14 @@
|
||||
<string name="master_clear_gesture_prompt">"Tegn opplåsingsmønsteret"</string>
|
||||
<string name="master_clear_gesture_explanation">"Du må tegne opplåsingsmønsteret for å bekrefte nullstilling av telefonen."</string>
|
||||
<string name="master_clear_failed">"Telefonen ble ikke nullstilt fordi nullstillingstjenesten ikke er tilgjengelig."</string>
|
||||
<!-- no translation found for media_format_title (4671276096695789895) -->
|
||||
<skip />
|
||||
<!-- no translation found for media_format_summary (3805714639375830120) -->
|
||||
<skip />
|
||||
<!-- no translation found for media_format_desc (1142563222357820834) -->
|
||||
<skip />
|
||||
<!-- no translation found for media_format_button_text (370856400090190151) -->
|
||||
<skip />
|
||||
<!-- no translation found for media_format_final_desc (1776666694910717198) -->
|
||||
<skip />
|
||||
<!-- no translation found for media_format_final_button_text (4881713344315923175) -->
|
||||
<skip />
|
||||
<!-- no translation found for media_format_gesture_prompt (3109349468816856670) -->
|
||||
<skip />
|
||||
<!-- no translation found for media_format_gesture_explanation (4239529439389660159) -->
|
||||
<skip />
|
||||
<string name="media_format_title">"Formater minnekort"</string>
|
||||
<string name="media_format_summary">"Sletter alle data fra minnekortet"</string>
|
||||
<string name="media_format_desc">"Dette valget vil slette alle data fra minnekortet i telefonen. Du vil miste ALLE data på kortet!"</string>
|
||||
<string name="media_format_button_text">"Formater minnekort"</string>
|
||||
<string name="media_format_final_desc">"Formater minnekortet? Dette vil fjerne alle data, og kan ikke gjøres om!"</string>
|
||||
<string name="media_format_final_button_text">"Slett alt"</string>
|
||||
<string name="media_format_gesture_prompt">"Tegn opplåsingsmønsteret"</string>
|
||||
<string name="media_format_gesture_explanation">"Du må tegne opplåsingsmønsteret for å bekrefte formatering av minnekortet."</string>
|
||||
<string name="call_settings_title">"Samtaleinnstillinger"</string>
|
||||
<string name="call_settings_summary">"Telefonsvarer, viderekobling, samtale venter, nummervisning"</string>
|
||||
<string name="network_settings_title">"Mobile nettverk"</string>
|
||||
@@ -552,8 +528,7 @@
|
||||
<string name="lock_example_title">"Eksempelmønster"</string>
|
||||
<string name="lock_example_message">"Tegn over minst fire prikker."\n" "\n"Velg «Neste» når du er klar til å tegne ditt eget mønster."</string>
|
||||
<string name="manageapplications_settings_title">"Installerte applikasjoner"</string>
|
||||
<!-- no translation found for manageapplications_settings_summary (6097117021500651232) -->
|
||||
<skip />
|
||||
<string name="manageapplications_settings_summary">"Hold orden på og fjern installerte applikasjoner"</string>
|
||||
<string name="applications_settings">"Applikasjoner"</string>
|
||||
<string name="applications_settings_summary">"Installerte applikasjoner, hurtigtaster"</string>
|
||||
<string name="applications_settings_header">"Innstillinger for applikasjoner"</string>
|
||||
@@ -567,10 +542,8 @@
|
||||
<string name="cache_header_label">"Hurtiglager"</string>
|
||||
<string name="clear_cache_btn_text">"Fjern hurtiglager"</string>
|
||||
<string name="cache_size_label">"Hurtiglager"</string>
|
||||
<!-- no translation found for controls_label (7611113077086853799) -->
|
||||
<skip />
|
||||
<!-- no translation found for force_stop (7435006169872876756) -->
|
||||
<skip />
|
||||
<string name="controls_label">"Kontroller"</string>
|
||||
<string name="force_stop">"Tving avslutning"</string>
|
||||
<string name="total_size_label">"Totalt"</string>
|
||||
<string name="application_size_label">"Applikasjon"</string>
|
||||
<string name="data_size_label">"Data"</string>
|
||||
@@ -583,10 +556,8 @@
|
||||
<string name="sort_order_alpha">"Sorter"</string>
|
||||
<string name="sort_order_size">"Sorter etter størrelse"</string>
|
||||
<string name="manage_space_text">"Styr plass"</string>
|
||||
<!-- no translation found for filter (2018011724373033887) -->
|
||||
<skip />
|
||||
<!-- no translation found for filter_dlg_title (6507663329723966854) -->
|
||||
<skip />
|
||||
<string name="filter">"Filter"</string>
|
||||
<string name="filter_dlg_title">"Velg filtreringsinnstillinger"</string>
|
||||
<string name="filter_apps_all">"Alle"</string>
|
||||
<string name="filter_apps_third_party">"Tredjeparts"</string>
|
||||
<string name="filter_apps_running">"Kjører"</string>
|
||||
@@ -608,39 +579,28 @@
|
||||
<string name="language_category">"Innstillinger for språk"</string>
|
||||
<string name="text_category">"Tekstinnstillinger"</string>
|
||||
<string name="phone_language">"Språk"</string>
|
||||
<!-- no translation found for phone_language_summary (1809580675831352352) -->
|
||||
<skip />
|
||||
<string name="phone_language_summary">"Velg språk og region"</string>
|
||||
<string name="auto_replace">"Automatisk erstatting"</string>
|
||||
<string name="auto_replace_summary">"Rett opp stavefeil"</string>
|
||||
<string name="auto_caps">"Stor forbokstav"</string>
|
||||
<string name="auto_caps_summary">"Start automatisk setninger med stor bokstav"</string>
|
||||
<string name="auto_punctuate">"Autopunktum"</string>
|
||||
<!-- no translation found for hardkeyboard_category (5957168411305769899) -->
|
||||
<skip />
|
||||
<string name="hardkeyboard_category">"Innstillinger for fysisk tastatur"</string>
|
||||
<string name="auto_punctuate_summary">"Trykk mellomromstasten to ganger for å skrive punktum"</string>
|
||||
<string name="show_password">"Synlige passord"</string>
|
||||
<string name="show_password_summary">"Vis passord mens de skrives inn"</string>
|
||||
<!-- no translation found for user_dict_settings_titlebar (765659257455000490) -->
|
||||
<skip />
|
||||
<!-- no translation found for user_dict_settings_title (8357027437499042191) -->
|
||||
<skip />
|
||||
<!-- no translation found for user_dict_settings_summary (2460427065601355471) -->
|
||||
<skip />
|
||||
<!-- no translation found for user_dict_settings_add_menu_title (4056762757149923551) -->
|
||||
<skip />
|
||||
<!-- no translation found for user_dict_settings_add_dialog_title (4702613990174126482) -->
|
||||
<skip />
|
||||
<!-- no translation found for user_dict_settings_context_menu_edit_title (2210564879320004837) -->
|
||||
<skip />
|
||||
<!-- no translation found for user_dict_settings_context_menu_delete_title (9140703913776549054) -->
|
||||
<skip />
|
||||
<!-- no translation found for user_dict_settings_empty_text (6209268025109242806) -->
|
||||
<skip />
|
||||
<string name="user_dict_settings_titlebar">"Ordliste"</string>
|
||||
<string name="user_dict_settings_title">"Ordliste"</string>
|
||||
<string name="user_dict_settings_summary">"Legg til og fjern ord fra ordlisten"</string>
|
||||
<string name="user_dict_settings_add_menu_title">"Legg til"</string>
|
||||
<string name="user_dict_settings_add_dialog_title">"Legg til ordliste"</string>
|
||||
<string name="user_dict_settings_context_menu_edit_title">"Rediger"</string>
|
||||
<string name="user_dict_settings_context_menu_delete_title">"Slett"</string>
|
||||
<string name="user_dict_settings_empty_text">"Ordlisten er tom. Du kan legge til ord i menyen."</string>
|
||||
<string name="testing">"Testing"</string>
|
||||
<string name="testing_phone_info">"Telefoninformasjon"</string>
|
||||
<string name="testing_battery_info">"Batteriinformasjon"</string>
|
||||
<!-- no translation found for testing_battery_history (3043329445810695647) -->
|
||||
<skip />
|
||||
<string name="testing_battery_history">"Batterihistorikk"</string>
|
||||
<string name="quick_launch_title">"Hurtigtaster"</string>
|
||||
<string name="quick_launch_summary">"Tastatursnarveier for å starte applikasjoner"</string>
|
||||
<string name="quick_launch_assign_application">"Tilordne applikasjon"</string>
|
||||
@@ -654,8 +614,7 @@
|
||||
<string name="quick_launch_display_mode_shortcuts">"Snarveier"</string>
|
||||
<string name="input_methods_settings_title">"Skriving av tekst"</string>
|
||||
<string name="input_methods_settings_summary">"Innstillinger for skriving av tekst"</string>
|
||||
<!-- no translation found for input_methods_settings_label_format (4882768027634191074) -->
|
||||
<skip />
|
||||
<string name="input_methods_settings_label_format">"Innstillinger for %s"</string>
|
||||
<string name="development_settings_title">"Utvikling"</string>
|
||||
<string name="development_settings_summary">"Innstillinger for applikasjonsutvikling"</string>
|
||||
<string name="enable_adb">"USB-debugging"</string>
|
||||
@@ -664,68 +623,36 @@
|
||||
<string name="keep_screen_on_summary">"Skjermen vil aldri blankes under lading"</string>
|
||||
<string name="allow_mock_location">"Tillat manuell plassering"</string>
|
||||
<string name="allow_mock_location_summary">"Tillat manuell plassering"</string>
|
||||
<!-- no translation found for battery_history_known_apps (6907374478255786240) -->
|
||||
<skip />
|
||||
<!-- no translation found for gadget_picker_title (4335873961457985189) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_details_for (5189636461798594740) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_uid (1016606150528436298) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_network_usage (8010852371665217020) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_bytes_received (980307569180518302) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_bytes_sent (2501748768602119159) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_bytes_total (4444807574361642753) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_cpu_usage (2597353713014790877) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_user_time (6227507614894791359) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_system_time (2015862072724507547) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_total_time (3618703970098556104) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_starts (9137453931978571696) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_days (6387593985264923377) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_hours (2593055276272350197) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_minutes (5608990219891318138) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_seconds (7397664460929461350) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_packages_sharing_this_uid (4101596071379250050) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_no_data (1177238743237067617) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_sensor (2333488996028993982) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_used_by_packages (3000711380023436470) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_sensor_usage (3593133338613209024) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_sensor_usage_multi (4536084375991014508) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_screen_on (1377240025275657277) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_screen_on_battery (536058210445081888) -->
|
||||
<skip />
|
||||
<!-- no translation found for battery_history_screen_on_plugged (5019127390021871260) -->
|
||||
<skip />
|
||||
<!-- no translation found for usage_stats_label (5890846333487083609) -->
|
||||
<skip />
|
||||
<!-- no translation found for testing_usage_stats (7823048598893937339) -->
|
||||
<skip />
|
||||
<!-- no translation found for display_order_text (8592776965827565271) -->
|
||||
<skip />
|
||||
<!-- no translation found for app_name_label (2000949925256858308) -->
|
||||
<skip />
|
||||
<!-- no translation found for launch_count_label (4019444833263957024) -->
|
||||
<skip />
|
||||
<!-- no translation found for usage_time_label (295954901452833058) -->
|
||||
<skip />
|
||||
<string name="battery_history_known_apps">"Android System;Dialer;Calendar;Camera;Google Apps;Contacts;"</string>
|
||||
<string name="gadget_picker_title">"Velg gadget"</string>
|
||||
<string name="battery_history_details_for">"Detaljer for UID %d"</string>
|
||||
<string name="battery_history_uid">"UID <xliff:g id="USER_ID">%1$d</xliff:g>"</string>
|
||||
<string name="battery_history_network_usage">"Nettbruk av <xliff:g id="APP_NAME">%1$s</xliff:g>:"</string>
|
||||
<string name="battery_history_bytes_received">"Byte mottatt: <xliff:g id="BYTES">%1$d</xliff:g>"</string>
|
||||
<string name="battery_history_bytes_sent">"Byte sendt: <xliff:g id="BYTES">%1$d</xliff:g>"</string>
|
||||
<string name="battery_history_bytes_total">"Totalt antall byte: <xliff:g id="BYTES">%1$d</xliff:g>"</string>
|
||||
<string name="battery_history_cpu_usage">"CPU-bruk av <xliff:g id="APP_NAME">%1$s</xliff:g>:"</string>
|
||||
<string name="battery_history_user_time">"Brukertid:"</string>
|
||||
<string name="battery_history_system_time">"Systemtid:"</string>
|
||||
<string name="battery_history_total_time">"Total tid:"</string>
|
||||
<string name="battery_history_starts">"Oppstarter: <xliff:g id="STARTS">%1$d</xliff:g>"</string>
|
||||
<string name="battery_history_days">"<xliff:g id="DAYS">%1$d</xliff:g> dager, <xliff:g id="HOURS">%2$d</xliff:g> timer, <xliff:g id="MINUTES">%3$d</xliff:g> minutter, <xliff:g id="SECONDS">%4$d</xliff:g> sekunder"</string>
|
||||
<string name="battery_history_hours">"<xliff:g id="HOURS">%1$d</xliff:g> timer, <xliff:g id="MINUTES">%2$d</xliff:g> minutter, <xliff:g id="SECONDS">%3$d</xliff:g> sekunder"</string>
|
||||
<string name="battery_history_minutes">"<xliff:g id="MINUTES">%1$d</xliff:g> minutter, <xliff:g id="SECONDS">%2$d</xliff:g> sekunder"</string>
|
||||
<string name="battery_history_seconds">"<xliff:g id="SECONDS">%1$d</xliff:g> sekunder"</string>
|
||||
<string name="battery_history_packages_sharing_this_uid">"Pakker som deler denne UID-en:"</string>
|
||||
<string name="battery_history_no_data">"Ingen batterihistorikk tilgjengelig"</string>
|
||||
<string name="battery_history_sensor">"Sensor:"</string>
|
||||
<string name="battery_history_used_by_packages">"Sensor brukt av pakker:"</string>
|
||||
<string name="battery_history_sensor_usage">"Brukt <xliff:g id="COUNT">%1$d</xliff:g> ganger av <xliff:g id="PACKAGE">%2$s</xliff:g>"</string>
|
||||
<string name="battery_history_sensor_usage_multi">"Brukt <xliff:g id="COUNT">%1$d</xliff:g> ganger av en av:"</string>
|
||||
<string name="battery_history_screen_on">"Tid brukt med skjermen på:"</string>
|
||||
<string name="battery_history_screen_on_battery">"På batteri:"</string>
|
||||
<string name="battery_history_screen_on_plugged">"På nettstrøm:"</string>
|
||||
<string name="usage_stats_label">"Bruksstatistikk"</string>
|
||||
<string name="testing_usage_stats">"Bruksstatistikk"</string>
|
||||
<string name="display_order_text">"Sorter etter:"</string>
|
||||
<string name="app_name_label">"Applikasjon"</string>
|
||||
<string name="launch_count_label">"Antall"</string>
|
||||
<string name="usage_time_label">"Brukstid"</string>
|
||||
</resources>
|
||||
|
@@ -65,18 +65,24 @@ public class DeviceInfoSettings extends PreferenceActivity {
|
||||
* Settings is a generic app and should not contain any device-specific
|
||||
* info.
|
||||
*/
|
||||
|
||||
// These are contained in the "container" preference group
|
||||
PreferenceGroup parentPreference = (PreferenceGroup) findPreference(KEY_CONTAINER);
|
||||
Utils.updatePreferenceToSpecificActivityOrRemove(this, parentPreference, KEY_TERMS,
|
||||
Utils.UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY);
|
||||
Utils.updatePreferenceToSpecificActivityOrRemove(this, parentPreference, KEY_LICENSE,
|
||||
Utils.UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY);
|
||||
Utils.updatePreferenceToSpecificActivityOrRemove(this, parentPreference, KEY_CONTRIBUTORS,
|
||||
Utils.UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY);
|
||||
Utils.updatePreferenceToSpecificActivityOrRemove(this, parentPreference, KEY_COPYRIGHT,
|
||||
Utils.UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY);
|
||||
Utils.updatePreferenceToSpecificActivityOrRemove(this, parentPreference, KEY_TEAM,
|
||||
Utils.UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY);
|
||||
Utils.updatePreferenceToSpecificActivityOrRemove(this, parentPreference, KEY_SYSTEM_UPDATE_SETTINGS,
|
||||
|
||||
// These are contained by the root preference screen
|
||||
parentPreference = getPreferenceScreen();
|
||||
Utils.updatePreferenceToSpecificActivityOrRemove(this, parentPreference,
|
||||
KEY_SYSTEM_UPDATE_SETTINGS,
|
||||
Utils.UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY);
|
||||
Utils.updatePreferenceToSpecificActivityOrRemove(this, parentPreference, KEY_CONTRIBUTORS,
|
||||
Utils.UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY);
|
||||
}
|
||||
|
||||
|
@@ -20,7 +20,7 @@ import android.app.LauncherActivity;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.gadget.GadgetInfo;
|
||||
import android.gadget.GadgetProviderInfo;
|
||||
import android.gadget.GadgetManager;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
@@ -28,8 +28,11 @@ import android.view.View;
|
||||
import android.widget.ListView;
|
||||
import android.util.Log;
|
||||
|
||||
import java.text.Collator;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
|
||||
public class GadgetPickActivity extends LauncherActivity
|
||||
{
|
||||
@@ -37,7 +40,6 @@ public class GadgetPickActivity extends LauncherActivity
|
||||
|
||||
GadgetManager mGadgetManager;
|
||||
int mGadgetId;
|
||||
int mHostId;
|
||||
|
||||
public GadgetPickActivity() {
|
||||
mGadgetManager = GadgetManager.getInstance(this);
|
||||
@@ -48,7 +50,6 @@ public class GadgetPickActivity extends LauncherActivity
|
||||
super.onCreate(icicle);
|
||||
|
||||
Bundle extras = getIntent().getExtras();
|
||||
mHostId = extras.getInt(GadgetManager.EXTRA_HOST_ID);
|
||||
mGadgetId = extras.getInt(GadgetManager.EXTRA_GADGET_ID);
|
||||
|
||||
setResultData(RESULT_CANCELED);
|
||||
@@ -65,7 +66,7 @@ public class GadgetPickActivity extends LauncherActivity
|
||||
|
||||
@Override
|
||||
public List<ListItem> makeListItems() {
|
||||
List<GadgetInfo> installed = mGadgetManager.getInstalledProviders();
|
||||
List<GadgetProviderInfo> installed = mGadgetManager.getInstalledProviders();
|
||||
PackageManager pm = getPackageManager();
|
||||
|
||||
Drawable defaultIcon = null;
|
||||
@@ -74,7 +75,7 @@ public class GadgetPickActivity extends LauncherActivity
|
||||
ArrayList<ListItem> result = new ArrayList();
|
||||
final int N = installed.size();
|
||||
for (int i=0; i<N; i++) {
|
||||
GadgetInfo info = installed.get(i);
|
||||
GadgetProviderInfo info = installed.get(i);
|
||||
|
||||
LauncherActivity.ListItem item = new LauncherActivity.ListItem();
|
||||
item.packageName = info.provider.getPackageName();
|
||||
@@ -100,6 +101,13 @@ public class GadgetPickActivity extends LauncherActivity
|
||||
|
||||
result.add(item);
|
||||
}
|
||||
|
||||
Collections.sort(result, new Comparator<ListItem>() {
|
||||
Collator mCollator = Collator.getInstance();
|
||||
public int compare(ListItem lhs, ListItem rhs) {
|
||||
return mCollator.compare(lhs.label, rhs.label);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@@ -133,13 +133,14 @@ public class ManageApplications extends ListActivity implements
|
||||
|
||||
// messages posted to the handler
|
||||
private static final int HANDLER_MESSAGE_BASE = 0;
|
||||
private static final int COMPUTE_PKG_SIZE_START = HANDLER_MESSAGE_BASE+1;
|
||||
private static final int INIT_PKG_INFO = HANDLER_MESSAGE_BASE+1;
|
||||
private static final int COMPUTE_PKG_SIZE_DONE = HANDLER_MESSAGE_BASE+2;
|
||||
private static final int REMOVE_PKG = HANDLER_MESSAGE_BASE+3;
|
||||
private static final int REORDER_LIST = HANDLER_MESSAGE_BASE+4;
|
||||
private static final int ADD_PKG_START = HANDLER_MESSAGE_BASE+5;
|
||||
private static final int ADD_PKG_DONE = HANDLER_MESSAGE_BASE+6;
|
||||
private static final int REFRESH_ICONS = HANDLER_MESSAGE_BASE+7;
|
||||
private static final int NEXT_LOAD_STEP = HANDLER_MESSAGE_BASE+8;
|
||||
|
||||
// observer object used for computing pkg sizes
|
||||
private PkgSizeObserver mObserver;
|
||||
@@ -150,7 +151,7 @@ public class ManageApplications extends ListActivity implements
|
||||
private PackageIntentReceiver mReceiver;
|
||||
// atomic variable used to track if computing pkg sizes is in progress. should be volatile?
|
||||
|
||||
private boolean mDoneIniting = false;
|
||||
private boolean mComputeSizes = false;
|
||||
// default icon thats used when displaying applications initially before resource info is
|
||||
// retrieved
|
||||
private Drawable mDefaultAppIcon;
|
||||
@@ -189,6 +190,13 @@ public class ManageApplications extends ListActivity implements
|
||||
//TODO implement a cache system
|
||||
private Map<String, AppInfo> mAppPropCache;
|
||||
|
||||
// empty message displayed when list is empty
|
||||
private TextView mEmptyView;
|
||||
|
||||
// Boolean variables indicating state
|
||||
private boolean mLoadLabels = false;
|
||||
private boolean mSizesFirst = false;
|
||||
|
||||
/*
|
||||
* Handler class to handle messages for various operations
|
||||
* Most of the operations that effect Application related data
|
||||
@@ -232,11 +240,13 @@ public class ManageApplications extends ListActivity implements
|
||||
pkgName = data.getString(ATTR_PKG_NAME);
|
||||
}
|
||||
switch (msg.what) {
|
||||
case COMPUTE_PKG_SIZE_START:
|
||||
if(localLOGV) Log.i(TAG, "Message COMPUTE_PKG_SIZE_START");
|
||||
case INIT_PKG_INFO:
|
||||
if(localLOGV) Log.i(TAG, "Message INIT_PKG_INFO");
|
||||
setProgressBarIndeterminateVisibility(true);
|
||||
mComputeIndex = 0;
|
||||
// Retrieve the package list and init some structures
|
||||
initAppList(mFilterApps);
|
||||
mHandler.sendEmptyMessage(NEXT_LOAD_STEP);
|
||||
break;
|
||||
case COMPUTE_PKG_SIZE_DONE:
|
||||
if(localLOGV) Log.i(TAG, "Message COMPUTE_PKG_SIZE_DONE");
|
||||
@@ -297,9 +307,9 @@ public class ManageApplications extends ListActivity implements
|
||||
COMPUTE_PKG_SIZE_DONE);
|
||||
} else {
|
||||
// end computation here
|
||||
mDoneIniting = true;
|
||||
mComputeSizes = true;
|
||||
mAppInfoAdapter.sortList(mSortOrder);
|
||||
setProgressBarIndeterminateVisibility(false);
|
||||
mHandler.sendEmptyMessage(NEXT_LOAD_STEP);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -309,7 +319,7 @@ public class ManageApplications extends ListActivity implements
|
||||
Log.w(TAG, "Ignoring message:REMOVE_PKG for null pkgName");
|
||||
break;
|
||||
}
|
||||
if (!mDoneIniting) {
|
||||
if (!mComputeSizes) {
|
||||
Boolean currB = mAddRemoveMap.get(pkgName);
|
||||
if (currB == null || (currB.equals(Boolean.TRUE))) {
|
||||
mAddRemoveMap.put(pkgName, Boolean.FALSE);
|
||||
@@ -340,7 +350,7 @@ public class ManageApplications extends ListActivity implements
|
||||
// Reset cache
|
||||
mAppPropCache = null;
|
||||
mFilterApps = FILTER_APPS_ALL;
|
||||
mHandler.sendEmptyMessage(COMPUTE_PKG_SIZE_START);
|
||||
mHandler.sendEmptyMessage(INIT_PKG_INFO);
|
||||
sendMessageToHandler(REORDER_LIST, menuOption);
|
||||
}
|
||||
}
|
||||
@@ -351,7 +361,7 @@ public class ManageApplications extends ListActivity implements
|
||||
Log.w(TAG, "Ignoring message:ADD_PKG_START for null pkgName");
|
||||
break;
|
||||
}
|
||||
if (!mDoneIniting) {
|
||||
if (!mComputeSizes) {
|
||||
Boolean currB = mAddRemoveMap.get(pkgName);
|
||||
if (currB == null || (currB.equals(Boolean.FALSE))) {
|
||||
mAddRemoveMap.put(pkgName, Boolean.TRUE);
|
||||
@@ -382,21 +392,41 @@ public class ManageApplications extends ListActivity implements
|
||||
} else {
|
||||
mAppInfoAdapter.updateAppsResourceInfo(iconMap);
|
||||
}
|
||||
// initiate compute pkg sizes
|
||||
if (localLOGV) Log.i(TAG, "Initiating compute sizes for first time");
|
||||
mObserver = new PkgSizeObserver();
|
||||
if (mAppInfoAdapter.getCount() > 0) {
|
||||
mObserver.invokeGetSizeInfo(mAppInfoAdapter.getApplicationInfo(0),
|
||||
COMPUTE_PKG_SIZE_DONE);
|
||||
mLoadLabels = true;
|
||||
mHandler.sendEmptyMessage(NEXT_LOAD_STEP);
|
||||
break;
|
||||
case NEXT_LOAD_STEP:
|
||||
if (mComputeSizes && mLoadLabels) {
|
||||
doneLoadingData();
|
||||
} else if (!mComputeSizes && !mLoadLabels) {
|
||||
// Either load the package labels or initiate get size info
|
||||
if (mSizesFirst) {
|
||||
initComputeSizes();
|
||||
} else {
|
||||
mDoneIniting = true;
|
||||
initResourceThread();
|
||||
}
|
||||
} else {
|
||||
// Create list view from the adapter here. Wait till the sort order
|
||||
// of list is defined. its either by label or by size. so atleast one of the
|
||||
// first steps should be complete before creating the list
|
||||
createListView();
|
||||
if (!mComputeSizes) {
|
||||
initComputeSizes();
|
||||
} else if (!mLoadLabels) {
|
||||
initResourceThread();
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private void doneLoadingData() {
|
||||
setProgressBarIndeterminateVisibility(false);
|
||||
}
|
||||
|
||||
List<ApplicationInfo> getInstalledApps(int filterOption) {
|
||||
List<ApplicationInfo> installedAppList = mPm.getInstalledApplications(
|
||||
PackageManager.GET_UNINSTALLED_PACKAGES);
|
||||
@@ -457,27 +487,54 @@ public class ManageApplications extends ListActivity implements
|
||||
|
||||
// some initialization code used when kicking off the size computation
|
||||
private void initAppList(int filterOption) {
|
||||
mDoneIniting = false;
|
||||
mComputeSizes = false;
|
||||
// Initialize lists
|
||||
List<ApplicationInfo> appList = getInstalledApps(filterOption);
|
||||
mAddRemoveMap = new TreeMap<String, Boolean>();
|
||||
mAppInfoAdapter = new AppInfoAdapter(this, appList);
|
||||
dismissLoadingMsg();
|
||||
// get list and set listeners and adapter
|
||||
ListView lv= (ListView) findViewById(android.R.id.list);
|
||||
lv.setOnItemClickListener(this);
|
||||
lv.setSaveEnabled(true);
|
||||
lv.setItemsCanFocus(true);
|
||||
lv.setOnItemClickListener(this);
|
||||
lv.setAdapter(mAppInfoAdapter);
|
||||
// register receiver
|
||||
mReceiver = new PackageIntentReceiver();
|
||||
mReceiver.registerReceiver();
|
||||
}
|
||||
|
||||
// Utility method to start a thread to read application labels and icons
|
||||
private void initResourceThread() {
|
||||
//load resources now
|
||||
if(mResourceThread.isAlive()) {
|
||||
mResourceThread.interrupt();
|
||||
}
|
||||
mResourceThread.loadAllResources(appList);
|
||||
mResourceThread.loadAllResources(mAppInfoAdapter.getAppList());
|
||||
}
|
||||
|
||||
private void initComputeSizes() {
|
||||
// initiate compute pkg sizes
|
||||
if (localLOGV) Log.i(TAG, "Initiating compute sizes for first time");
|
||||
if (mAppInfoAdapter.getCount() > 0) {
|
||||
mObserver.invokeGetSizeInfo(mAppInfoAdapter.getApplicationInfo(0),
|
||||
COMPUTE_PKG_SIZE_DONE);
|
||||
} else {
|
||||
mComputeSizes = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void showEmptyViewIfListEmpty() {
|
||||
if (localLOGV) Log.i(TAG, "Checking for empty view");
|
||||
if (mAppInfoAdapter.getCount() > 0) {
|
||||
mEmptyView.setVisibility(View.GONE);
|
||||
} else {
|
||||
mEmptyView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
private void createListView() {
|
||||
dismissLoadingMsg();
|
||||
// get list and set listeners and adapter
|
||||
ListView lv= (ListView) findViewById(android.R.id.list);
|
||||
lv.setAdapter(mAppInfoAdapter);
|
||||
lv.setOnItemClickListener(this);
|
||||
lv.setSaveEnabled(true);
|
||||
lv.setItemsCanFocus(true);
|
||||
lv.setOnItemClickListener(this);
|
||||
showEmptyViewIfListEmpty();
|
||||
}
|
||||
|
||||
// internal structure used to track added and deleted packages when
|
||||
@@ -495,22 +552,22 @@ public class ManageApplications extends ListActivity implements
|
||||
List<ApplicationInfo> mAppList;
|
||||
|
||||
void loadAllResources(List<ApplicationInfo> appList) {
|
||||
if(appList == null || appList.size() <= 0) {
|
||||
Log.w(TAG, "Empty or null application list");
|
||||
return;
|
||||
}
|
||||
mAppList = appList;
|
||||
start();
|
||||
}
|
||||
|
||||
public void run() {
|
||||
Map<String, AppInfo> iconMap = new HashMap<String, AppInfo>();
|
||||
if(mAppList == null || mAppList.size() <= 0) {
|
||||
Log.w(TAG, "Empty or null application list");
|
||||
} else {
|
||||
for (ApplicationInfo appInfo : mAppList) {
|
||||
CharSequence appName = appInfo.loadLabel(mPm);
|
||||
Drawable appIcon = appInfo.loadIcon(mPm);
|
||||
iconMap.put(appInfo.packageName,
|
||||
new AppInfo(appInfo.packageName, appName, appIcon));
|
||||
}
|
||||
}
|
||||
Message msg = mHandler.obtainMessage(REFRESH_ICONS);
|
||||
msg.obj = iconMap;
|
||||
mHandler.sendMessage(msg);
|
||||
@@ -697,6 +754,10 @@ public class ManageApplications extends ListActivity implements
|
||||
}
|
||||
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
if (position >= mAppLocalList.size()) {
|
||||
Log.w(TAG, "Invalid view position:"+position+", actual size is:"+mAppLocalList.size());
|
||||
return null;
|
||||
}
|
||||
// A ViewHolder keeps references to children views to avoid unneccessary calls
|
||||
// to findViewById() on each row.
|
||||
AppViewHolder holder;
|
||||
@@ -773,7 +834,12 @@ public class ManageApplications extends ListActivity implements
|
||||
mAppPropMap.put(applicationInfo.packageName, rInfo);
|
||||
}
|
||||
}
|
||||
if (mAppLocalList.size() > 0) {
|
||||
sortList(mSortOrder);
|
||||
} else {
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
showEmptyViewIfListEmpty();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -927,7 +993,7 @@ public class ManageApplications extends ListActivity implements
|
||||
* posts a message, we do a cursory check of validity on mAppInfoAdapter's applist
|
||||
*/
|
||||
private void clearMessagesInHandler() {
|
||||
mHandler.removeMessages(COMPUTE_PKG_SIZE_START);
|
||||
mHandler.removeMessages(INIT_PKG_INFO);
|
||||
mHandler.removeMessages(COMPUTE_PKG_SIZE_DONE);
|
||||
mHandler.removeMessages(REMOVE_PKG);
|
||||
mHandler.removeMessages(REORDER_LIST);
|
||||
@@ -1040,12 +1106,14 @@ public class ManageApplications extends ListActivity implements
|
||||
String action = lIntent.getAction();
|
||||
if (action.equals(Intent.ACTION_MANAGE_PACKAGE_STORAGE)) {
|
||||
mSortOrder = SORT_ORDER_SIZE;
|
||||
mSizesFirst = true;
|
||||
}
|
||||
mPm = getPackageManager();
|
||||
// initialize some window features
|
||||
requestWindowFeature(Window.FEATURE_RIGHT_ICON);
|
||||
requestWindowFeature(Window.FEATURE_PROGRESS);
|
||||
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
|
||||
setContentView(R.layout.compute_sizes);
|
||||
// init mLoadingDlg
|
||||
mLoadingDlg = new ProgressDialog(this);
|
||||
mLoadingDlg.setProgressStyle(ProgressDialog.STYLE_SPINNER);
|
||||
@@ -1058,6 +1126,9 @@ public class ManageApplications extends ListActivity implements
|
||||
mComputingSizeStr = getText(R.string.computing_size);
|
||||
// initialize the inflater
|
||||
mInflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
mReceiver = new PackageIntentReceiver();
|
||||
mEmptyView = (TextView) findViewById(R.id.empty_view);
|
||||
mObserver = new PkgSizeObserver();
|
||||
}
|
||||
|
||||
private void showLoadingMsg() {
|
||||
@@ -1077,11 +1148,10 @@ public class ManageApplications extends ListActivity implements
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
setContentView(R.layout.compute_sizes);
|
||||
showLoadingMsg();
|
||||
// Create a thread to load resources
|
||||
mResourceThread = new ResourceLoaderThread();
|
||||
sendMessageToHandler(COMPUTE_PKG_SIZE_START);
|
||||
sendMessageToHandler(INIT_PKG_INFO);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1138,13 +1208,14 @@ public class ManageApplications extends ListActivity implements
|
||||
.setIcon(android.R.drawable.ic_menu_sort_alphabetically);
|
||||
menu.add(0, SORT_ORDER_SIZE, 2, R.string.sort_order_size)
|
||||
.setIcon(android.R.drawable.ic_menu_sort_by_size);
|
||||
menu.add(0, FILTER_OPTIONS, 3, R.string.filter);
|
||||
menu.add(0, FILTER_OPTIONS, 3, R.string.filter)
|
||||
.setIcon(R.drawable.ic_menu_filter_settings);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||
if (mDoneIniting) {
|
||||
if (mComputeSizes) {
|
||||
menu.findItem(SORT_ORDER_ALPHA).setVisible(mSortOrder != SORT_ORDER_ALPHA);
|
||||
menu.findItem(SORT_ORDER_SIZE).setVisible(mSortOrder != SORT_ORDER_SIZE);
|
||||
menu.findItem(FILTER_OPTIONS).setVisible(true);
|
||||
|
@@ -44,6 +44,7 @@ import java.util.Locale;
|
||||
public class UserDictionarySettings extends ListActivity {
|
||||
|
||||
private static final String INSTANCE_KEY_DIALOG_EDITING_WORD = "DIALOG_EDITING_WORD";
|
||||
private static final String INSTANCE_KEY_ADDED_WORD = "DIALOG_ADDED_WORD";
|
||||
|
||||
private static final String[] QUERY_PROJECTION = {
|
||||
UserDictionary.Words._ID, UserDictionary.Words.WORD
|
||||
@@ -70,6 +71,9 @@ public class UserDictionarySettings extends ListActivity {
|
||||
|
||||
private Cursor mCursor;
|
||||
|
||||
private boolean mAddedWordAlready;
|
||||
private boolean mAutoReturn;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@@ -92,8 +96,10 @@ public class UserDictionarySettings extends ListActivity {
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
if (getIntent().getAction().equals("com.android.settings.USER_DICTIONARY_INSERT")) {
|
||||
if (!mAddedWordAlready
|
||||
&& getIntent().getAction().equals("com.android.settings.USER_DICTIONARY_INSERT")) {
|
||||
String word = getIntent().getStringExtra(EXTRA_WORD);
|
||||
mAutoReturn = true;
|
||||
if (word != null) {
|
||||
showAddOrEditDialog(word);
|
||||
}
|
||||
@@ -103,12 +109,14 @@ public class UserDictionarySettings extends ListActivity {
|
||||
protected void onRestoreInstanceState(Bundle state) {
|
||||
super.onRestoreInstanceState(state);
|
||||
mDialogEditingWord = state.getString(INSTANCE_KEY_DIALOG_EDITING_WORD);
|
||||
mAddedWordAlready = state.getBoolean(INSTANCE_KEY_ADDED_WORD, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
outState.putString(INSTANCE_KEY_DIALOG_EDITING_WORD, mDialogEditingWord);
|
||||
outState.putBoolean(INSTANCE_KEY_ADDED_WORD, mAddedWordAlready);
|
||||
}
|
||||
|
||||
private Cursor createCursor() {
|
||||
@@ -197,8 +205,12 @@ public class UserDictionarySettings extends ListActivity {
|
||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
onAddOrEditFinished(editText.getText().toString());
|
||||
if (mAutoReturn) finish();
|
||||
}})
|
||||
.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (mAutoReturn) finish();
|
||||
}})
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.create();
|
||||
}
|
||||
|
||||
@@ -220,8 +232,9 @@ public class UserDictionarySettings extends ListActivity {
|
||||
|
||||
// TODO: present UI for picking whether to add word to all locales, or current.
|
||||
UserDictionary.Words.addWord(this, word.toString(),
|
||||
128, UserDictionary.Words.LOCALE_TYPE_ALL);
|
||||
250, UserDictionary.Words.LOCALE_TYPE_ALL);
|
||||
mCursor.requery();
|
||||
mAddedWordAlready = true;
|
||||
}
|
||||
|
||||
private void deleteWord(String word) {
|
||||
|
@@ -229,11 +229,14 @@ public class ConnectSpecificProfilesActivity extends PreferenceActivity
|
||||
for (Profile profile : mDevice.getProfiles()) {
|
||||
CheckBoxPreference profilePref =
|
||||
(CheckBoxPreference) findPreference(profile.toString());
|
||||
if (profilePref == null) continue;
|
||||
|
||||
if (profilePref == null) {
|
||||
profilePref = createProfilePreference(profile);
|
||||
mProfileContainer.addPreference(profilePref);
|
||||
} else {
|
||||
refreshProfilePreference(profilePref, profile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void refreshProfilePreference(CheckBoxPreference profilePref, Profile profile) {
|
||||
String address = mDevice.getAddress();
|
||||
|
Reference in New Issue
Block a user