Fixed the inbox line padding with an image

If an image was present, the first line of the
Inbox style could run into the image. This Is fixed
now.

Change-Id: I60ee22166a2dc1d2de2f1fe311effc419a95748d
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 375404a..f49c77d 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -4066,11 +4066,24 @@
                 }
                 i++;
             }
-
             mBuilder.addProfileBadge(contentView, R.id.profile_badge_large_template);
 
+            handleInboxImageMargin(contentView, rowIds[0]);
+
             return contentView;
         }
+
+        private void handleInboxImageMargin(RemoteViews contentView, int id) {
+            final int max = mBuilder.mN.extras.getInt(EXTRA_PROGRESS_MAX, 0);
+            final boolean ind = mBuilder.mN.extras.getBoolean(EXTRA_PROGRESS_INDETERMINATE);
+            boolean hasProgress = max != 0 || ind;
+            int endMargin = 0;
+            if (mTexts.size() > 0 && mBuilder.mN.mLargeIcon != null && !hasProgress) {
+                endMargin = mBuilder.mContext.getResources().getDimensionPixelSize(
+                        R.dimen.notification_content_picture_margin);
+            }
+            contentView.setViewLayoutMarginEnd(id, endMargin);
+        }
     }
 
     /**