diff options
author | Michael Jurka <mikejurka@google.com> | 2013-12-11 15:41:28 +0100 |
---|---|---|
committer | Michael Jurka <mikejurka@google.com> | 2013-12-11 15:41:28 +0100 |
commit | 96749c13218aa1b783709dc82a4e16657ce9753f (patch) | |
tree | 328761f12d078f62ac8d7b296bbf6f39f5657da2 /src/com/android/gallery3d/util/IntArray.java | |
parent | 1f60653abcc349127014e4f32232261dfc28b309 (diff) | |
download | android_packages_apps_Trebuchet-96749c13218aa1b783709dc82a4e16657ce9753f.tar.gz android_packages_apps_Trebuchet-96749c13218aa1b783709dc82a4e16657ce9753f.tar.bz2 android_packages_apps_Trebuchet-96749c13218aa1b783709dc82a4e16657ce9753f.zip |
Revert "Revert "Move wallpaper picker code to a separate directory""
This reverts commit 39de459a8621abfc91382ce7b4cdd37d09aaac12.
Diffstat (limited to 'src/com/android/gallery3d/util/IntArray.java')
-rw-r--r-- | src/com/android/gallery3d/util/IntArray.java | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/src/com/android/gallery3d/util/IntArray.java b/src/com/android/gallery3d/util/IntArray.java deleted file mode 100644 index 2c4dc2c83..000000000 --- a/src/com/android/gallery3d/util/IntArray.java +++ /dev/null @@ -1,60 +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.util; - -public class IntArray { - private static final int INIT_CAPACITY = 8; - - private int mData[] = new int[INIT_CAPACITY]; - private int mSize = 0; - - public void add(int value) { - if (mData.length == mSize) { - int temp[] = new int[mSize + mSize]; - System.arraycopy(mData, 0, temp, 0, mSize); - mData = temp; - } - mData[mSize++] = value; - } - - public int removeLast() { - mSize--; - return mData[mSize]; - } - - public int size() { - return mSize; - } - - // For testing only - public int[] toArray(int[] result) { - if (result == null || result.length < mSize) { - result = new int[mSize]; - } - System.arraycopy(mData, 0, result, 0, mSize); - return result; - } - - public int[] getInternalArray() { - return mData; - } - - public void clear() { - mSize = 0; - if (mData.length != INIT_CAPACITY) mData = new int[INIT_CAPACITY]; - } -} |