Currently isAllowedToLog only checks the state of the ResearchLogger, and does not consider which log the data is going to. This causes problems with the logs for Feedback. The Feedback log should inhibit normal logging procedures, but the system needs to be able to write specific data directly to it. This change renames to isAllowedToLogTo and adds the destination ResearchLog as a parameter. A FeedbackLog is also added as a new class so it can be distinguished from other ResearchLogs. Change-Id: I5a1eea05bb040c26bf816b89179f44b3024fa2ad
32 lines
960 B
Java
32 lines
960 B
Java
/*
|
|
* Copyright (C) 2013 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.inputmethod.research;
|
|
|
|
import android.content.Context;
|
|
|
|
import java.io.File;
|
|
|
|
public class FeedbackLog extends ResearchLog {
|
|
public FeedbackLog(final File outputFile, final Context context) {
|
|
super(outputFile, context);
|
|
}
|
|
|
|
@Override
|
|
public boolean isFeedbackLog() {
|
|
return true;
|
|
}
|
|
}
|