Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android): remove some deprecated classes #14039

Merged
merged 3 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import com.google.android.material.bottomnavigation.BottomNavigationItemView;
import com.google.android.material.bottomnavigation.BottomNavigationMenuView;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.google.android.material.bottomnavigation.LabelVisibilityMode;
import com.google.android.material.navigation.NavigationBarView;
import com.google.android.material.shape.CornerFamily;
import com.google.android.material.shape.MaterialShapeDrawable;
import com.google.android.material.shape.ShapeAppearanceModel;
Expand Down Expand Up @@ -238,14 +238,14 @@ public void addTabItemInController(TiViewProxy tabProxy)
final int shiftMode = proxy.getProperties().optInt(TiC.PROPERTY_SHIFT_MODE, 1);
switch (shiftMode) {
case 0:
this.mBottomNavigationView.setLabelVisibilityMode(LabelVisibilityMode.LABEL_VISIBILITY_LABELED);
this.mBottomNavigationView.setLabelVisibilityMode(NavigationBarView.LABEL_VISIBILITY_LABELED);
break;
case 1:
this.mBottomNavigationView.setLabelVisibilityMode(LabelVisibilityMode.LABEL_VISIBILITY_AUTO);
this.mBottomNavigationView.setLabelVisibilityMode(NavigationBarView.LABEL_VISIBILITY_AUTO);
break;
case 2:
// NOTE: Undocumented for now, will create new property that has parity with iOS.
this.mBottomNavigationView.setLabelVisibilityMode(LabelVisibilityMode.LABEL_VISIBILITY_UNLABELED);
this.mBottomNavigationView.setLabelVisibilityMode(NavigationBarView.LABEL_VISIBILITY_UNLABELED);
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
*/
package org.appcelerator.kroll.common;

import android.util.Config;

/**
* A replacement class for org.appcelerator.titanium.config.TitaniumConfig so that I can change
* settings via tiapp.xml
Expand All @@ -24,9 +22,9 @@ public class TiConfig
* <property name="ti.android.debug" type="bool">true</property>
* </pre>
*/
public static boolean LOGD = Config.DEBUG;
public static boolean LOGV = Config.DEBUG;
public static boolean DEBUG = Config.DEBUG;
public static boolean RELEASE = !Config.DEBUG;
public static boolean PROFILE = Config.PROFILE;
public static boolean LOGD = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs say LOGD is always true. Are we sure we want false here? I have no idea what this is even. The Android docs are completely useless.

Just in case, here's the suggestion to expidite the change:

Suggested change
public static boolean LOGD = false;
public static boolean LOGD = true;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Config.LOGD in the Android Config is true, but here we used Config.DEBUG (which is always false) before. And this is the place where it is set:

TiConfig.DEBUG = TiConfig.LOGD = appProperties.getBool("ti.android.debug", false);

with false as default too. So I would keep it as false.
It is added to every module private static final boolean DBG = TiConfig.LOGD; so in case people use that it should be the same value as before (false) unless you change it with the property.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohhh, that makes sense! Thanks!

public static boolean LOGV = false;
public static boolean DEBUG = false;
public static boolean RELEASE = true;
public static boolean PROFILE = false;
}
Loading