aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshubang <shubang@google.com>2019-04-03 18:48:25 -0700
committerShubang Lu <shubang@google.com>2019-04-05 20:53:29 +0000
commit6983be661629afbe549f63dbb128a49b18fbaa2e (patch)
treec0885938619eef8bb0d619807d5a55f03501a34b /src
parentd12bfa398c56027290a9e6e4fd14f635458ec581 (diff)
downloadTV-6983be661629afbe549f63dbb128a49b18fbaa2e.tar.gz
Move FakeTvProvider to a separate dir and target
Will move more classes to fakes in another CL PiperOrigin-RevId: 241849555 Change-Id: Ia9bab0b112ede7101318bf99a76ddeeaa34e9058 (cherry picked from commit c1f492a47bf8cb8b345b88ca764b9db2dbad2cf7)
Diffstat (limited to 'src')
-rw-r--r--src/com/android/tv/util/SqlParams.java75
1 files changed, 0 insertions, 75 deletions
diff --git a/src/com/android/tv/util/SqlParams.java b/src/com/android/tv/util/SqlParams.java
deleted file mode 100644
index fa557ba2..00000000
--- a/src/com/android/tv/util/SqlParams.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * 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.tv.util;
-
-import android.database.DatabaseUtils;
-import android.support.annotation.Nullable;
-import java.util.Arrays;
-
-/** Convenience class for SQL operations. */
-public class SqlParams {
- private String mTables;
- private @Nullable String mSelection;
- private @Nullable String[] mSelectionArgs;
-
- public SqlParams(String tables, @Nullable String selection, @Nullable String... selectionArgs) {
- setTables(tables);
- setWhere(selection, selectionArgs);
- }
-
- public String getTables() {
- return mTables;
- }
-
- public @Nullable String getSelection() {
- return mSelection;
- }
-
- public @Nullable String[] getSelectionArgs() {
- return mSelectionArgs;
- }
-
- public void setTables(String tables) {
- mTables = tables;
- }
-
- public void setWhere(String selection, String... selectionArgs) {
- mSelection = selection;
- mSelectionArgs = selectionArgs;
- }
-
- public void appendWhere(String selection, String... selectionArgs) {
- mSelection = DatabaseUtils.concatenateWhere(mSelection, selection);
- if (selectionArgs != null) {
- mSelectionArgs = DatabaseUtils.appendSelectionArgs(mSelectionArgs, selectionArgs);
- }
- }
-
- public void appendWhereEquals(String name, String value) {
- appendWhere(name + "=?", value);
- }
-
- @Override
- public String toString() {
- return "tables "
- + getTables()
- + " where "
- + getSelection()
- + " with "
- + Arrays.toString(getSelectionArgs());
- }
-}