diff --git a/src/com/android/launcher3/compat/AppWidgetManagerCompatVL.java b/src/com/android/launcher3/compat/AppWidgetManagerCompatVL.java
index 535c74b..30af38e 100644
--- a/src/com/android/launcher3/compat/AppWidgetManagerCompatVL.java
+++ b/src/com/android/launcher3/compat/AppWidgetManagerCompatVL.java
@@ -121,12 +121,15 @@
         } else {
             badgeLocation.offset(bitmap.getWidth() - badgeSize - badgeMargin, top);
         }
-
-        UserManager userManager = (UserManager) mContext.getSystemService(
-                Context.USER_SERVICE);
-
-        Drawable drawable = userManager.getBadgedDrawableForUser(new BitmapDrawable(res, bitmap),
-                info.getProfile(), badgeLocation, 0);
+        Drawable drawable = null;
+        // STOPSHIP(mokani): Remove catch block once dogfood build is bigger than LRW70.
+        // This hack is just to prevent crash in older builds.
+        try {
+            drawable = mPm.getUserBadgedDrawableForDensity(new BitmapDrawable(res, bitmap),
+                    info.getProfile(), badgeLocation, 0);
+        } catch (Exception e) {
+            return bitmap;
+        }
 
         if (drawable instanceof BitmapDrawable) {
             return ((BitmapDrawable) drawable).getBitmap();
diff --git a/src/com/android/launcher3/compat/PackageInstallerCompatVL.java b/src/com/android/launcher3/compat/PackageInstallerCompatVL.java
index 5d016a8..0a84280 100644
--- a/src/com/android/launcher3/compat/PackageInstallerCompatVL.java
+++ b/src/com/android/launcher3/compat/PackageInstallerCompatVL.java
@@ -47,7 +47,7 @@
         mResumed = false;
         mBound = false;
 
-        mInstaller.addSessionCallback(mCallback);
+        mInstaller.registerSessionCallback(mCallback);
         // On start, send updates for all active sessions
         for (SessionInfo info : mInstaller.getAllSessions()) {
             mPendingReplays.append(info.getSessionId(), info);
@@ -72,7 +72,7 @@
 
     @Override
     public void onStop() {
-        mInstaller.removeSessionCallback(mCallback);
+        mInstaller.unregisterSessionCallback(mCallback);
     }
 
     @Override
@@ -168,10 +168,9 @@
         }
 
         @Override
-        public void onOpened(int sessionId) { }
+        public void onActiveChanged(int sessionId, boolean active) { }
 
         @Override
-        public void onClosed(int sessionId) { }
-
+        public void onBadgingChanged(int sessionId) { }
     };
 }
diff --git a/src/com/android/launcher3/compat/UserManagerCompatVL.java b/src/com/android/launcher3/compat/UserManagerCompatVL.java
index ad6f78e..e54db61 100644
--- a/src/com/android/launcher3/compat/UserManagerCompatVL.java
+++ b/src/com/android/launcher3/compat/UserManagerCompatVL.java
@@ -18,6 +18,7 @@
 package com.android.launcher3.compat;
 
 import android.content.Context;
+import android.content.pm.PackageManager;
 import android.graphics.drawable.Drawable;
 import android.os.UserHandle;
 import android.os.UserManager;
@@ -27,9 +28,11 @@
 import java.util.List;
 
 public class UserManagerCompatVL extends UserManagerCompatV17 {
+    private final PackageManager mPm;
 
     UserManagerCompatVL(Context context) {
         super(context);
+        mPm = context.getPackageManager();
     }
 
     @Override
@@ -48,7 +51,13 @@
 
     @Override
     public Drawable getBadgedDrawableForUser(Drawable unbadged, UserHandleCompat user) {
-        return mUserManager.getBadgedIconForUser(unbadged, user.getUser());
+        // STOPSHIP(mokani): Remove catch block once dogfood build is bigger than LRW70.
+        // This hack is just to prevent crash in older builds.
+        try {
+            return mPm.getUserBadgedIcon(unbadged, user.getUser());
+        } catch (Exception e) {
+            return unbadged;
+        }
     }
 
     @Override
@@ -56,7 +65,13 @@
         if (user == null) {
             return label;
         }
-        return mUserManager.getBadgedLabelForUser(label, user.getUser());
+        // STOPSHIP(mokani): Remove catch block once dogfood build is bigger than LRW70.
+        // This hack is just to prevent crash in older builds.
+        try {
+        return mPm.getUserBadgedLabel(label, user.getUser());
+        } catch (Exception e) {
+            return label;
+        }
     }
 }
 
