// Path: app/src/main/java/com/antest1/kcanotify/KcaConstants.java
// public static final String DB_KEY_STARTDATA = "key_startdata";
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaConstants.java
// public static final int KCANOTIFY_DB_VERSION = 5;
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaConstants.java
// public static final String PREF_KCA_LANGUAGE = "kca_language";
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaUseStatConstant.java
// public final static String OPEN_TOOL = "OpenTool";
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaUtils.java
// public static String getStringPreferences(Context ctx, String key) {
//     SharedPreferences pref = ctx.getSharedPreferences("pref", Context.MODE_PRIVATE);
//     try {
//         return String.valueOf(pref.getInt(key, 0));
//     } catch (Exception e) {
//         // Nothing to do
//     }
//     return pref.getString(key, "");
// }
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaUtils.java
// public static void sendUserAnalytics(Context context, String event, JsonObject value) {
//     Bundle params = new Bundle();
//     FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(context);
//     if (value != null) {
//         for (String key: value.keySet()) {
//             params.putString(key, value.get(key).getAsString());
//         }
//     }
//     mFirebaseAnalytics.logEvent(event, params);
// }


import android.content.Intent;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import androidx.core.content.ContextCompat;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.util.Log;
import android.view.MenuItem;
import android.widget.LinearLayout;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import java.util.Locale;
import static com.antest1.kcanotify.KcaConstants.DB_KEY_STARTDATA;
import static com.antest1.kcanotify.KcaConstants.KCANOTIFY_DB_VERSION;
import static com.antest1.kcanotify.KcaConstants.PREF_KCA_LANGUAGE;
import static com.antest1.kcanotify.KcaUseStatConstant.OPEN_TOOL;
import static com.antest1.kcanotify.KcaUtils.getStringPreferences;
import static com.antest1.kcanotify.KcaUtils.sendUserAnalytics;
package com.antest1.kcanotify;







public class ToolsActivity extends AppCompatActivity {
    Toolbar toolbar;
    KcaDBHelper dbHelper;
    static Gson gson = new Gson();
    LinearLayout view_fleetlist, view_shiplist, view_equipment, view_droplog, view_reslog, view_akashi, view_expcalc, view_expdtable;
    public ToolsActivity() {
        LocaleUtils.updateConfig(this);
    }

    private String getStringWithLocale(int id) {
        return KcaUtils.getStringWithLocale(getApplicationContext(), getBaseContext(), id);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_tool_list);
        toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
        getSupportActionBar().setTitle(getStringWithLocale(R.string.action_tools));
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        view_fleetlist = findViewById(R.id.action_fleetlist);
        view_shiplist = findViewById(R.id.action_shiplist);
        view_equipment = findViewById(R.id.action_equipment);
        view_droplog = findViewById(R.id.action_droplog);
        view_reslog = findViewById(R.id.action_reslog);
        view_akashi = findViewById(R.id.action_akashi);
        view_expcalc = findViewById(R.id.action_expcalc);
        view_expdtable = findViewById(R.id.action_expdtable);

// Path: app/src/main/java/com/antest1/kcanotify/KcaConstants.java
// public static final String DB_KEY_STARTDATA = "key_startdata";
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaConstants.java
// public static final int KCANOTIFY_DB_VERSION = 5;
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaConstants.java
// public static final String PREF_KCA_LANGUAGE = "kca_language";
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaUseStatConstant.java
// public final static String OPEN_TOOL = "OpenTool";
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaUtils.java
// public static String getStringPreferences(Context ctx, String key) {
//     SharedPreferences pref = ctx.getSharedPreferences("pref", Context.MODE_PRIVATE);
//     try {
//         return String.valueOf(pref.getInt(key, 0));
//     } catch (Exception e) {
//         // Nothing to do
//     }
//     return pref.getString(key, "");
// }
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaUtils.java
// public static void sendUserAnalytics(Context context, String event, JsonObject value) {
//     Bundle params = new Bundle();
//     FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(context);
//     if (value != null) {
//         for (String key: value.keySet()) {
//             params.putString(key, value.get(key).getAsString());
//         }
//     }
//     mFirebaseAnalytics.logEvent(event, params);
// }


// Path: app/src/main/java/com/antest1/kcanotify/ToolsActivity.java
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import androidx.core.content.ContextCompat;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.util.Log;
import android.view.MenuItem;
import android.widget.LinearLayout;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import java.util.Locale;
import static com.antest1.kcanotify.KcaConstants.DB_KEY_STARTDATA;
import static com.antest1.kcanotify.KcaConstants.KCANOTIFY_DB_VERSION;
import static com.antest1.kcanotify.KcaConstants.PREF_KCA_LANGUAGE;
import static com.antest1.kcanotify.KcaUseStatConstant.OPEN_TOOL;
import static com.antest1.kcanotify.KcaUtils.getStringPreferences;
import static com.antest1.kcanotify.KcaUtils.sendUserAnalytics;

package com.antest1.kcanotify;







public class ToolsActivity extends AppCompatActivity {
    Toolbar toolbar;
    KcaDBHelper dbHelper;
    static Gson gson = new Gson();
    LinearLayout view_fleetlist, view_shiplist, view_equipment, view_droplog, view_reslog, view_akashi, view_expcalc, view_expdtable;
    public ToolsActivity() {
        LocaleUtils.updateConfig(this);
    }

    private String getStringWithLocale(int id) {
        return KcaUtils.getStringWithLocale(getApplicationContext(), getBaseContext(), id);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_tool_list);
        toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
        getSupportActionBar().setTitle(getStringWithLocale(R.string.action_tools));
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        view_fleetlist = findViewById(R.id.action_fleetlist);
        view_shiplist = findViewById(R.id.action_shiplist);
        view_equipment = findViewById(R.id.action_equipment);
        view_droplog = findViewById(R.id.action_droplog);
        view_reslog = findViewById(R.id.action_reslog);
        view_akashi = findViewById(R.id.action_akashi);
        view_expcalc = findViewById(R.id.action_expcalc);
        view_expdtable = findViewById(R.id.action_expdtable);

        dbHelper = new KcaDBHelper(getApplicationContext(), null, KCANOTIFY_DB_VERSION);