Skip to content

Commit

Permalink
UPDATE: Minor tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
oasisfeng committed Apr 6, 2021
1 parent dda2adb commit 3655e9b
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public class UserGuide {
public MenuItem.OnMenuItemClickListener getAvailableTip() {
final @Nullable UserHandle profile = mAppListViewModel.getCurrentProfile();
if (profile == null) return null;
if (! mAppScope.isMarked(SCOPE_KEY_TIP_CLONE) && Users.isOwner(profile) && mAppSelection != null && ! mAppSelection.isSystem())
if (! mAppScope.isMarked(SCOPE_KEY_TIP_CLONE) && Users.isOwner(profile)
&& mAppSelection != null && ! mAppSelection.isSystem())
return mTipClone;
if (! mAppScope.isMarked(SCOPE_KEY_TIP_FREEZE) && Users.isProfileManagedByIsland(profile)
&& mAppSelection != null && mAppSelection.state == AppViewModel.State.Alive)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class IslandSettingsFragment: android.preference.PreferenceFragment() {
if (Users.isOwner() && ! isProfileOrDeviceOwner) {
setup<Preference>(R.string.key_cross_profile) { remove(this) }
setup<Preference>(R.string.key_device_owner_setup) {
summary = getString(R.string.pref_device_owner_summary) + getString(R.string.pref_device_owner_featurs)
summary = getString(R.string.pref_device_owner_summary) + getString(R.string.pref_device_owner_features)
setOnPreferenceClickListener { true.also { WebContent.view(activity, Uri.parse(Config.URL_SETUP_GOD_MODE.get())) }}}
setup<Preference>(R.string.key_privacy) { if (SDK_INT > Q) remove(this) else isEnabled = false } // Show but disabled, as a feature preview.
setup<Preference>(R.string.key_watcher) { isEnabled = false }
Expand Down Expand Up @@ -120,7 +120,7 @@ class IslandSettingsFragment: android.preference.PreferenceFragment() {
if (Users.isOwner()) {
if (! isProfileOrDeviceOwner) return@setup remove(this)
setTitle(R.string.pref_rescind_title)
summary = getString(R.string.pref_rescind_summary) + getString(R.string.pref_device_owner_featurs) + "\n" }
summary = getString(R.string.pref_rescind_summary) + getString(R.string.pref_device_owner_features) + "\n" }
setOnPreferenceClickListener { true.also {
if (Users.isOwner()) IslandSetup.requestDeviceOrProfileOwnerDeactivation(activity)
else IslandSetup.requestProfileRemoval(activity) }}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ object IslandAppShortcut {

private fun getAppIconLargeDrawable(context: Context, am: ActivityManager, app: ApplicationInfo): Drawable?
= if (app.icon == 0) null else try { context.packageManager.getResourcesForApplication(app)
.getDrawableForDensity(app.icon , am.launcherLargeIconDensity, null) }
.getDrawableForDensity(app.icon, am.launcherLargeIconDensity, null) }
catch (_: NameNotFoundException) { null } catch (_: Resources.NotFoundException) { null }

private fun showToastForShortcutFailure(context: Context)
Expand Down
7 changes: 3 additions & 4 deletions mobile/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@

<string name="pref_general_header">一般</string>
<string name="pref_cat_app_launch_shortcuts">應用程式啟動快捷方式</string>
<string name="pref_alt_shortcut_badge_title">界内使用替代角標 (實驗性)</string>
<string name="pref_alt_shortcut_badge_summary">對界外和界内的應用程式啟動快捷方式使用不同的角標。\n(某些裝置可能不支持)</string>
<string name="pref_dynamic_shortcut_label_title">動態快速啟動方式</string>
<string name="pref_dynamic_shortcut_label_summary">在應用程式凍結時为應用程式啟動快速啟動方式添加前缀,在應用程式解凍時去掉前缀。\n(某些啟動器可能不支持)</string>
Expand Down Expand Up @@ -185,7 +184,7 @@
<string name="pref_rescind_summary">撤銷煉妖壺對裝置的全局管理權。所有的應用程式和資料都將保留(解凍),但你將無法再:\n\n</string>
<string name="pref_device_owner_title">讓掌控力延伸至界外</string>
<string name="pref_device_owner_summary">授權煉妖壺管理界外的權限,你將可以:\n\n</string>
<string name="pref_device_owner_featurs">· 凍結和管理界外的應用程式\n· 使用某些需要裝置全局管理權的特性(如完整的 ADB 安全封印)</string>
<string name="pref_device_owner_features">· 凍結和管理界外的應用程式\n· 使用某些需要裝置全局管理權的特性(如完整的 ADB 安全封印)</string>

<string name="pref_setup_header">管理</string>

Expand All @@ -209,8 +208,8 @@

<!-- New User Guide -->

<string name="prompt_freeze_title">凍結壺中界的應用程式</string>
<string name="prompt_freeze_text">被凍結應用程式会完全消失,看起來就像是解除安裝了一樣,直到將其解凍。\n\n在凍結狀態的應用程式絕對無法做任何事情。</string>
<string name="prompt_freeze_title">凍結應用程式</string>
<string name="prompt_freeze_text">被凍結的應用程式会完全消失,看起來就像是解除安裝了一樣,直到將其解凍。\n\n在凍結狀態的應用程式絕對無法做任何事情。</string>
<string name="prompt_clone_title">在壺中界建立應用程式的分身</string>
<string name="prompt_clone_text">界外的應用程式可以在壺中界獲得分身。\n\n應用程式的分身就像是新安裝的應用程式副本,有自己獨立的資料。他們只分享應用程式的執行程式以節省空間。</string>

Expand Down
7 changes: 3 additions & 4 deletions mobile/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@
<string name="pref_general_header">常规</string>
<string name="pref_cat_app_launch_shortcuts">应用启动快捷方式</string>
<string name="pref_launch_shortcut_prefix_title">应用启动快捷方式的名称前缀</string>
<string name="pref_alt_shortcut_badge_title">界内使用替代角标 (试验性)</string>
<string name="pref_alt_shortcut_badge_summary">对界外和界内的应用启动快捷方式使用不同的角标。\n(某些设备可能不支持)</string>
<string name="pref_dynamic_shortcut_label_title">动态快捷方式</string>
<string name="pref_dynamic_shortcut_label_summary">在应用冻结时为应用启动快捷方式添加前缀,在应用解冻时去掉前缀。\n(某些启动器可能不支持)</string>
Expand Down Expand Up @@ -184,7 +183,7 @@
<string name="pref_rescind_summary">撤销炼妖壶对设备的全局管理权。所有的应用和数据都将保留(解冻),但你将无法再:\n\n</string>
<string name="pref_device_owner_title">让掌控力延伸至界外</string>
<string name="pref_device_owner_summary">授予炼妖壶管理界外的权限,你将可以:\n\n</string>
<string name="pref_device_owner_featurs">· 冻结和管理界外的应用\n· 使用某些需要设备全局管理权的特性(如完整的 ADB 安全封印)</string>
<string name="pref_device_owner_features">· 冻结和管理界外的应用\n· 使用某些需要设备全局管理权的特性(如完整的 ADB 安全封印)</string>

<string name="pref_setup_header">管理</string>

Expand All @@ -208,8 +207,8 @@

<!-- New User Guide -->

<string name="prompt_freeze_title">冻结壶中界的应用</string>
<string name="prompt_freeze_text">被冻结应用会完全消失,看起来就像是卸载了一样,直到将其解冻。\n\n在冻结状态的应用绝对无法做任何事情。</string>
<string name="prompt_freeze_title">冻结应用</string>
<string name="prompt_freeze_text">被冻结的应用会完全消失,看起来就像是卸载了一样,直到将其解冻。\n\n在冻结状态的应用绝对无法做任何事情。</string>
<string name="prompt_clone_title">在壶中界创造应用的分身</string>
<string name="prompt_clone_text">界外的应用可以在壶中界获得分身。\n\n应用的分身就像是新安装的应用副本,有自己独立的数据。他们只共享应用的执行文件以节省空间。</string>

Expand Down
7 changes: 3 additions & 4 deletions mobile/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ the sandbox environment. Island never collect data related to your privacy, plea
<string name="pref_general_header">General</string>
<string name="pref_cat_app_launch_shortcuts">App launch shortcuts</string>
<string name="pref_launch_shortcut_prefix_title">Launch shortcut prefix</string>
<string name="pref_alt_shortcut_badge_title">Alternative badge in Island (Experimental)</string>
<string name="pref_alt_shortcut_badge_summary">Use different badge for app launch shortcuts in Mainland and Island.\n(May not work on some devices)</string>
<string name="pref_dynamic_shortcut_label_title">Dynamic shortcut label</string>
<string name="pref_dynamic_shortcut_label_summary">Add prefix to shortcut label when app is frozen, and remove the prefix when app is unfrozen.\n(May not work on some launchers)</string>
Expand Down Expand Up @@ -188,7 +187,7 @@ the sandbox environment. Island never collect data related to your privacy, plea
<string name="pref_rescind_summary">Rescind the privilege on Mainland. All your apps and data will be intact (unfrozen), but you could no longer:\n\n</string>
<string name="pref_device_owner_title">Extend the power to Mainland</string>
<string name="pref_device_owner_summary">If activated, you can:\n\n</string>
<string name="pref_device_owner_featurs">· Freeze apps in Mainland\n· Supervise app permissions in Mainland (Android 9+)\n· Use some device global features (e.g. full ADB Secure).</string>
<string name="pref_device_owner_features">· Freeze apps in Mainland\n· Use some device global features (e.g. full ADB Secure).</string>

<string name="pref_setup_header">Setup</string>

Expand All @@ -212,8 +211,8 @@ the sandbox environment. Island never collect data related to your privacy, plea

<!-- New User Guide -->

<string name="prompt_freeze_title">Freeze app in Island</string>
<string name="prompt_freeze_text">Once frozen, the app in Island will vanish until being explicit unfrozen.\n\nApp could do absolutely nothing in frozen state.</string>
<string name="prompt_freeze_title">Freeze app</string>
<string name="prompt_freeze_text">Once frozen, the app will vanish until being explicit unfrozen.\n\nApp could do absolutely nothing in frozen state.</string>
<string name="prompt_clone_title">Clone app to Island</string>
<string name="prompt_clone_text">App in mainland can be cloned into Island.\n\nThe clone acts as a newly installed instance and has its own data, separated from its mainland twin. They only share the executable binaries to conserve space.</string>

Expand Down

0 comments on commit 3655e9b

Please sign in to comment.