diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index b07d97a..7f1d2b2 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -42,46 +42,60 @@
+ android:exported="false"
+ android:taskAffinity="" />
+ android:exported="false"
+ android:taskAffinity="" />
+ android:exported="false"
+ android:taskAffinity="" />
+ android:exported="false"
+ android:taskAffinity="" />
+ android:exported="false"
+ android:taskAffinity="" />
+ android:exported="false"
+ android:taskAffinity="" />
+ android:exported="false"
+ android:taskAffinity="" />
+ android:exported="false"
+ android:taskAffinity="" />
+ android:exported="false"
+ android:taskAffinity="" />
+ android:exported="false"
+ android:taskAffinity="" />
+ android:exported="false"
+ android:taskAffinity="" />
+ android:exported="false"
+ android:taskAffinity="" />
+ android:exported="false"
+ android:taskAffinity="" />
diff --git a/app/src/main/java/net/devemperor/wristassist/activities/AboutActivity.java b/app/src/main/java/net/devemperor/wristassist/activities/AboutActivity.java
index 52b54d2..1c94e7f 100644
--- a/app/src/main/java/net/devemperor/wristassist/activities/AboutActivity.java
+++ b/app/src/main/java/net/devemperor/wristassist/activities/AboutActivity.java
@@ -8,7 +8,6 @@
import net.devemperor.wristassist.BuildConfig;
import net.devemperor.wristassist.R;
-import net.devemperor.wristassist.util.WristAssistUtil;
public class AboutActivity extends Activity {
@@ -20,7 +19,6 @@ protected void onCreate(Bundle savedInstanceState) {
TextView aboutText = findViewById(R.id.version_tv);
aboutText.setText(getString(R.string.wristassist_about, BuildConfig.VERSION_NAME));
- aboutText.setTextSize(16 * WristAssistUtil.getFontMultiplier(this));
ImageView icon = findViewById(R.id.icon);
icon.setOnLongClickListener(v -> {
diff --git a/app/src/main/java/net/devemperor/wristassist/activities/SavedChatsActivity.java b/app/src/main/java/net/devemperor/wristassist/activities/SavedChatsActivity.java
index 3e44499..2b8ba14 100644
--- a/app/src/main/java/net/devemperor/wristassist/activities/SavedChatsActivity.java
+++ b/app/src/main/java/net/devemperor/wristassist/activities/SavedChatsActivity.java
@@ -15,7 +15,6 @@
import net.devemperor.wristassist.adapters.SavedChatsAdapter;
import net.devemperor.wristassist.database.ChatHistoryDatabaseHelper;
import net.devemperor.wristassist.database.ChatHistoryModel;
-import net.devemperor.wristassist.util.WristAssistUtil;
import java.util.List;
@@ -56,7 +55,6 @@ protected void onCreate(Bundle savedInstanceState) {
TextView noSavedChats = findViewById(R.id.no_saved_chats);
noSavedChats.setVisibility(chats.isEmpty() ? android.view.View.VISIBLE : android.view.View.GONE);
- noSavedChats.setTextSize(16 * WristAssistUtil.getFontMultiplier(this));
savedChatsWrv.requestFocus();
savedChatsWrv.setOnGenericMotionListener((v, ev) -> {
diff --git a/app/src/main/java/net/devemperor/wristassist/adapters/ChatAdapter.java b/app/src/main/java/net/devemperor/wristassist/adapters/ChatAdapter.java
index 0545a6e..72c0db7 100644
--- a/app/src/main/java/net/devemperor/wristassist/adapters/ChatAdapter.java
+++ b/app/src/main/java/net/devemperor/wristassist/adapters/ChatAdapter.java
@@ -91,7 +91,7 @@ public View getView (int position, View convertView, @NonNull ViewGroup parent)
TextView chatItem = listItem.findViewById(R.id.chat_item_text);
chatItem.setTextSize(context.getSharedPreferences("net.devemperor.wristassist", Context.MODE_PRIVATE)
- .getInt("net.devemperor.wristassist.font_size", 15) * WristAssistUtil.getFontMultiplier(context));
+ .getInt("net.devemperor.wristassist.font_size", 15));
ChatMessage chatMessage = objects.get(position).getChatMessage();
chatItem.setOnClickListener(v -> launchTTS(chatMessage.getContent()));
diff --git a/app/src/main/java/net/devemperor/wristassist/adapters/MainAdapter.java b/app/src/main/java/net/devemperor/wristassist/adapters/MainAdapter.java
index b820711..458ad88 100644
--- a/app/src/main/java/net/devemperor/wristassist/adapters/MainAdapter.java
+++ b/app/src/main/java/net/devemperor/wristassist/adapters/MainAdapter.java
@@ -12,7 +12,6 @@
import net.devemperor.wristassist.R;
import net.devemperor.wristassist.items.MainItem;
-import net.devemperor.wristassist.util.WristAssistUtil;
import java.io.IOException;
import java.util.List;
@@ -56,7 +55,6 @@ public void onBindViewHolder(RecyclerViewHolder holder, final int position) {
MainItem dataProvider = data.get(position);
holder.menuItem.setText(dataProvider.getText());
- holder.menuItem.setTextSize(24 * WristAssistUtil.getFontMultiplier(holder.menuItem.getContext()));
holder.menuIcon.setImageResource(dataProvider.getIcon());
holder.menuContainer.setOnClickListener(v -> {
if (callback != null) {
diff --git a/app/src/main/java/net/devemperor/wristassist/adapters/OnboardingAdapter.java b/app/src/main/java/net/devemperor/wristassist/adapters/OnboardingAdapter.java
index fe37da5..b38f45c 100644
--- a/app/src/main/java/net/devemperor/wristassist/adapters/OnboardingAdapter.java
+++ b/app/src/main/java/net/devemperor/wristassist/adapters/OnboardingAdapter.java
@@ -6,14 +6,12 @@
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
-import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import net.devemperor.wristassist.R;
import net.devemperor.wristassist.activities.MainActivity;
-import net.devemperor.wristassist.util.WristAssistUtil;
public class OnboardingAdapter extends RecyclerView.Adapter {
@@ -35,13 +33,7 @@ public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
- if (position == 0) {
- TextView welcomeTv = holder.itemView.findViewById(R.id.welcome_tv);
- welcomeTv.setTextSize(20 * WristAssistUtil.getFontMultiplier(welcomeTv.getContext()));
- } else if (position == 1) {
- TextView infoTv = holder.itemView.findViewById(R.id.info_tv);
- infoTv.setTextSize(16 * WristAssistUtil.getFontMultiplier(infoTv.getContext()));
- } else if (position == 2) {
+ if (position == 2) {
ImageView qrCodeIv = holder.itemView.findViewById(R.id.qrcode_iv);
qrCodeIv.setOnClickListener(v -> {
Intent intent = new Intent(v.getContext(), MainActivity.class);
diff --git a/app/src/main/java/net/devemperor/wristassist/adapters/SavedChatsAdapter.java b/app/src/main/java/net/devemperor/wristassist/adapters/SavedChatsAdapter.java
index dde7e88..7c5af94 100644
--- a/app/src/main/java/net/devemperor/wristassist/adapters/SavedChatsAdapter.java
+++ b/app/src/main/java/net/devemperor/wristassist/adapters/SavedChatsAdapter.java
@@ -11,7 +11,6 @@
import net.devemperor.wristassist.R;
import net.devemperor.wristassist.database.ChatHistoryModel;
-import net.devemperor.wristassist.util.WristAssistUtil;
import java.util.List;
@@ -52,7 +51,6 @@ public void onBindViewHolder(RecyclerViewHolder holder, final int position) {
ChatHistoryModel dataProvider = data.get(position);
holder.savedChatTitle.setText(dataProvider.getTitle());
- holder.savedChatTitle.setTextSize(18 * WristAssistUtil.getFontMultiplier(holder.savedChatTitle.getContext()));
holder.savedChatContainer.setOnClickListener(v -> {
if (callback != null) {
diff --git a/app/src/main/java/net/devemperor/wristassist/adapters/UsageAdapter.java b/app/src/main/java/net/devemperor/wristassist/adapters/UsageAdapter.java
index 5c03fcf..637fb8f 100644
--- a/app/src/main/java/net/devemperor/wristassist/adapters/UsageAdapter.java
+++ b/app/src/main/java/net/devemperor/wristassist/adapters/UsageAdapter.java
@@ -21,7 +21,6 @@ public class UsageAdapter extends ArrayAdapter {
final Context context;
final List objects;
-
public UsageAdapter(@NonNull Context context, @NonNull List objects) {
super(context, -1, objects);
this.context = context;
@@ -37,7 +36,6 @@ public View getView (int position, View convertView, @NonNull ViewGroup parent)
TextView modelNameTv = listItem.findViewById(R.id.usage_model_tv);
modelNameTv.setText(WristAssistUtil.translate(context, dataProvider.getModelName()));
- modelNameTv.setTextSize(18 * WristAssistUtil.getFontMultiplier(context));
TextView tokensTv = listItem.findViewById(R.id.usage_tokens_tv);
if (dataProvider.getModelName().startsWith("gpt")) {
@@ -47,12 +45,10 @@ public View getView (int position, View convertView, @NonNull ViewGroup parent)
tokensTv.setText(context.getString(R.string.wristassist_images_count,
String.format(Locale.getDefault(), "%,d", dataProvider.getTokens())));
}
- tokensTv.setTextSize(16 * WristAssistUtil.getFontMultiplier(context));
TextView costTv = listItem.findViewById(R.id.usage_cost_tv);
costTv.setText(context.getString(R.string.wristassist_estimated_cost,
String.format(Locale.getDefault(), "%,.2f", dataProvider.getCost())));
- costTv.setTextSize(16 * WristAssistUtil.getFontMultiplier(context));
return listItem;
}
diff --git a/app/src/main/java/net/devemperor/wristassist/util/WristAssistUtil.java b/app/src/main/java/net/devemperor/wristassist/util/WristAssistUtil.java
index 368dee3..b98d9b2 100644
--- a/app/src/main/java/net/devemperor/wristassist/util/WristAssistUtil.java
+++ b/app/src/main/java/net/devemperor/wristassist/util/WristAssistUtil.java
@@ -25,16 +25,6 @@ public static Bitmap drawableToBitmap(Drawable drawable) {
return bitmap;
}
- public static float getFontMultiplier(Context context) {
- float fs = context.getResources().getConfiguration().fontScale;
- float diff = Math.abs(fs - 1.0f) * 0.3f;
- if (fs > 1) {
- return 1.0f + diff;
- } else {
- return 1.0f - diff;
- }
- }
-
public static double calcCostChat(String model, long promptTokens, long completionTokens) {
double inputPrice = 0;
double outputPrice = 0;