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

Commit dc07bc85 authored by Danesh M's avatar Danesh M Committed by Steve Kondik
Browse files

Settings : Add ability to disable a lockscreen shortcut

Change-Id: If3365b3d3cff8112f9b9df640b5ed65ae7d4fdb3
parent 86dfc4b8
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (c) 2015 The CyanogenMod 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="48dp"
    android:height="48dp"
    android:viewportWidth="48"
    android:viewportHeight="48">

    <path
        android:fillColor="#000000"
        android:pathData="M14 10h4V6h-4v4zm0 16h4v-4h-4v4zm0 16h4v-4h-4v4zm8-8h4v-4h-4v4zm0 8h4v-4h-4v4zM6
42h4v-4H6v4zm0-8h4v-4H6v4zm0-8h4v-4H6v4zm0-8h4v-4H6v4zm0-8h4V6H6v4zm16
16h4v-4h-4v4zm16 8h4v-4h-4v4zm0-8h4v-4h-4v4zm0 16h4v-4h-4v4zm0-24h4v-4h-4v4zm-16
0h4v-4h-4v4zM38 6v4h4V6h-4zm-16 4h4V6h-4v4zm8
32h4v-4h-4v4zm0-16h4v-4h-4v4zm0-16h4V6h-4v4z" />
</vector>
+1 −0
Original line number Diff line number Diff line
@@ -1003,6 +1003,7 @@
    <string name="lockscreen_settings_title">Lock screen</string>
    <string name="lockscreen_targets_message">Lock screen shortcuts</string>
    <string name="lockscreen_default_target">Default</string>
    <string name="lockscreen_none_target">None</string>
    <string name="lockscreen_message">Tap an icon on the left or right to reassign a lock screen shortcut.</string>
    <string name="lockscreen_choose_action_title">Choose action</string>

+9 −4
Original line number Diff line number Diff line
@@ -132,9 +132,14 @@ public class LockscreenShortcuts extends Fragment implements View.OnClickListene
            int id = sIconIds[i];
            ImageView v = (ImageView) getView().findViewById(id);
            v.setColorFilter(item.colorFilter);
            if (LockscreenShortcutsHelper.NONE.equals(item.uri)) {
                v.setImageResource(R.drawable.ic_lockscreen_shortcuts_blank);
            } else {
                v.setImageDrawable(item.icon);
            }
            v.setTag(item.uri);
            if (LockscreenShortcutsHelper.NONE.equals(item.uri)) {
            if (LockscreenShortcutsHelper.DEFAULT.equals(item.uri) ||
                    LockscreenShortcutsHelper.NONE.equals(item.uri)) {
                v.setImageTintList(mDefaultTintList);
            } else {
                v.setImageTintList(null);
@@ -144,8 +149,8 @@ public class LockscreenShortcuts extends Fragment implements View.OnClickListene

    private void createActionList() {
        mActions = new ActionHolder();
        mActions.addAction(LockscreenShortcutsHelper.NONE, R.string.lockscreen_default_target);

        mActions.addAction(LockscreenShortcutsHelper.NONE, R.string.lockscreen_none_target);
        mActions.addAction(LockscreenShortcutsHelper.DEFAULT, R.string.lockscreen_default_target);
        mActions.addAction(ACTION_APP, R.string.select_application);
    }