Skip to content

Commit

Permalink
REMOVE: Featured app "IceBox" temporarily, until its suspension is li…
Browse files Browse the repository at this point in the history
…fted by Google Play Store.
  • Loading branch information
oasisfeng committed Jun 23, 2020
1 parent f583319 commit 22369c1
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Handler;
import android.provider.Settings;

import androidx.annotation.DrawableRes;
import androidx.annotation.StringRes;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LiveData;
import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.RecyclerView;
Expand All @@ -30,9 +28,6 @@
import com.oasisfeng.island.Config;
import com.oasisfeng.island.adb.AdbSecure;
import com.oasisfeng.island.analytics.Analytics;
import com.oasisfeng.island.controller.IslandAppClones;
import com.oasisfeng.island.data.IslandAppInfo;
import com.oasisfeng.island.data.IslandAppListProvider;
import com.oasisfeng.island.data.LiveUserRestriction;
import com.oasisfeng.island.files.IslandFiles;
import com.oasisfeng.island.mobile.BR;
Expand Down Expand Up @@ -70,7 +65,6 @@
public class FeaturedListViewModel extends AndroidViewModel {

private static final String SCOPE_TAG_PREFIX_FEATURED = "featured_";
private static final String PACKAGE_ICEBOX = "com.catchingnow.icebox";
private static final boolean SHOW_ALL = false; // For debugging purpose

public NonNullMutableLiveData<Boolean> visible = new NonNullMutableLiveData<>(Boolean.FALSE);
Expand Down Expand Up @@ -144,18 +138,6 @@ R.string.featured_adb_secure_description,0, map(adb_secure, enabled -> enabled ?
addFeaturedApp(R.string.featured_saf_enhancer_title, R.string.featured_saf_enhancer_description, R.drawable.ic_launcher_saf_enhancer,
"app.gwo.safenhancer.lite", "app.gwo.safenhancer");

if (! addFeaturedApp(R.string.featured_icebox_title, R.string.featured_icebox_description, R.drawable.ic_launcher_icebox, PACKAGE_ICEBOX)
&& Users.hasProfile() && IslandAppListProvider.getInstance(context).get(PACKAGE_ICEBOX, Users.profile) == null) {
new Handler().postDelayed(() -> { // Dirty workaround due to IslandAppListProvider updated after onResume()
if (activity.getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED)
&& IslandAppListProvider.getInstance(activity).get(PACKAGE_ICEBOX, Users.profile) != null)
update(context);
}, 1_000);
final IslandAppInfo icebox_in_mainland = IslandAppListProvider.getInstance(context).get(PACKAGE_ICEBOX, Users.owner);
if (icebox_in_mainland != null) addFeature(app, "icebox", R.string.featured_icebox_title, R.string.featured_icebox_description,
R.drawable.ic_launcher_icebox, R.string.action_clone, c -> IslandAppClones.cloneApp(context/* must be activity */, icebox_in_mainland));
}

addFeaturedApp(R.string.featured_appops_title, R.string.featured_appops_description, R.drawable.ic_launcher_appops,
"rikka.appops", "rikka.appops.pro");

Expand Down
Binary file not shown.
2 changes: 0 additions & 2 deletions mobile/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
<string name="featured_greenify_description">在屏幕关闭后,自动冻结选定的应用,除非它们仍然在工作中。</string>
<string name="featured_saf_enhancer_title">SAF 增强器 Lite</string>
<string name="featured_saf_enhancer_description">为不兼容存储访问框架,但支持通过外部相机应用拍照的应用(如“微信”)提供跨界的图片访问能力。</string>
<string name="featured_icebox_title">冰箱</string>
<string name="featured_icebox_description">轻松愉悦的应用冻结和启动体验。请确保在冰箱的工作模式设置中选择“炼妖壶”。将其克隆至壶中界即可管理和启动壶中界的应用。</string>
<string name="featured_appops_title">App Ops</string>
<string name="featured_appops_description">App Ops 可选择性剥夺指定应用的部分能力,即使授予了相关权限。</string>
<string name="featured_setup_island_title">创建一个独立的壶中界</string>
Expand Down
2 changes: 0 additions & 2 deletions mobile/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
<string name="featured_greenify_description">Automatically freeze selected apps if not in active use, after screen goes off.</string>
<string name="featured_saf_enhancer_title">SAF Enhancer Lite</string>
<string name="featured_saf_enhancer_description">Enable cross-border image access for app not supporting \"Storage Access Framework\", provided it supports photo capture with external camera app.</string>
<string name="featured_icebox_title">Ice Box</string>
<string name="featured_icebox_description">Easy and pleasant app launching experience for frozen apps. Be sure to select \"Island\" as Work Mode in the settings of Ice Box. To manage apps in Island, clone Ice Box and launch it in Island.</string>
<string name="featured_appops_title">App Ops</string>
<string name="featured_appops_description">App Ops is a powerful tool to selectively block some data access capabilities of apps gracefully, even if related permission is granted by user.</string>
<string name="featured_setup_island_title">Setup a separate Island</string>
Expand Down

0 comments on commit 22369c1

Please sign in to comment.