Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b2f8875 authored by Joey's avatar Joey
Browse files

Trebuchet: allow disabling workspace edit



Change-Id: I503e19cbc512eac0e4a8c8bccc16a6ccc0e805da
Signed-off-by: default avatarJoey <joey@lineageos.org>
parent 84635291
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2018 The LineageOS Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="@dimen/settings_icon_size"
    android:height="@dimen/settings_icon_size"
    android:viewportHeight="24.0"
    android:viewportWidth="24.0">
    <path
        android:fillColor="@color/settings_icons"
        android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z" />
</vector>
+4 −0
Original line number Diff line number Diff line
@@ -68,4 +68,8 @@
    <string name="settings_icon_badging_desc_on">A bubble will be displayed above the icon when there\'s a notification</string>
    <string name="settings_icon_badging_desc_off">No bubble will be displayed above the icon when there\'s a notification</string>
    <string name="settings_feed">Enable feed integration</string>
    <string name="settings_edit_allow_title">Allow edit</string>
    <string name="settings_edit_allow_summary_on">Icons and widgets can be added, removed and moved on the homescreen</string>
    <string name="settings_edit_allow_summary_off">Icons and widgets can\'t be added, removed and moved on the homescreen</string>
    <string name="settings_edit_widgets_error">It\'s not possible to add widgets to the home screen</string>
</resources>
+9 −0
Original line number Diff line number Diff line
@@ -14,6 +14,15 @@
-->

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
    <SwitchPreference
        android:defaultValue="true"
        android:icon="@drawable/ic_settings_edit"
        android:key="pref_workspace_edit"
        android:persistent="true"
        android:title="@string/settings_edit_allow_title"
        android:summaryOn="@string/settings_edit_allow_summary_on"
        android:summaryOff="@string/settings_edit_allow_summary_off" />

    <PreferenceCategory
        android:key="category_home"
        android:title="@string/settings_category_home">
+2 −0
Original line number Diff line number Diff line
@@ -1091,6 +1091,8 @@ public class Launcher extends BaseActivity
            mLauncherCallbacks.onResume();
        }

        mWidgetsButton.setVisibility(Utilities.isWorkspaceEditAllowed(getApplicationContext()) ?
                View.VISIBLE : View.GONE);
    }

    @Override
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.preference.ListPreference;
@@ -62,6 +61,7 @@ public class SettingsActivity extends Activity {
    private static final String KEY_SHOW_DRAWER_LABELS = "pref_drawer_show_labels";

    static final String KEY_FEED_INTEGRATION = "pref_feed_integration";
    public static final String KEY_WORKSPACE_EDIT = "pref_workspace_edit";

    static final String EXTRA_SCHEDULE_RESTART = "extraScheduleRestart";

Loading