OSDN Git Service

PdfEditor: define LOG_TAG
authorMark Salyzyn <salyzyn@google.com>
Fri, 7 Oct 2016 19:13:43 +0000 (12:13 -0700)
committerMark Salyzyn <salyzyn@google.com>
Fri, 21 Oct 2016 20:27:35 +0000 (13:27 -0700)
general cleanup of logging

Test: compile
Bug: 31992412
Change-Id: Ie2ec5a223bbb92e902bf6914100281b6d84500e3

core/jni/android/graphics/pdf/PdfEditor.cpp

index d2d39cd..9deb125 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#define LOG_TAG "PdfEditor"
+
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <vector>
+
+#include <android/log.h>
+#include <utils/Log.h>
 
 #include "jni.h"
 #include "JNIHelp.h"
 #include "SkMatrix.h"
 
 #include <core_jni_helpers.h>
-#include <vector>
-#include <utils/Log.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <unistd.h>
 
 namespace android {
 
@@ -142,8 +146,7 @@ static bool writeAllBytes(const int fd, const void* buffer, const size_t byteCou
             if (errno == EINTR) {
                 continue;
             }
-            __android_log_print(ANDROID_LOG_ERROR, LOG_TAG,
-                    "Error writing to buffer: %d", errno);
+            ALOGE("Error writing to buffer: %d", errno);
             return false;
         }
         remainingBytes -= writtenByteCount;