Use the same logging tag scheme everywhere
We were using different methods and violating the correctness error "Log tags are only allowed to be at most 23 tag characters long." as reported by lint. Changes: * Always start tags by "fdroid." (even though it's a bit redundant) * Replace "org.fdroid.fdroid." by "fdroid." * Don't include "compat.", "data." "views.fragments." et al (these didn't and shouldn't be namespaces really, only for file/code organisation) * Do include parent classes for subclasses, e.g. "fdroid.RepoProvider.Helper" since these can conflict
This commit is contained in:
parent
97b93aaa2b
commit
85d7752d0a
@ -106,7 +106,7 @@ interface AppInstallListener {
|
||||
|
||||
public class AppDetails extends ActionBarActivity implements ProgressListener, AppDetailsData, AppInstallListener {
|
||||
|
||||
private static final String TAG = "org.fdroid.fdroid.AppDetails";
|
||||
private static final String TAG = "fdroid.AppDetails";
|
||||
|
||||
public static final int REQUEST_ENABLE_BLUETOOTH = 2;
|
||||
|
||||
|
@ -74,7 +74,7 @@ public class FDroidApp extends Application {
|
||||
private static Messenger localRepoServiceMessenger = null;
|
||||
private static boolean localRepoServiceIsBound = false;
|
||||
|
||||
private static final String TAG = "org.fdroid.fdroid.FDroidApp";
|
||||
private static final String TAG = "fdroid.FDroidApp";
|
||||
|
||||
BluetoothAdapter bluetoothAdapter = null;
|
||||
|
||||
|
@ -19,7 +19,7 @@ import com.google.zxing.encode.QRCodeEncoder;
|
||||
// zxing is android-8 and above
|
||||
@TargetApi(8)
|
||||
public class QrGenAsyncTask extends AsyncTask<String, Void, Void> {
|
||||
private static final String TAG = "QrGenAsyncTask";
|
||||
private static final String TAG = "fdroid.QrGenAsyncTask";
|
||||
|
||||
private Activity activity;
|
||||
private int viewId;
|
||||
|
@ -73,7 +73,7 @@ public final class Utils {
|
||||
public static final SimpleDateFormat LOG_DATE_FORMAT =
|
||||
new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ENGLISH);
|
||||
|
||||
private static final String TAG = "org.fdroid.fdroid.Utils";
|
||||
private static final String TAG = "fdroid.Utils";
|
||||
|
||||
public static String getIconsDir(Context context) {
|
||||
DisplayMetrics metrics = context.getResources().getDisplayMetrics();
|
||||
|
@ -13,7 +13,7 @@ import java.lang.reflect.Method;
|
||||
|
||||
public class FileCompat {
|
||||
|
||||
private static final String TAG = "org.fdroid.fdroid.compat.FileCompat";
|
||||
private static final String TAG = "fdroid.FileCompat";
|
||||
|
||||
public static boolean symlink(SanitizedFile source, SanitizedFile dest) {
|
||||
|
||||
|
@ -15,7 +15,7 @@ import java.util.List;
|
||||
|
||||
public class DBHelper extends SQLiteOpenHelper {
|
||||
|
||||
private static final String TAG = "org.fdroid.fdroid.data.DBHelper";
|
||||
private static final String TAG = "fdroid.DBHelper";
|
||||
|
||||
public static final String DATABASE_NAME = "fdroid";
|
||||
|
||||
|
@ -22,7 +22,7 @@ import java.util.Map;
|
||||
*/
|
||||
public class InstalledAppCacheUpdater {
|
||||
|
||||
private static final String TAG = "org.fdroid.fdroid.data.InstalledAppCacheUpdater";
|
||||
private static final String TAG = "fdroid.InstalledAppCacheUpdater";
|
||||
|
||||
private Context context;
|
||||
|
||||
|
@ -13,7 +13,7 @@ import java.util.Locale;
|
||||
|
||||
public class NewRepoConfig {
|
||||
|
||||
private static final String TAG = "org.fdroid.fdroid.data.NewRepoConfig";
|
||||
private static final String TAG = "fdroid.NewRepoConfig";
|
||||
|
||||
private String errorMessage;
|
||||
private boolean isValidRepo = false;
|
||||
|
@ -16,7 +16,7 @@ public class RepoProvider extends FDroidProvider {
|
||||
|
||||
public static final class Helper {
|
||||
|
||||
public static final String TAG = "RepoProvider.Helper";
|
||||
public static final String TAG = "fdroid.RepoProvider.Helper";
|
||||
|
||||
private Helper() {}
|
||||
|
||||
|
@ -41,7 +41,7 @@ abstract public class Installer {
|
||||
protected PackageManager mPm;
|
||||
protected InstallerCallback mCallback;
|
||||
|
||||
public static final String TAG = "FDroid";
|
||||
public static final String TAG = "fdroid.Installer";
|
||||
|
||||
/**
|
||||
* This is thrown when an Installer is not compatible with the Android OS it
|
||||
|
@ -35,7 +35,7 @@ import kellinwood.security.zipsigner.ZipSigner;
|
||||
|
||||
public class LocalRepoKeyStore {
|
||||
|
||||
private static final String TAG = "org.fdroid.fdroid.localrepo.LocalRepoKeyStore";
|
||||
private static final String TAG = "fdroid.LocalRepoKeyStore";
|
||||
|
||||
public static final String INDEX_CERT_ALIAS = "fdroid";
|
||||
public static final String HTTP_CERT_ALIAS = "https";
|
||||
|
@ -60,7 +60,7 @@ import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarOutputStream;
|
||||
|
||||
public class LocalRepoManager {
|
||||
private static final String TAG = "LocalRepoManager";
|
||||
private static final String TAG = "fdroid.LocalRepoManager";
|
||||
|
||||
// For ref, official F-droid repo presently uses a maxage of 14 days
|
||||
private static final String DEFAULT_REPO_MAX_AGE_DAYS = "14";
|
||||
|
@ -36,7 +36,7 @@ import java.util.HashMap;
|
||||
import java.util.Random;
|
||||
|
||||
public class LocalRepoService extends Service {
|
||||
private static final String TAG = "LocalRepoService";
|
||||
private static final String TAG = "fdroid.LocalRepoService";
|
||||
|
||||
public static final String STATE = "org.fdroid.fdroid.action.LOCAL_REPO_STATE";
|
||||
public static final String STARTED = "org.fdroid.fdroid.category.LOCAL_REPO_STARTED";
|
||||
|
@ -41,7 +41,7 @@ import java.security.NoSuchAlgorithmException;
|
||||
*/
|
||||
public class ApkDownloader implements AsyncDownloadWrapper.Listener {
|
||||
|
||||
private static final String TAG = "org.fdroid.fdroid.net.ApkDownloader";
|
||||
private static final String TAG = "fdroid.ApkDownloader";
|
||||
|
||||
public static final String EVENT_APK_DOWNLOAD_COMPLETE = "apkDownloadComplete";
|
||||
public static final String EVENT_APK_DOWNLOAD_CANCELLED = "apkDownloadCancelled";
|
||||
|
@ -17,7 +17,7 @@ import java.io.IOException;
|
||||
*/
|
||||
public class AsyncDownloadWrapper extends Handler {
|
||||
|
||||
private static final String TAG = "org.fdroid.fdroid.net.AsyncDownloadWrapper";
|
||||
private static final String TAG = "fdroid.AsyncDownloadWrapper";
|
||||
|
||||
private static final int MSG_PROGRESS = 1;
|
||||
private static final int MSG_DOWNLOAD_COMPLETE = 2;
|
||||
|
@ -19,7 +19,7 @@ import java.net.URL;
|
||||
|
||||
public abstract class Downloader {
|
||||
|
||||
private static final String TAG = "org.fdroid.fdroid.net.Downloader";
|
||||
private static final String TAG = "fdroid.Downloader";
|
||||
private OutputStream outputStream;
|
||||
|
||||
private ProgressListener progressListener = null;
|
||||
|
@ -19,7 +19,7 @@ import java.net.URL;
|
||||
import javax.net.ssl.SSLHandshakeException;
|
||||
|
||||
public class HttpDownloader extends Downloader {
|
||||
private static final String TAG = "org.fdroid.fdroid.net.HttpDownloader";
|
||||
private static final String TAG = "fdroid.HttpDownloader";
|
||||
|
||||
protected static final String HEADER_IF_NONE_MATCH = "If-None-Match";
|
||||
protected static final String HEADER_FIELD_ETAG = "ETag";
|
||||
|
@ -17,7 +17,7 @@ import java.util.*;
|
||||
import javax.net.ssl.SSLServerSocketFactory;
|
||||
|
||||
public class LocalHTTPD extends NanoHTTPD {
|
||||
private static final String TAG = LocalHTTPD.class.getCanonicalName();
|
||||
private static final String TAG = "fdroid.LocalHTTPD";
|
||||
|
||||
private final Context context;
|
||||
private final File webRoot;
|
||||
|
@ -26,7 +26,7 @@ import javax.jmdns.*;
|
||||
|
||||
public class MDnsHelper implements ServiceListener {
|
||||
|
||||
public static final String TAG = "MDnsHelper";
|
||||
public static final String TAG = "fdroid.MDnsHelper";
|
||||
public static final String HTTP_SERVICE_TYPE = "_http._tcp.local.";
|
||||
public static final String HTTPS_SERVICE_TYPE = "_https._tcp.local.";
|
||||
|
||||
|
@ -35,7 +35,7 @@ public class WifiStateChangeService extends Service {
|
||||
}
|
||||
|
||||
public class WaitForWifiAsyncTask extends AsyncTask<Void, Void, Void> {
|
||||
private static final String TAG = "WaitForWifiAsyncTask";
|
||||
private static final String TAG = "fdroid.WifiStateChangeService.WaitForWifiAsyncTask";
|
||||
private WifiManager wifiManager;
|
||||
|
||||
@Override
|
||||
|
@ -16,7 +16,7 @@ import java.util.jar.JarFile;
|
||||
|
||||
public class SignedRepoUpdater extends RepoUpdater {
|
||||
|
||||
private static final String TAG = "org.fdroid.fdroid.updater.SignedRepoUpdater";
|
||||
private static final String TAG = "fdroid.SignedRepoUpdater";
|
||||
|
||||
public SignedRepoUpdater(Context ctx, Repo repo) {
|
||||
super(ctx, repo);
|
||||
|
@ -46,7 +46,7 @@ import java.util.TimerTask;
|
||||
|
||||
public class LocalRepoActivity extends ActionBarActivity {
|
||||
|
||||
private static final String TAG = "org.fdroid.fdroid.LocalRepoActivity";
|
||||
private static final String TAG = "fdroid.LocalRepoActivity";
|
||||
private ProgressDialog repoProgress;
|
||||
|
||||
private WifiManager wifiManager;
|
||||
@ -284,7 +284,7 @@ public class LocalRepoActivity extends ActionBarActivity {
|
||||
}
|
||||
|
||||
class UpdateAsyncTask extends AsyncTask<Void, String, Void> {
|
||||
private static final String TAG = "UpdateAsyncTask";
|
||||
private static final String TAG = "fdroid.LocalRepoActivity.UpdateAsyncTask";
|
||||
private ProgressDialog progressDialog;
|
||||
private String[] selectedApps;
|
||||
private Uri sharingUri;
|
||||
|
@ -88,7 +88,7 @@ public class ManageReposActivity extends ActionBarActivity {
|
||||
* we finish with, to signify that we want the main list of apps updated.
|
||||
*/
|
||||
public static final String REQUEST_UPDATE = "update";
|
||||
private static final String TAG = "org.fdroid.fdroid.views.ManageReposActivity";
|
||||
private static final String TAG = "fdroid.ManageReposActivity";
|
||||
|
||||
private static final String DEFAULT_NEW_REPO_TEXT = "https://";
|
||||
|
||||
|
@ -20,7 +20,7 @@ import org.fdroid.fdroid.net.WifiStateChangeService;
|
||||
|
||||
public class QrWizardDownloadActivity extends ActionBarActivity {
|
||||
|
||||
private static final String TAG = "org.fdroid.fdroid.QrWizardDownloadActivity";
|
||||
private static final String TAG = "fdroid.QrWizardDownloadActivity";
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
|
@ -22,7 +22,7 @@ import org.fdroid.fdroid.R;
|
||||
import org.fdroid.fdroid.net.WifiStateChangeService;
|
||||
|
||||
public class QrWizardWifiNetworkActivity extends ActionBarActivity {
|
||||
private static final String TAG = "org.fdroid.fdroid.QrWizardWifiNetworkActivity";
|
||||
private static final String TAG = "fdroid.QrWizardWifiNetworkActivity";
|
||||
|
||||
private WifiManager wifiManager;
|
||||
|
||||
|
@ -23,7 +23,7 @@ import org.fdroid.fdroid.data.RepoProvider;
|
||||
import org.fdroid.fdroid.views.fragments.RepoDetailsFragment;
|
||||
|
||||
public class RepoDetailsActivity extends ActionBarActivity {
|
||||
public static final String TAG = "RepoDetailsActivity";
|
||||
public static final String TAG = "fdroid.RepoDetailsActivity";
|
||||
|
||||
private Repo repo;
|
||||
|
||||
|
@ -18,7 +18,7 @@ import org.fdroid.fdroid.views.fragments.SelectLocalAppsFragment;
|
||||
|
||||
public class SelectLocalAppsActivity extends ActionBarActivity {
|
||||
|
||||
private static final String TAG = "SelectLocalAppsActivity";
|
||||
private static final String TAG = "fdroid.SelectLocalAppsActivity";
|
||||
private SelectLocalAppsFragment selectLocalAppsFragment = null;
|
||||
private SearchView searchView;
|
||||
|
||||
|
@ -68,7 +68,7 @@ public class RepoDetailsFragment extends Fragment {
|
||||
private static final int UPDATE = 1;
|
||||
private static final int ENABLE_NFC = 2;
|
||||
|
||||
private static final String TAG = "org.fdroid.fdroid.views.fragments.RepoDetailsFragment";
|
||||
private static final String TAG = "fdroid.RepoDetailsFragment";
|
||||
|
||||
private MenuItem enableNfc = null;
|
||||
private UpdateService.UpdateReceiver updateHandler = null;
|
||||
|
@ -24,7 +24,7 @@ import org.fdroid.fdroid.views.AvailableAppListAdapter;
|
||||
|
||||
public class SearchResultsFragment extends ListFragment implements LoaderManager.LoaderCallbacks<Cursor> {
|
||||
|
||||
private static final String TAG = "org.fdroid.fdroid.views.fragments.SearchResultsFragment";
|
||||
private static final String TAG = "fdroid.SearchResultsFragment";
|
||||
|
||||
private static final int REQUEST_APPDETAILS = 0;
|
||||
|
||||
|
@ -197,7 +197,7 @@ public class SwapActivity extends ActionBarActivity implements SwapProcessManage
|
||||
}
|
||||
|
||||
class UpdateAsyncTask extends AsyncTask<Void, String, Void> {
|
||||
private static final String TAG = "UpdateAsyncTask";
|
||||
private static final String TAG = "fdroid.SwapActivity.UpdateAsyncTask";
|
||||
private ProgressDialog progressDialog;
|
||||
private Set<String> selectedApps;
|
||||
private Uri sharingUri;
|
||||
|
Loading…
x
Reference in New Issue
Block a user