Remove all the extra accessor methods added by javac in support-palette.

Change private methods to be package protected to avoid extra methods
that get added to be able to access them from inner classes.

This CL saves 14 methods in our jar.

Bug: 31075707
Change-Id: I864ccd382e5a86fdd29d8d1ff9c89cd9654630d4
diff --git a/v7/palette/src/main/java/android/support/v7/graphics/ColorCutQuantizer.java b/v7/palette/src/main/java/android/support/v7/graphics/ColorCutQuantizer.java
index 1516261..9c7747c 100644
--- a/v7/palette/src/main/java/android/support/v7/graphics/ColorCutQuantizer.java
+++ b/v7/palette/src/main/java/android/support/v7/graphics/ColorCutQuantizer.java
@@ -46,9 +46,9 @@
     private static final String LOG_TAG = "ColorCutQuantizer";
     private static final boolean LOG_TIMINGS = false;
 
-    private static final int COMPONENT_RED = -3;
-    private static final int COMPONENT_GREEN = -2;
-    private static final int COMPONENT_BLUE = -1;
+    static final int COMPONENT_RED = -3;
+    static final int COMPONENT_GREEN = -2;
+    static final int COMPONENT_BLUE = -1;
 
     private static final int QUANTIZE_WORD_WIDTH = 5;
     private static final int QUANTIZE_WORD_MASK = (1 << QUANTIZE_WORD_WIDTH) - 1;
@@ -398,7 +398,7 @@
      *
      * @see Vbox#findSplitPoint()
      */
-    private static void modifySignificantOctet(final int[] a, final int dimension,
+    static void modifySignificantOctet(final int[] a, final int dimension,
             final int lower, final int upper) {
         switch (dimension) {
             case COMPONENT_RED:
@@ -469,7 +469,7 @@
     /**
      * Quantized RGB888 values to have a word width of {@value #QUANTIZE_WORD_WIDTH}.
      */
-    private static int approximateToRgb888(int r, int g, int b) {
+    static int approximateToRgb888(int r, int g, int b) {
         return Color.rgb(modifyWordWidth(r, QUANTIZE_WORD_WIDTH, 8),
                 modifyWordWidth(g, QUANTIZE_WORD_WIDTH, 8),
                 modifyWordWidth(b, QUANTIZE_WORD_WIDTH, 8));
@@ -482,21 +482,21 @@
     /**
      * @return red component of the quantized color
      */
-    private static int quantizedRed(int color) {
+    static int quantizedRed(int color) {
         return (color >> (QUANTIZE_WORD_WIDTH + QUANTIZE_WORD_WIDTH)) & QUANTIZE_WORD_MASK;
     }
 
     /**
      * @return green component of a quantized color
      */
-    private static int quantizedGreen(int color) {
+    static int quantizedGreen(int color) {
         return (color >> QUANTIZE_WORD_WIDTH) & QUANTIZE_WORD_MASK;
     }
 
     /**
      * @return blue component of a quantized color
      */
-    private static int quantizedBlue(int color) {
+    static int quantizedBlue(int color) {
         return color & QUANTIZE_WORD_MASK;
     }
 
diff --git a/v7/palette/src/main/java/android/support/v7/graphics/Palette.java b/v7/palette/src/main/java/android/support/v7/graphics/Palette.java
index 6d0368d..93570de 100644
--- a/v7/palette/src/main/java/android/support/v7/graphics/Palette.java
+++ b/v7/palette/src/main/java/android/support/v7/graphics/Palette.java
@@ -84,14 +84,14 @@
         void onGenerated(Palette palette);
     }
 
-    private static final int DEFAULT_RESIZE_BITMAP_AREA = 160 * 160;
-    private static final int DEFAULT_CALCULATE_NUMBER_COLORS = 16;
+    static final int DEFAULT_RESIZE_BITMAP_AREA = 160 * 160;
+    static final int DEFAULT_CALCULATE_NUMBER_COLORS = 16;
 
-    private static final float MIN_CONTRAST_TITLE_TEXT = 3.0f;
-    private static final float MIN_CONTRAST_BODY_TEXT = 4.5f;
+    static final float MIN_CONTRAST_TITLE_TEXT = 3.0f;
+    static final float MIN_CONTRAST_BODY_TEXT = 4.5f;
 
-    private static final String LOG_TAG = "Palette";
-    private static final boolean LOG_TIMINGS = false;
+    static final String LOG_TAG = "Palette";
+    static final boolean LOG_TIMINGS = false;
 
     /**
      * Start generating a {@link Palette} with the returned {@link Builder} instance.
@@ -151,7 +151,7 @@
 
     private final Swatch mDominantSwatch;
 
-    private Palette(List<Swatch> swatches, List<Target> targets) {
+    Palette(List<Swatch> swatches, List<Target> targets) {
         mSwatches = swatches;
         mTargets = targets;
 
@@ -345,7 +345,7 @@
         return mDominantSwatch != null ? mDominantSwatch.getRgb() : defaultColor;
     }
 
-    private void generate() {
+    void generate() {
         // We need to make sure that the scored targets are generated first. This is so that
         // inherited targets have something to inherit from
         for (int i = 0, count = mTargets.size(); i < count; i++) {
@@ -951,7 +951,7 @@
     /**
      * The default filter.
      */
-    private static final Filter DEFAULT_FILTER = new Filter() {
+    static final Filter DEFAULT_FILTER = new Filter() {
         private static final float BLACK_MAX_LIGHTNESS = 0.05f;
         private static final float WHITE_MIN_LIGHTNESS = 0.95f;
 
diff --git a/v7/palette/src/main/java/android/support/v7/graphics/Target.java b/v7/palette/src/main/java/android/support/v7/graphics/Target.java
index d1e0742..640970b 100644
--- a/v7/palette/src/main/java/android/support/v7/graphics/Target.java
+++ b/v7/palette/src/main/java/android/support/v7/graphics/Target.java
@@ -47,13 +47,13 @@
     private static final float WEIGHT_LUMA = 0.52f;
     private static final float WEIGHT_POPULATION = 0.24f;
 
-    private static final int INDEX_MIN = 0;
-    private static final int INDEX_TARGET = 1;
-    private static final int INDEX_MAX = 2;
+    static final int INDEX_MIN = 0;
+    static final int INDEX_TARGET = 1;
+    static final int INDEX_MAX = 2;
 
-    private static final int INDEX_WEIGHT_SAT = 0;
-    private static final int INDEX_WEIGHT_LUMA = 1;
-    private static final int INDEX_WEIGHT_POP = 2;
+    static final int INDEX_WEIGHT_SAT = 0;
+    static final int INDEX_WEIGHT_LUMA = 1;
+    static final int INDEX_WEIGHT_POP = 2;
 
     /**
      * A target which has the characteristics of a vibrant color which is light in luminance.
@@ -111,18 +111,18 @@
         setDefaultMutedSaturationValues(DARK_MUTED);
     }
 
-    private final float[] mSaturationTargets = new float[3];
-    private final float[] mLightnessTargets = new float[3];
-    private final float[] mWeights = new float[3];
-    private boolean mIsExclusive = true; // default to true
+    final float[] mSaturationTargets = new float[3];
+    final float[] mLightnessTargets = new float[3];
+    final float[] mWeights = new float[3];
+    boolean mIsExclusive = true; // default to true
 
-    private Target() {
+    Target() {
         setTargetDefaultValues(mSaturationTargets);
         setTargetDefaultValues(mLightnessTargets);
         setDefaultWeights();
     }
 
-    private Target(Target from) {
+    Target(Target from) {
         System.arraycopy(from.mSaturationTargets, 0, mSaturationTargets, 0,
                 mSaturationTargets.length);
         System.arraycopy(from.mLightnessTargets, 0, mLightnessTargets, 0,