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

Commit 0590137a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove Suggestion v1 code."

parents 5ae6073c 1e27d2b2
Loading
Loading
Loading
Loading
+0 −24
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2017 The Android Open Source 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.
-->

<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@android:color/white"
    android:clickable="true"
    android:focusable="true"
    android:minHeight="@dimen/dashboard_tile_minimum_height" />

res/xml/suggestion_ordering.xml

deleted100644 → 0
+0 −35
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source 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.
-->

<optional-steps>
    <step category="com.android.settings.suggested.category.DEFERRED_SETUP"
          exclusive="true" />
    <step category="com.android.settings.suggested.category.FIRST_IMPRESSION"
          exclusiveExpireDays="14"
          exclusive="true"
          multiple="true" />
    <step category="com.android.settings.suggested.category.LOCK_SCREEN" />
    <step category="com.android.settings.suggested.category.TRUST_AGENT" />
    <step category="com.android.settings.suggested.category.EMAIL" />
    <step category="com.android.settings.suggested.category.PARTNER_ACCOUNT"
          multiple="true" />
    <step category="com.android.settings.suggested.category.GESTURE" />
    <step category="com.android.settings.suggested.category.HOTWORD" />
    <step category="com.android.settings.suggested.category.DEFAULT"
          multiple="true" />
    <step category="com.android.settings.suggested.category.SETTINGS_ONLY"
          multiple="true" />
</optional-steps>
+0 −1
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ package com.android.settings.core;
 */
public class FeatureFlags {
    public static final String SEARCH_V2 = "settings_search_v2";
    public static final String SUGGESTIONS_V2 = "new_settings_suggestion";
    public static final String APP_INFO_V2 = "settings_app_info_v2";
    public static final String CONNECTED_DEVICE_V2 = "settings_connected_device_v2";
    public static final String BATTERY_SETTINGS_V2 = "settings_battery_v2";
+0 −1
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@ public class MetricsFeatureProvider {

    protected void installLogWriters() {
        mLoggerWriters.add(new EventLogWriter());
        mLoggerWriters.add(new SettingSuggestionsLogWriter());
    }

    public void visible(Context context, int source, int category) {
+0 −91
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 The Android Open Source 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.
 */

package com.android.settings.core.instrumentation;

import android.content.Context;
import android.util.Pair;

import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.dashboard.suggestions.EventStore;

/**
 * {@link LogWriter} that writes setting suggestion related logs.
 */
public class SettingSuggestionsLogWriter implements LogWriter {

    private EventStore mEventStore;

    @Override
    public void visible(Context context, int source, int category) {
    }

    @Override
    public void hidden(Context context, int category) {
    }

    @Override
    public void action(Context context, int category, Pair<Integer, Object>... taggedData) {
    }

    @Override
    public void actionWithSource(Context context, int source, int category) {
    }

    @Override
    public void action(int category, int value, Pair<Integer, Object>... taggedData) {
    }

    @Override
    public void action(int category, boolean value, Pair<Integer, Object>... taggedData) {
    }

    @Override
    public void action(Context context, int category, int value) {
    }

    @Override
    public void action(Context context, int category, boolean value) {
    }

    @Override
    public void action(Context context, int category, String pkg,
            Pair<Integer, Object>... taggedData) {
        if (mEventStore == null) {
            mEventStore = new EventStore(context);
        }
        switch (category) {
            case MetricsEvent.ACTION_SHOW_SETTINGS_SUGGESTION:
                mEventStore.writeEvent(pkg, EventStore.EVENT_SHOWN);
                break;
            case MetricsEvent.ACTION_SETTINGS_DISMISS_SUGGESTION:
                mEventStore.writeEvent(pkg, EventStore.EVENT_DISMISSED);
                break;
            case MetricsEvent.ACTION_SETTINGS_SUGGESTION:
                mEventStore.writeEvent(pkg, EventStore.EVENT_CLICKED);
                break;
        }
    }

    @Override
    public void count(Context context, String name, int value) {
    }

    @Override
    public void histogram(Context context, String name, int bucket) {
    }

}
Loading