summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Joshua Trask <joshtrask@google.com> 2022-03-31 13:43:20 -0400
committer Joshua Trask <joshtrask@google.com> 2022-04-20 19:07:53 +0000
commit66a423e79c27dceee97ee288e5f46413d6606452 (patch)
tree821f4022cc6f15ae5b7cfe54d8c002d0027e99ea
parenta501fcb752a9dfda59d4589421c2ced921c419f2 (diff)
Remove unused ChooserUtil.java
The helper methods provided by this class have been unused since ag/13807667 (part of removing the old ChooserTargetService functionality). Test: http://cs/search?q=chooserutil&sq=package:android-internal Bug: 148416928 Change-Id: I0aaaa5f597ef72097f1847a3187b335791287a60 Merged-In: I0aaaa5f597ef72097f1847a3187b335791287a60
-rw-r--r--core/java/com/android/internal/app/ChooserUtil.java57
1 files changed, 0 insertions, 57 deletions
diff --git a/core/java/com/android/internal/app/ChooserUtil.java b/core/java/com/android/internal/app/ChooserUtil.java
deleted file mode 100644
index 3f8788cba9b9..000000000000
--- a/core/java/com/android/internal/app/ChooserUtil.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2020 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.internal.app;
-
-import java.nio.charset.Charset;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-
-/**
- * Utility method for common computation operations for Share sheet.
- */
-public class ChooserUtil {
-
- private static final Charset UTF_8 = Charset.forName("UTF-8");
-
- /**
- * Hashes the given input based on MD5 algorithm.
- *
- * @return a string representation of the hash computation.
- */
- public static String md5(String input) {
- try {
- MessageDigest md = MessageDigest.getInstance("MD5");
- md.update(input.getBytes(UTF_8));
- return convertBytesToHexString(md.digest());
- } catch (NoSuchAlgorithmException e) {
- throw new IllegalStateException(e);
- }
- }
-
- /** Converts byte array input into an hex string. */
- private static String convertBytesToHexString(byte[] input) {
- char[] chars = new char[input.length * 2];
- for (int i = 0; i < input.length; i++) {
- byte b = input[i];
- chars[i * 2] = Character.forDigit((b >> 4) & 0xF, 16 /* radix */);
- chars[i * 2 + 1] = Character.forDigit(b & 0xF, 16 /* radix */);
- }
- return new String(chars);
- }
-
- private ChooserUtil() {}
-}