diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index e3efc1c..c79d976 100755
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -358,15 +358,6 @@
             <meta-data android:name="android.appwidget.provider"
                     android:resource="@xml/widget_info" />
         </receiver>
-        <receiver android:name="com.android.gallery3d.app.PackagesMonitor">
-            <intent-filter>
-                <action android:name="android.intent.action.PACKAGE_ADDED"/>
-                <action android:name="android.intent.action.PACKAGE_REMOVED"/>
-                <action android:name="android.intent.action.PACKAGE_CHANGED"/>
-                <data android:scheme="package"/>
-            </intent-filter>
-        </receiver>
-        <service android:name="com.android.gallery3d.app.PackagesMonitor$AsyncService"/>
         <service android:name="com.android.gallery3d.gadget.WidgetService"
                 android:permission="android.permission.BIND_REMOTEVIEWS"/>
         <activity android:name="com.android.gallery3d.gadget.WidgetConfigure"
diff --git a/src/com/android/gallery3d/app/PackagesMonitor.java b/src/com/android/gallery3d/app/PackagesMonitor.java
deleted file mode 100755
index 7fc0059..0000000
--- a/src/com/android/gallery3d/app/PackagesMonitor.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (C) 2010 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.
- */
-
-package com.android.gallery3d.app;
-
-import android.app.IntentService;
-import android.app.Notification;
-import android.app.NotificationChannel;
-import android.app.NotificationManager;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.os.Build;
-import android.preference.PreferenceManager;
-
-import com.android.gallery3d.picasasource.PicasaSource;
-import com.android.gallery3d.util.LightCycleHelper;
-
-public class PackagesMonitor extends BroadcastReceiver {
-    public static final String KEY_PACKAGES_VERSION  = "packages-version";
-
-    public synchronized static int getPackagesVersion(Context context) {
-        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
-        return prefs.getInt(KEY_PACKAGES_VERSION, 1);
-    }
-
-    @Override
-    public void onReceive(final Context context, final Intent intent) {
-        intent.setClass(context, AsyncService.class);
-        if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
-            context.startForegroundService(intent);
-        } else {
-            context.startService(intent);
-        }
-    }
-
-    public static class AsyncService extends IntentService {
-        public AsyncService() {
-            super("GalleryPackagesMonitorAsync");
-        }
-
-        @Override
-        public void onCreate() {
-            super.onCreate();
-            if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
-                String channelId = "GalleryPackagesMonitorAsync";
-                NotificationChannel channel = new NotificationChannel(channelId, channelId,
-                        NotificationManager.IMPORTANCE_LOW);
-                NotificationManager manager =
-                        (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
-                manager.createNotificationChannel(channel);
-                startForeground(KEY_PACKAGES_VERSION.hashCode(),
-                        new Notification.Builder(getApplicationContext(), channelId).build());
-            }
-        }
-
-        @Override
-        protected void onHandleIntent(Intent intent) {
-            onReceiveAsync(this, intent);
-        }
-    }
-
-    // Runs in a background thread.
-    private static void onReceiveAsync(Context context, Intent intent) {
-        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
-
-        int version = prefs.getInt(KEY_PACKAGES_VERSION, 1);
-        prefs.edit().putInt(KEY_PACKAGES_VERSION, version + 1).commit();
-
-        String action = intent.getAction();
-        String packageName = intent.getData().getSchemeSpecificPart();
-        if (Intent.ACTION_PACKAGE_ADDED.equals(action)) {
-            PicasaSource.onPackageAdded(context, packageName);
-        } else if (Intent.ACTION_PACKAGE_REMOVED.equals(action)) {
-            PicasaSource.onPackageRemoved(context, packageName);
-        } else if (Intent.ACTION_PACKAGE_CHANGED.equals(action)) {
-            PicasaSource.onPackageChanged(context, packageName);
-        }
-    }
-}
diff --git a/src/com/android/gallery3d/util/GalleryUtils.java b/src/com/android/gallery3d/util/GalleryUtils.java
index c62442d..3507b08 100644
--- a/src/com/android/gallery3d/util/GalleryUtils.java
+++ b/src/com/android/gallery3d/util/GalleryUtils.java
@@ -42,7 +42,6 @@
 
 import org.codeaurora.gallery.R;
 import com.android.gallery3d.app.GalleryActivity;
-import com.android.gallery3d.app.PackagesMonitor;
 import com.android.gallery3d.common.ApiHelper;
 import com.android.gallery3d.data.DataManager;
 import com.android.gallery3d.data.MediaItem;
@@ -75,6 +74,8 @@
     private static final String KEY_CAMERA_UPDATE = "camera-update";
     private static final String KEY_HAS_CAMERA = "has-camera";
 
+    private static final String KEY_PACKAGES_VERSION  = "packages-version";
+
     private static float sPixelDensity = -1f;
     private static boolean sCameraAvailableInitialized = false;
     private static boolean sCameraAvailable;
@@ -204,7 +205,7 @@
     }
 
     public static boolean isEditorAvailable(Context context, String mimeType) {
-        int version = PackagesMonitor.getPackagesVersion(context);
+        int version = getPackagesVersion(context);
 
         String updateKey = PREFIX_PHOTO_EDITOR_UPDATE + mimeType;
         String hasKey = PREFIX_HAS_PHOTO_EDITOR + mimeType;
@@ -223,7 +224,7 @@
     }
 
     public static boolean isAnyCameraAvailable(Context context) {
-        int version = PackagesMonitor.getPackagesVersion(context);
+        int version = getPackagesVersion(context);
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
         if (prefs.getInt(KEY_CAMERA_UPDATE, 0) != version) {
             PackageManager packageManager = context.getPackageManager();
@@ -470,4 +471,9 @@
                 (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
         return telephonyManager.getCallState() != TelephonyManager.CALL_STATE_IDLE;
     }
+
+    public static int getPackagesVersion(Context context) {
+        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
+        return prefs.getInt(KEY_PACKAGES_VERSION, 1);
+    }
 }
diff --git a/src_pd/com/android/gallery3d/picasasource/PicasaSource.java b/src_pd/com/android/gallery3d/picasasource/PicasaSource.java
index 5e800e2..fce670b 100644
--- a/src_pd/com/android/gallery3d/picasasource/PicasaSource.java
+++ b/src_pd/com/android/gallery3d/picasasource/PicasaSource.java
@@ -136,12 +136,6 @@
 
     public static void showSignInReminder(Activity context) {/*do nothing*/}
 
-    public static void onPackageAdded(Context context, String packageName) {/*do nothing*/}
-
-    public static void onPackageRemoved(Context context, String packageName) {/*do nothing*/}
-
-    public static void onPackageChanged(Context context, String packageName) {/*do nothing*/}
-
     public static Dialog getVersionCheckDialog(Activity activity){
         return null;
     }
