blob: a53238da3ae002e7d9e5b9454c4c99ee68029b95 [file] [log] [blame]
Daniel Sandlercc8befa2013-06-11 14:45:48 -04001/*
2 * Copyright (C) 2013 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package com.android.launcher3;
18
kholoud mohamedd5a4d602022-04-28 15:55:40 +010019import static android.app.admin.DevicePolicyManager.ACTION_DEVICE_POLICY_RESOURCE_UPDATED;
Sunny Goyalb02dafc2023-06-22 11:17:29 -070020import static android.content.Context.RECEIVER_EXPORTED;
kholoud mohamedd5a4d602022-04-28 15:55:40 +010021
fbaron9d08e0f2024-04-24 11:26:01 -070022import static com.android.launcher3.Flags.enableSmartspaceRemovalToggle;
Charlie Andersonbad2be42024-12-06 16:32:03 -050023import static com.android.launcher3.InvariantDeviceProfile.GRID_NAME_PREFS_KEY;
24import static com.android.launcher3.LauncherPrefs.DB_FILE;
25import static com.android.launcher3.LauncherPrefs.GRID_NAME;
Stefan Andoniand1b33b32022-12-16 21:22:27 +000026import static com.android.launcher3.LauncherPrefs.ICON_STATE;
27import static com.android.launcher3.LauncherPrefs.THEMED_ICONS;
Charlie Andersonbad2be42024-12-06 16:32:03 -050028import static com.android.launcher3.model.DeviceGridState.KEY_DB_FILE;
fbaronc0e687b2023-10-04 12:11:20 -070029import static com.android.launcher3.model.LoaderTask.SMARTSPACE_ON_HOME_SCREEN;
Sunny Goyal045b4fa2019-09-20 12:51:37 -070030import static com.android.launcher3.util.Executors.MODEL_EXECUTOR;
Fengjiang Lib87ad6f2024-07-09 10:15:43 -070031import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
Jon Mirandaec1277e2021-03-25 10:41:54 -040032import static com.android.launcher3.util.SettingsCache.NOTIFICATION_BADGING_URI;
Himanshu Gupta739b3c92023-11-06 17:47:29 +000033import static com.android.launcher3.util.SettingsCache.PRIVATE_SPACE_HIDE_WHEN_LOCKED_URI;
Sunny Goyald0e360a2018-06-29 14:40:18 -070034
Tonyd48710c2017-07-27 23:23:58 -070035import android.content.ComponentName;
Sunny Goyale755d462014-07-22 13:48:29 -070036import android.content.Context;
37import android.content.Intent;
Sunny Goyalb02dafc2023-06-22 11:17:29 -070038import android.content.IntentFilter;
Sunny Goyal01c32a62021-05-17 13:23:08 -070039import android.content.SharedPreferences;
40import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
Sunny Goyale7b00122019-10-02 16:13:34 -070041import android.content.pm.LauncherApps;
Jakob Schneider94b5f172024-01-31 19:17:10 +000042import android.content.pm.LauncherApps.ArchiveCompatibilityParams;
Sunny Goyalb47172b2021-05-03 19:59:51 -070043import android.os.UserHandle;
Daniel Sandlerb9eb2862013-06-14 20:17:30 -040044import android.util.Log;
Sunny Goyal71b5c0b2015-01-08 16:59:04 -080045
Tracy Zhoube13d102020-01-12 01:07:59 -080046import androidx.annotation.Nullable;
Anton Vayvodee382242024-05-28 21:26:25 -040047import androidx.core.os.BuildCompat;
Tracy Zhoube13d102020-01-12 01:07:59 -080048
Sunny Goyalb47172b2021-05-03 19:59:51 -070049import com.android.launcher3.graphics.IconShape;
Sunny Goyalf840f102018-09-21 14:41:05 -070050import com.android.launcher3.icons.IconCache;
Sunny Goyal14168432019-10-24 15:59:49 -070051import com.android.launcher3.icons.IconProvider;
Sunny Goyal68af5492021-12-24 01:08:31 +053052import com.android.launcher3.icons.LauncherIconProvider;
Sunny Goyal87dc48b2018-10-12 11:42:33 -070053import com.android.launcher3.icons.LauncherIcons;
Charlie Andersonbad2be42024-12-06 16:32:03 -050054import com.android.launcher3.logging.FileLog;
Sunny Goyal6449a212024-01-12 09:40:43 -080055import com.android.launcher3.model.ModelLauncherCallbacks;
Shamali Pea078cb2024-11-04 21:35:38 +000056import com.android.launcher3.model.WidgetsFilterDataProvider;
Tonyd48710c2017-07-27 23:23:58 -070057import com.android.launcher3.notification.NotificationListener;
Sunny Goyal73b5a272019-12-09 14:55:56 -080058import com.android.launcher3.pm.InstallSessionHelper;
Sunny Goyal045b4fa2019-09-20 12:51:37 -070059import com.android.launcher3.pm.InstallSessionTracker;
Sunny Goyal337c81f2019-12-10 12:19:13 -080060import com.android.launcher3.pm.UserCache;
Stefan Andonian5bd9a222023-02-23 00:58:33 +000061import com.android.launcher3.util.LockedUserState;
Sunny Goyald0e360a2018-06-29 14:40:18 -070062import com.android.launcher3.util.MainThreadInitializedObject;
Winson Chung94e8ad02024-05-08 21:14:57 +000063import com.android.launcher3.util.PackageManagerHelper;
Sunny Goyalfdbef272017-02-01 12:52:54 -080064import com.android.launcher3.util.Preconditions;
Sunny Goyalb47172b2021-05-03 19:59:51 -070065import com.android.launcher3.util.RunnableList;
Sunny Goyal14168432019-10-24 15:59:49 -070066import com.android.launcher3.util.SafeCloseable;
Jon Mirandaec1277e2021-03-25 10:41:54 -040067import com.android.launcher3.util.SettingsCache;
Sunny Goyale7b00122019-10-02 16:13:34 -070068import com.android.launcher3.util.SimpleBroadcastReceiver;
Sunny Goyal01c32a62021-05-17 13:23:08 -070069import com.android.launcher3.util.Themes;
Sunny Goyal31e27ed2024-01-09 15:45:14 -080070import com.android.launcher3.util.TraceHelper;
Pinyao Tingc7a6c292019-08-26 14:36:02 -070071import com.android.launcher3.widget.custom.CustomWidgetManager;
Sunny Goyal71b5c0b2015-01-08 16:59:04 -080072
Fengjiang Lib87ad6f2024-07-09 10:15:43 -070073import java.util.Locale;
74import java.util.Objects;
75
Sunny Goyal777d4902021-08-27 21:22:17 +000076public class LauncherAppState implements SafeCloseable {
Chris Wrenaeff7ea2014-02-14 16:59:24 -050077
Charlie Andersonbad2be42024-12-06 16:32:03 -050078 public static final String TAG = "LauncherAppState";
Sunny Goyal29947f02017-12-18 13:49:44 -080079 public static final String ACTION_FORCE_ROLOAD = "force-reload-launcher";
80
Sunny Goyalfdbef272017-02-01 12:52:54 -080081 // We do not need any synchronization for this variable as its only written on UI thread.
Sunny Goyalcf845f02019-09-25 09:08:16 -070082 public static final MainThreadInitializedObject<LauncherAppState> INSTANCE =
Sunny Goyale529a862019-08-06 09:48:36 -070083 new MainThreadInitializedObject<>(LauncherAppState::new);
Daniel Sandlercc8befa2013-06-11 14:45:48 -040084
Sunny Goyalfdbef272017-02-01 12:52:54 -080085 private final Context mContext;
86 private final LauncherModel mModel;
Sunny Goyal68af5492021-12-24 01:08:31 +053087 private final LauncherIconProvider mIconProvider;
Sunny Goyalfdbef272017-02-01 12:52:54 -080088 private final IconCache mIconCache;
Sunny Goyalfdbef272017-02-01 12:52:54 -080089 private final InvariantDeviceProfile mInvariantDeviceProfile;
Sunny Goyal31e27ed2024-01-09 15:45:14 -080090 private boolean mIsSafeModeEnabled;
91
Sunny Goyalb47172b2021-05-03 19:59:51 -070092 private final RunnableList mOnTerminateCallback = new RunnableList();
Sunny Goyal045b4fa2019-09-20 12:51:37 -070093
Sunny Goyal10fa0162024-04-21 00:13:35 -070094 public static LauncherAppState getInstance(Context context) {
Sunny Goyald0e360a2018-06-29 14:40:18 -070095 return INSTANCE.get(context);
Daniel Sandlercc8befa2013-06-11 14:45:48 -040096 }
97
Daniel Sandlercc8befa2013-06-11 14:45:48 -040098 public Context getContext() {
Sunny Goyalfdbef272017-02-01 12:52:54 -080099 return mContext;
Daniel Sandlercc8befa2013-06-11 14:45:48 -0400100 }
101
Jakob Schneider2f609d02024-01-10 18:03:35 +0000102 @SuppressWarnings("NewApi")
Tracy Zhoube13d102020-01-12 01:07:59 -0800103 public LauncherAppState(Context context) {
104 this(context, LauncherFiles.APP_ICONS_DB);
Sunny Goyaldf4241c2021-05-19 19:42:14 -0700105 Log.v(Launcher.TAG, "LauncherAppState initiated");
106 Preconditions.assertUIThread();
Sunny Goyal27595792015-03-19 13:18:44 -0700107
Sunny Goyal31e27ed2024-01-09 15:45:14 -0800108 mIsSafeModeEnabled = TraceHelper.allowIpcs("isSafeMode",
109 () -> context.getPackageManager().isSafeMode());
Sunny Goyal6e6f7992021-08-24 16:23:29 -0700110 mInvariantDeviceProfile.addOnChangeListener(modelPropertiesChanged -> {
111 if (modelPropertiesChanged) {
112 refreshAndReloadLauncher();
113 }
114 });
Daniel Sandlercc8befa2013-06-11 14:45:48 -0400115
Sunny Goyal6449a212024-01-12 09:40:43 -0800116 ModelLauncherCallbacks callbacks = mModel.newModelCallbacks();
Jakob Schneider2f609d02024-01-10 18:03:35 +0000117 LauncherApps launcherApps = mContext.getSystemService(LauncherApps.class);
118 launcherApps.registerCallback(callbacks);
Sunny Goyale274d972023-05-01 16:55:59 -0700119 mOnTerminateCallback.add(() ->
Sunny Goyal6449a212024-01-12 09:40:43 -0800120 mContext.getSystemService(LauncherApps.class).unregisterCallback(callbacks));
Jakob Schneider328c3222024-02-01 15:39:11 +0000121
Anton Vayvodee382242024-05-28 21:26:25 -0400122 if (BuildCompat.isAtLeastV() && Flags.enableSupportForArchiving()) {
Jakob Schneider94b5f172024-01-31 19:17:10 +0000123 ArchiveCompatibilityParams params = new ArchiveCompatibilityParams();
124 params.setEnableUnarchivalConfirmation(false);
Charlie Anderson6b8e3622024-08-01 15:19:27 -0400125 params.setEnableIconOverlay(!Flags.useNewIconForArchivedApps());
Jakob Schneider94b5f172024-01-31 19:17:10 +0000126 launcherApps.setArchiveCompatibility(params);
Jakob Schneider2f609d02024-01-10 18:03:35 +0000127 }
Sunny Goyalb47172b2021-05-03 19:59:51 -0700128
129 SimpleBroadcastReceiver modelChangeReceiver =
Fengjiang Lib87ad6f2024-07-09 10:15:43 -0700130 new SimpleBroadcastReceiver(UI_HELPER_EXECUTOR, mModel::onBroadcastIntent);
131 final Locale oldLocale = mContext.getResources().getConfiguration().locale;
132 modelChangeReceiver.register(
133 mContext,
134 () -> {
135 // if local has changed before receiver is registered on bg thread,
136 // mModel needs to reload.
137 Locale newLocale = mContext.getResources().getConfiguration().locale;
138 if (!Objects.equals(oldLocale, newLocale)) {
139 mModel.forceReload();
140 }
141 },
142 Intent.ACTION_LOCALE_CHANGED,
kholoud mohamedd5a4d602022-04-28 15:55:40 +0100143 ACTION_DEVICE_POLICY_RESOURCE_UPDATED);
Sunny Goyalb02dafc2023-06-22 11:17:29 -0700144 if (BuildConfig.IS_STUDIO_BUILD) {
145 mContext.registerReceiver(modelChangeReceiver, new IntentFilter(ACTION_FORCE_ROLOAD),
146 RECEIVER_EXPORTED);
Sunny Goyal29947f02017-12-18 13:49:44 -0800147 }
Fengjiang Lib87ad6f2024-07-09 10:15:43 -0700148 mOnTerminateCallback.add(() -> modelChangeReceiver.unregisterReceiverSafely(mContext));
Sunny Goyal14168432019-10-24 15:59:49 -0700149
Sunny Goyalb47172b2021-05-03 19:59:51 -0700150 SafeCloseable userChangeListener = UserCache.INSTANCE.get(mContext)
Sunny Goyalc80e60d2023-06-07 12:52:30 -0700151 .addUserEventListener(mModel::onUserEvent);
Sunny Goyalb47172b2021-05-03 19:59:51 -0700152 mOnTerminateCallback.add(userChangeListener::close);
Sunny Goyal337c81f2019-12-10 12:19:13 -0800153
fbaron9d08e0f2024-04-24 11:26:01 -0700154 if (enableSmartspaceRemovalToggle()) {
fbaronc0e687b2023-10-04 12:11:20 -0700155 OnSharedPreferenceChangeListener firstPagePinnedItemListener =
156 new OnSharedPreferenceChangeListener() {
157 @Override
158 public void onSharedPreferenceChanged(
159 SharedPreferences sharedPreferences, String key) {
160 if (SMARTSPACE_ON_HOME_SCREEN.equals(key)) {
161 mModel.forceReload();
162 }
163 }
164 };
165 LauncherPrefs.getPrefs(mContext).registerOnSharedPreferenceChangeListener(
166 firstPagePinnedItemListener);
167 mOnTerminateCallback.add(() -> LauncherPrefs.getPrefs(mContext)
168 .unregisterOnSharedPreferenceChangeListener(firstPagePinnedItemListener));
169 }
170
Stefan Andonian5bd9a222023-02-23 00:58:33 +0000171 LockedUserState.get(context).runOnUserUnlocked(() -> {
Sunny Goyale274d972023-05-01 16:55:59 -0700172 CustomWidgetManager cwm = CustomWidgetManager.INSTANCE.get(mContext);
Sunny Goyal6bbd8052024-10-24 12:38:33 -0700173 mOnTerminateCallback.add(cwm.addWidgetRefreshCallback(mModel::rebindCallbacks)::close);
Tony Wickham827cef22016-03-17 15:39:39 -0700174
Stefan Andonian5bd9a222023-02-23 00:58:33 +0000175 IconObserver observer = new IconObserver();
176 SafeCloseable iconChangeTracker = mIconProvider.registerIconChangeListener(
177 observer, MODEL_EXECUTOR.getHandler());
178 mOnTerminateCallback.add(iconChangeTracker::close);
179 MODEL_EXECUTOR.execute(observer::verifyIconChanged);
180 LauncherPrefs.get(context).addListener(observer, THEMED_ICONS);
181 mOnTerminateCallback.add(
182 () -> LauncherPrefs.get(mContext).removeListener(observer, THEMED_ICONS));
183
184 InstallSessionTracker installSessionTracker =
Sunny Goyalc3632952024-10-09 15:15:42 -0700185 InstallSessionHelper.INSTANCE.get(context).registerInstallTracker(callbacks);
Stefan Andonian5bd9a222023-02-23 00:58:33 +0000186 mOnTerminateCallback.add(installSessionTracker::unregister);
187 });
Sunny Goyal045b4fa2019-09-20 12:51:37 -0700188
Sunny Goyaleaf7a952020-07-29 16:54:20 -0700189 // Register an observer to rebind the notification listener when dots are re-enabled.
Sunny Goyalb47172b2021-05-03 19:59:51 -0700190 SettingsCache settingsCache = SettingsCache.INSTANCE.get(mContext);
191 SettingsCache.OnChangeListener notificationLister = this::onNotificationSettingsChanged;
192 settingsCache.register(NOTIFICATION_BADGING_URI, notificationLister);
193 onNotificationSettingsChanged(settingsCache.getValue(NOTIFICATION_BADGING_URI));
194 mOnTerminateCallback.add(() ->
195 settingsCache.unregister(NOTIFICATION_BADGING_URI, notificationLister));
Himanshu Gupta739b3c92023-11-06 17:47:29 +0000196 // Register an observer to notify Launcher about Private Space settings toggle.
Pechetty Sravani (xWF)41743bd2024-11-14 06:11:08 +0000197 registerPrivateSpaceHideWhenLockListener(settingsCache);
Sunny Goyal420d5452018-10-17 10:25:14 -0700198 }
199
Tracy Zhoube13d102020-01-12 01:07:59 -0800200 public LauncherAppState(Context context, @Nullable String iconCacheFileName) {
Tracy Zhoube13d102020-01-12 01:07:59 -0800201 mContext = context;
202
203 mInvariantDeviceProfile = InvariantDeviceProfile.INSTANCE.get(context);
Sunny Goyal68af5492021-12-24 01:08:31 +0530204 mIconProvider = new LauncherIconProvider(context);
Sunny Goyalb47172b2021-05-03 19:59:51 -0700205 mIconCache = new IconCache(mContext, mInvariantDeviceProfile,
206 iconCacheFileName, mIconProvider);
Shamali Pea078cb2024-11-04 21:35:38 +0000207 mModel = new LauncherModel(context, this, mIconCache,
208 WidgetsFilterDataProvider.Companion.newInstance(context), new AppFilter(mContext),
Winson Chung94e8ad02024-05-08 21:14:57 +0000209 PackageManagerHelper.INSTANCE.get(context), iconCacheFileName != null);
Sunny Goyaldf4241c2021-05-19 19:42:14 -0700210 mOnTerminateCallback.add(mIconCache::close);
Sunny Goyale274d972023-05-01 16:55:59 -0700211 mOnTerminateCallback.add(mModel::destroy);
Tracy Zhoube13d102020-01-12 01:07:59 -0800212 }
213
Sunny Goyalb47172b2021-05-03 19:59:51 -0700214 private void onNotificationSettingsChanged(boolean areNotificationDotsEnabled) {
Tony Wickhamf34bee82018-12-03 18:11:39 -0800215 if (areNotificationDotsEnabled) {
Sunny Goyal420d5452018-10-17 10:25:14 -0700216 NotificationListener.requestRebind(new ComponentName(
217 mContext, NotificationListener.class));
Tonyd48710c2017-07-27 23:23:58 -0700218 }
Daniel Sandlercc8befa2013-06-11 14:45:48 -0400219 }
Kenny Guy1317e2d2014-05-08 18:52:50 +0100220
Himanshu Gupta739b3c92023-11-06 17:47:29 +0000221 private void registerPrivateSpaceHideWhenLockListener(SettingsCache settingsCache) {
222 SettingsCache.OnChangeListener psHideWhenLockChangedListener =
223 this::onPrivateSpaceHideWhenLockChanged;
224 settingsCache.register(PRIVATE_SPACE_HIDE_WHEN_LOCKED_URI, psHideWhenLockChangedListener);
225 mOnTerminateCallback.add(() -> settingsCache.unregister(PRIVATE_SPACE_HIDE_WHEN_LOCKED_URI,
226 psHideWhenLockChangedListener));
227 }
228
229 private void onPrivateSpaceHideWhenLockChanged(boolean isPrivateSpaceHideOnLockEnabled) {
230 mModel.forceReload();
231 }
232
Sunny Goyalb47172b2021-05-03 19:59:51 -0700233 private void refreshAndReloadLauncher() {
Sunny Goyalbf3efe82024-05-07 10:19:57 -0700234 LauncherIcons.clearPool(mContext);
Sunny Goyalb47172b2021-05-03 19:59:51 -0700235 mIconCache.updateIconParams(
236 mInvariantDeviceProfile.fillResIconDpi, mInvariantDeviceProfile.iconBitmapSize);
Sunny Goyal87dc48b2018-10-12 11:42:33 -0700237 mModel.forceReload();
238 }
239
Daniel Sandlercc8befa2013-06-11 14:45:48 -0400240 /**
241 * Call from Application.onTerminate(), which is not guaranteed to ever be called.
242 */
Sunny Goyal777d4902021-08-27 21:22:17 +0000243 @Override
244 public void close() {
Sunny Goyalb47172b2021-05-03 19:59:51 -0700245 mOnTerminateCallback.executeAllAndDestroy();
246 }
Sunny Goyal01615a62019-09-20 12:00:07 -0700247
Sunny Goyalb47172b2021-05-03 19:59:51 -0700248 public IconProvider getIconProvider() {
249 return mIconProvider;
Daniel Sandlercc8befa2013-06-11 14:45:48 -0400250 }
251
Sunny Goyal34942622014-08-29 17:20:55 -0700252 public IconCache getIconCache() {
Daniel Sandlercc8befa2013-06-11 14:45:48 -0400253 return mIconCache;
254 }
255
Sunny Goyal18bf8e22015-04-08 18:13:46 -0700256 public LauncherModel getModel() {
Daniel Sandlercc8befa2013-06-11 14:45:48 -0400257 return mModel;
258 }
259
Adam Cohen2e6da152015-05-06 11:42:25 -0700260 public InvariantDeviceProfile getInvariantDeviceProfile() {
261 return mInvariantDeviceProfile;
262 }
Sunny Goyal87f784c2017-01-11 10:48:34 -0800263
Sunny Goyal31e27ed2024-01-09 15:45:14 -0800264 public boolean isSafeModeEnabled() {
265 return mIsSafeModeEnabled;
266 }
267
Sunny Goyal87f784c2017-01-11 10:48:34 -0800268 /**
269 * Shorthand for {@link #getInvariantDeviceProfile()}
270 */
271 public static InvariantDeviceProfile getIDP(Context context) {
Sunny Goyald0e360a2018-06-29 14:40:18 -0700272 return InvariantDeviceProfile.INSTANCE.get(context);
Sunny Goyal87f784c2017-01-11 10:48:34 -0800273 }
Sunny Goyalb47172b2021-05-03 19:59:51 -0700274
Sunny Goyal01c32a62021-05-17 13:23:08 -0700275 private class IconObserver
Brian Isganitis9cbc4782024-10-08 14:47:17 -0400276 implements IconProvider.IconChangeListener, LauncherPrefChangeListener {
Sunny Goyalb47172b2021-05-03 19:59:51 -0700277
278 @Override
279 public void onAppIconChanged(String packageName, UserHandle user) {
280 mModel.onAppIconChanged(packageName, user);
281 }
282
283 @Override
284 public void onSystemIconStateChanged(String iconState) {
Sunny Goyal638a6872024-04-25 15:55:11 -0700285 IconShape.INSTANCE.get(mContext).pickBestShape(mContext);
Sunny Goyalb47172b2021-05-03 19:59:51 -0700286 refreshAndReloadLauncher();
Stefan Andoniand1b33b32022-12-16 21:22:27 +0000287 LauncherPrefs.get(mContext).put(ICON_STATE, iconState);
Sunny Goyalb47172b2021-05-03 19:59:51 -0700288 }
289
290 void verifyIconChanged() {
291 String iconState = mIconProvider.getSystemIconState();
Stefan Andoniand1b33b32022-12-16 21:22:27 +0000292 if (!iconState.equals(LauncherPrefs.get(mContext).get(ICON_STATE))) {
Sunny Goyalb47172b2021-05-03 19:59:51 -0700293 onSystemIconStateChanged(iconState);
294 }
295 }
Sunny Goyal01c32a62021-05-17 13:23:08 -0700296
297 @Override
Brian Isganitis9cbc4782024-10-08 14:47:17 -0400298 public void onPrefChanged(String key) {
Sunny Goyal01c32a62021-05-17 13:23:08 -0700299 if (Themes.KEY_THEMED_ICONS.equals(key)) {
300 mIconProvider.setIconThemeSupported(Themes.isThemedIconEnabled(mContext));
301 verifyIconChanged();
Charlie Andersonbad2be42024-12-06 16:32:03 -0500302 } else if (GRID_NAME_PREFS_KEY.equals(key)) {
303 FileLog.d(TAG, "onPrefChanged GRID_NAME changed: "
304 + LauncherPrefs.get(mContext).get(GRID_NAME));
305 } else if (KEY_DB_FILE.equals(key)) {
306 FileLog.d(TAG, "onPrefChanged DB_FILE changed: "
307 + LauncherPrefs.get(mContext).get(DB_FILE));
Sunny Goyal01c32a62021-05-17 13:23:08 -0700308 }
309 }
Sunny Goyalb47172b2021-05-03 19:59:51 -0700310 }
Daniel Sandlercc8befa2013-06-11 14:45:48 -0400311}