OSDN Git Service

Refactor SmsListPreference into AppListPreference.
authorJeff Davidson <jpd@google.com>
Tue, 25 Mar 2014 19:21:30 +0000 (12:21 -0700)
committerJeff Davidson <jpd@google.com>
Tue, 15 Apr 2014 02:24:15 +0000 (19:24 -0700)
commitb9558d91dfcae4cd98f2e25dd070dfa8c926d524
tree3e27d237c79ea825c3794016b920121f178596bd
parent210bb8694aa5ad14b2b5bd52ab77a7960b4b5712
Refactor SmsListPreference into AppListPreference.

This generalizes the pattern of needing to offer a selection among a
list of candidate applications.

Also move some reusable logic around querying PackageManager for icons
into AppListPreference, and remove some unnecessary update logic: the
preference will update itself when onPreferenceChange returns true,
and we can set the summary to '%s' to automatically use the entry as
the summary without having to reset it each time.

Change-Id: I007b9ed58359302f93b367a4b86354e93613bf3e
res/layout/app_preference_item.xml [moved from res/layout/sms_preference_item.xml with 95% similarity]
res/xml/wireless_settings.xml
src/com/android/settings/AppListPreference.java [moved from src/com/android/settings/SmsListPreference.java with 50% similarity]
src/com/android/settings/WirelessSettings.java