Revert "Replaced android::Vector with std::vector."

b/19148482

This reverts commit 93d6bc872b7d9fba63abfa7513d56b38d9c3d371.

I also made some changes to Make it work with HEAD.

Change-Id: I5e516976ec1d85ffe1cf388c01795348a9441982
diff --git a/rsAllocation.cpp b/rsAllocation.cpp
index 5712a17..386d86f 100644
--- a/rsAllocation.cpp
+++ b/rsAllocation.cpp
@@ -291,40 +291,34 @@
     }
 
     if (y >= mHal.drvState.lod[0].dimY) {
-        rsc->setError(RS_ERROR_BAD_VALUE,
-                      "subElementData X offset out of range.");
+        rsc->setError(RS_ERROR_BAD_VALUE, "subElementData X offset out of range.");
         return;
     }
 
     if (cIdx >= mHal.state.type->getElement()->getFieldCount()) {
-        rsc->setError(RS_ERROR_BAD_VALUE,
-                      "subElementData component out of range.");
+        rsc->setError(RS_ERROR_BAD_VALUE, "subElementData component out of range.");
         return;
     }
 
     const Element * e = mHal.state.type->getElement()->getField(cIdx);
-    uint32_t elemArraySize =
-        mHal.state.type->getElement()->getFieldArraySize(cIdx);
+    uint32_t elemArraySize = mHal.state.type->getElement()->getFieldArraySize(cIdx);
     if (sizeBytes != e->getSizeBytes() * elemArraySize) {
         rsc->setError(RS_ERROR_BAD_VALUE, "subElementData bad size.");
         return;
     }
 
-    rsc->mHal.funcs.allocation.elementData2D(rsc, this, x, y, data, cIdx,
-                                             sizeBytes);
+    rsc->mHal.funcs.allocation.elementData2D(rsc, this, x, y, data, cIdx, sizeBytes);
     sendDirty(rsc);
 }
 
 void Allocation::addProgramToDirty(const Program *p) {
-    mToDirtyList.push_back(p);
+    mToDirtyList.push(p);
 }
 
 void Allocation::removeProgramToDirty(const Program *p) {
-    for (auto entryIter = mToDirtyList.begin(), endIter = mToDirtyList.end();
-         entryIter != endIter; entryIter++) {
-
-        if (p == *entryIter) {
-            mToDirtyList.erase(entryIter);
+    for (size_t ct=0; ct < mToDirtyList.size(); ct++) {
+        if (mToDirtyList[ct] == p) {
+            mToDirtyList.removeAt(ct);
             return;
         }
     }
@@ -342,8 +336,7 @@
         }
     }
     ALOGV("%s allocation ptr=%p  mUsageFlags=0x04%x, mMipmapControl=0x%04x",
-          prefix, mHal.drvState.lod[0].mallocPtr, mHal.state.usageFlags,
-          mHal.state.mipmapControl);
+         prefix, mHal.drvState.lod[0].mallocPtr, mHal.state.usageFlags, mHal.state.mipmapControl);
 }
 
 uint32_t Allocation::getPackedSize() const {