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

Commit 42053493 authored by Leif Hendrik Wilden's avatar Leif Hendrik Wilden
Browse files

Introduce seperate build target for Android TV.

Bug: 68140422
Test: Manually tested that both targets work properly.
Change-Id: Icb1ce0eb91c46d0533e89dce0a92cde3b362e6d7
parent 67aa5151
Loading
Loading
Loading
Loading
+30 −27
Original line number Diff line number Diff line
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional
LOCAL_PRIVILEGED_MODULE := true
########################
# Complete DocumentsUI app:
include $(CLEAR_VARS)

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_STATIC_JAVA_LIBRARIES += guava

LOCAL_PACKAGE_NAME := DocumentsUI
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_FULL_MANIFEST_FILE := $(LOCAL_PATH)/AndroidManifest.xml

LOCAL_STATIC_ANDROID_LIBRARIES := \
        android-support-core-ui \
        android-support-v4 \
        android-support-v7-appcompat \
        android-support-v13 \
        android-support-design \
        android-support-transition \
        android-support-v7-recyclerview

LOCAL_USE_AAPT2 := true
include $(LOCAL_PATH)/build_apk.mk

LOCAL_JACK_FLAGS := \
  -D jack.optimization.inner-class.accessors=true

# Only enable asserts on userdebug/eng builds
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
LOCAL_JACK_FLAGS += -D jack.assert.policy=always
endif

LOCAL_PACKAGE_NAME := DocumentsUI
LOCAL_CERTIFICATE := platform
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
########################
# Minimal DocumentsUI app (supports Scoped Directory Access only):
include $(CLEAR_VARS)

include $(BUILD_PACKAGE)
LOCAL_SRC_FILES := \
        src/com/android/documentsui/OpenExternalDirectoryActivity.java \
        src/com/android/documentsui/ScopedAccessPackageReceiver.java \
        src/com/android/documentsui/ScopedAccessMetrics.java \
        src/com/android/documentsui/archives/Archive.java \
        src/com/android/documentsui/archives/ArchiveId.java \
        src/com/android/documentsui/archives/ArchivesProvider.java \
        src/com/android/documentsui/archives/Loader.java \
        src/com/android/documentsui/archives/Proxy.java \
        src/com/android/documentsui/archives/ReadableArchive.java \
        src/com/android/documentsui/archives/WriteableArchive.java \
        src/com/android/documentsui/base/Providers.java \
        src/com/android/documentsui/prefs/ScopedAccessLocalPreferences.java

LOCAL_PACKAGE_NAME := DocumentsUIMinimal
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/minimal/res
LOCAL_FULL_MANIFEST_FILE := $(LOCAL_PATH)/minimal/AndroidManifest.xml

include $(LOCAL_PATH)/build_apk.mk

# Include makefiles for tests and libraries under the current path
include $(call all-makefiles-under, $(LOCAL_PATH))
+18 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
 * Copyright (C) 2007-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.
 */
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.android.documentsui">

build_apk.mk

0 → 100644
+28 −0
Original line number Diff line number Diff line
LOCAL_MODULE_TAGS := optional
LOCAL_PRIVILEGED_MODULE := true

LOCAL_STATIC_JAVA_LIBRARIES += guava

LOCAL_STATIC_ANDROID_LIBRARIES := \
        android-support-core-ui \
        android-support-v4 \
        android-support-v7-appcompat \
        android-support-v13 \
        android-support-design \
        android-support-transition \
        android-support-v7-recyclerview

LOCAL_USE_AAPT2 := true

LOCAL_JACK_FLAGS := \
  -D jack.optimization.inner-class.accessors=true

# Only enable asserts on userdebug/eng builds
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
LOCAL_JACK_FLAGS += -D jack.assert.policy=always
endif

LOCAL_CERTIFICATE := platform
LOCAL_PROGUARD_FLAG_FILES := proguard.flags

include $(BUILD_PACKAGE)
+51 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
 * Copyright (C) 2007-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.
 */
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.android.documentsui">

    <uses-permission android:name="android.permission.GET_APP_GRANTED_URI_PERMISSIONS" />
    <uses-permission android:name="android.permission.MANAGE_DOCUMENTS" />
    <uses-permission android:name="android.permission.CACHE_CONTENT" />

    <application
        android:label="@string/app_label"
        android:icon="@drawable/app_icon"
        android:supportsRtl="true"
        android:allowBackup="false"
        android:fullBackupOnly="false">

        <activity
            android:name=".OpenExternalDirectoryActivity"
            android:theme="@android:style/Theme.Translucent.NoTitleBar">
            <intent-filter>
                <action android:name="android.os.storage.action.OPEN_EXTERNAL_DIRECTORY" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <receiver android:name=".ScopedAccessPackageReceiver">
            <intent-filter>
                <action android:name="android.intent.action.PACKAGE_FULLY_REMOVED" />
                <action android:name="android.intent.action.PACKAGE_DATA_CLEARED" />
                <data android:scheme="package" />
            </intent-filter>
        </receiver>

    </application>
</manifest>
+44 −0
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.
-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:theme="@style/Theme.AppCompat.Light.Dialog.Alert"
    android:orientation="vertical"
    android:paddingEnd="24dp"
    android:paddingStart="24dp" >

    <TextView
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/message"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingEnd="24dp"
        android:paddingStart="32dp"
        android:paddingTop="24dp">
    </TextView>

    <CheckBox
        android:id="@+id/do_not_ask_checkbox"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dip"
        android:text="@string/never_ask_again"
        android:textColor="?android:attr/textColorSecondary"
        android:visibility="gone" />
</LinearLayout>
Loading