FP5-3109 Calendar icon does not reflect current date
* Root Cause
Configuring package names for calendar and colck
* Solution
Configuring package names for calendar and colck
* Test Steps
1.Settings->System->Date&time 2.Modify the date or time and watch the calendar and clock icons change.
* Test Result
pass
Change-Id: I4aaea3aec382b705b29c0783c3f37fcf20a55eb8
(cherry picked from commit 9385beabb451a3b9587baaa2a041763bd34cd64f)
(cherry picked from commit d0eda6a2a6b0ce3656357252a0e04f6b1021dc21)
diff --git a/iconloaderlib/res/values/config.xml b/iconloaderlib/res/values/config.xml
index 893f955..950b5c9 100644
--- a/iconloaderlib/res/values/config.xml
+++ b/iconloaderlib/res/values/config.xml
@@ -24,7 +24,7 @@
<bool name="simple_cache_enable_im_memory">false</bool>
<string name="cache_db_name" translatable="false">app_icons.db</string>
- <string name="calendar_component_name" translatable="false"></string>
- <string name="clock_component_name" translatable="false"></string>
+ <string name="calendar_component_name" translatable="false">"com.google.android.calendar/com.android.calendar.AllInOneActivity"</string>
+ <string name="clock_component_name" translatable="false">"com.google.android.deskclock/com.android.deskclock.DeskClock"</string>
</resources>
\ No newline at end of file
diff --git a/iconloaderlib/src/com/android/launcher3/icons/IconProvider.java b/iconloaderlib/src/com/android/launcher3/icons/IconProvider.java
index 204651c..b8a577d 100644
--- a/iconloaderlib/src/com/android/launcher3/icons/IconProvider.java
+++ b/iconloaderlib/src/com/android/launcher3/icons/IconProvider.java
@@ -303,12 +303,12 @@
public void onReceive(Context context, Intent intent) {
switch (intent.getAction()) {
case ACTION_TIMEZONE_CHANGED:
- if (mClock != null) {
- mCallback.onAppIconChanged(mClock.getPackageName(), Process.myUserHandle());
- }
// follow through
case ACTION_DATE_CHANGED:
case ACTION_TIME_CHANGED:
+ if (mClock != null) {
+ mCallback.onAppIconChanged(mClock.getPackageName(), Process.myUserHandle());
+ }
if (mCalendar != null) {
for (UserHandle user
: context.getSystemService(UserManager.class).getUserProfiles()) {