diff --git a/core/tests/batterystatstests/BatteryStatsViewer/AndroidManifest.xml b/core/tests/batterystatstests/BatteryStatsViewer/AndroidManifest.xml index 127dbfd25b092..94bde68fdf119 100644 --- a/core/tests/batterystatstests/BatteryStatsViewer/AndroidManifest.xml +++ b/core/tests/batterystatstests/BatteryStatsViewer/AndroidManifest.xml @@ -20,7 +20,6 @@ - @@ -32,8 +31,7 @@ + android:exported="true"> @@ -43,25 +41,5 @@ - - - - - - - - - - - - - diff --git a/core/tests/batterystatstests/BatteryStatsViewer/res/values/strings.xml b/core/tests/batterystatstests/BatteryStatsViewer/res/values/strings.xml deleted file mode 100644 index c23c1484cf59d..0000000000000 --- a/core/tests/batterystatstests/BatteryStatsViewer/res/values/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - Launch Battery Stats Viewer - The Battery Stats Viewer will be visible in the Launcher after it is opened once. - diff --git a/core/tests/batterystatstests/BatteryStatsViewer/src/com/android/frameworks/core/batterystatsviewer/TrampolineActivity.java b/core/tests/batterystatstests/BatteryStatsViewer/src/com/android/frameworks/core/batterystatsviewer/TrampolineActivity.java deleted file mode 100644 index 412169e7a905f..0000000000000 --- a/core/tests/batterystatstests/BatteryStatsViewer/src/com/android/frameworks/core/batterystatsviewer/TrampolineActivity.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2024 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.frameworks.core.batterystatsviewer; - -import android.app.Activity; -import android.content.ComponentName; -import android.content.Intent; -import android.content.pm.PackageManager; -import android.os.Bundle; - -import androidx.annotation.Nullable; - -public class TrampolineActivity extends Activity { - - @Override - protected void onCreate(@Nullable Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - showLauncherIcon(); - launchMainActivity(); - } - - private void showLauncherIcon() { - PackageManager pm = getPackageManager(); - pm.setComponentEnabledSetting(new ComponentName(this, BatteryConsumerPickerActivity.class), - PackageManager.COMPONENT_ENABLED_STATE_ENABLED, - PackageManager.DONT_KILL_APP); - } - - private void launchMainActivity() { - startActivity(new Intent(this, BatteryConsumerPickerActivity.class)); - finish(); - } -}