diff options
author | Eric Erfanian <erfanian@google.com> | 2017-03-15 14:41:07 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-03-15 16:24:23 -0700 |
commit | d5e47f6da5b08b13ecdfa7f1edc7e12aeb83fab9 (patch) | |
tree | b54abbb51fb7d66e7755a1fbb5db023ff601090b /java/com/android/dialer/binary | |
parent | 30436e7e6d3f2c8755a91b2b6222b74d465a9e87 (diff) |
Update Dialer source from latest green build.
* Refactor voicemail component
* Add new enriched calling components
Test: treehugger, manual aosp testing
Change-Id: I521a0f86327d4b42e14d93927c7d613044ed5942
Diffstat (limited to 'java/com/android/dialer/binary')
5 files changed, 253 insertions, 0 deletions
diff --git a/java/com/android/dialer/binary/aosp/AndroidManifest.xml b/java/com/android/dialer/binary/aosp/AndroidManifest.xml new file mode 100644 index 000000000..63edb8397 --- /dev/null +++ b/java/com/android/dialer/binary/aosp/AndroidManifest.xml @@ -0,0 +1,116 @@ +<!-- 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. +--> + +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + coreApp="true" + package="com.android.dialer" + android:versionCode="100000" + android:versionName="10.0"> + + <uses-sdk + android:minSdkVersion="23" + android:targetSdkVersion="25"/> + + <uses-permission android:name="android.permission.CALL_PHONE"/> + <uses-permission android:name="android.permission.READ_CONTACTS"/> + <uses-permission android:name="android.permission.WRITE_CONTACTS"/> + <uses-permission android:name="android.permission.READ_CALL_LOG"/> + <uses-permission android:name="android.permission.WRITE_CALL_LOG"/> + <uses-permission android:name="android.permission.READ_PROFILE"/> + <uses-permission android:name="android.permission.MANAGE_ACCOUNTS"/> + <uses-permission android:name="android.permission.GET_ACCOUNTS"/> + <uses-permission android:name="android.permission.GET_ACCOUNTS_PRIVILEGED"/> + <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> + <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> + <uses-permission android:name="android.permission.INTERNET"/> + <uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS"/> + <uses-permission android:name="android.permission.NFC"/> + <uses-permission android:name="android.permission.READ_PHONE_STATE"/> + <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/> + <uses-permission android:name="android.permission.MODIFY_PHONE_STATE"/> + <uses-permission android:name="android.permission.WAKE_LOCK"/> + <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> + <uses-permission android:name="android.permission.WRITE_SETTINGS"/> + <uses-permission android:name="android.permission.USE_CREDENTIALS"/> + <uses-permission android:name="android.permission.VIBRATE"/> + <uses-permission android:name="android.permission.READ_SYNC_SETTINGS"/> + <uses-permission android:name="com.android.voicemail.permission.ADD_VOICEMAIL"/> + <uses-permission android:name="com.android.voicemail.permission.WRITE_VOICEMAIL"/> + <uses-permission android:name="com.android.voicemail.permission.READ_VOICEMAIL"/> + <uses-permission android:name="android.permission.ALLOW_ANY_CODEC_FOR_PLAYBACK"/> + <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/> + <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> + <uses-permission android:name="android.permission.BROADCAST_STICKY"/> + <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> + <uses-permission android:name="android.permission.SEND_SMS"/> + + <uses-permission android:name="android.permission.CONTROL_INCALL_EXPERIENCE"/> + <!-- We use this to disable the status bar buttons of home, back and recent + during an incoming call. By doing so this allows us to not show the user + is viewing the activity in full screen alert, on a fresh system/factory + reset state of the app. --> + <uses-permission android:name="android.permission.STATUS_BAR"/> + <uses-permission android:name="android.permission.CAMERA"/> + + <!-- This tells the activity manager to not delay any of our activity + start requests, even if they happen immediately after the user + presses home. --> + <uses-permission android:name="android.permission.STOP_APP_SWITCHES"/> + + <!-- Permissions needed for badger count showing on launch icon. --> + + <!--for Samsung--> + <uses-permission android:name="com.sec.android.provider.badge.permission.READ"/> + <uses-permission android:name="com.sec.android.provider.badge.permission.WRITE"/> + + <!--for htc--> + <uses-permission android:name="com.htc.launcher.permission.READ_SETTINGS"/> + <uses-permission android:name="com.htc.launcher.permission.UPDATE_SHORTCUT"/> + + <!--for sony--> + <uses-permission android:name="com.sonyericsson.home.permission.BROADCAST_BADGE"/> + <uses-permission android:name="com.sonymobile.home.permission.PROVIDER_INSERT_BADGE"/> + + <!--for apex--> + <uses-permission android:name="com.anddoes.launcher.permission.UPDATE_COUNT"/> + + <!--for solid--> + <uses-permission android:name="com.majeur.launcher.permission.UPDATE_BADGE"/> + + <!--for huawei--> + <uses-permission android:name="com.huawei.android.launcher.permission.CHANGE_BADGE"/> + <uses-permission android:name="com.huawei.android.launcher.permission.READ_SETTINGS"/> + <uses-permission android:name="com.huawei.android.launcher.permission.WRITE_SETTINGS"/> + + <!--for ZUK--> + <uses-permission android:name="android.permission.READ_APP_BADGE"/> + + <!--for OPPO--> + <uses-permission android:name="com.oppo.launcher.permission.READ_SETTINGS"/> + <uses-permission android:name="com.oppo.launcher.permission.WRITE_SETTINGS"/> + + <application + android:backupAgent='com.android.dialer.backup.DialerBackupAgent' + android:fullBackupOnly="true" + android:restoreAnyVersion="true" + android:hardwareAccelerated="true" + android:icon="@mipmap/ic_launcher_phone" + android:label="@string/applicationLabel" + android:name="com.android.dialer.binary.aosp.AospDialerApplication" + android:supportsRtl="true" + android:usesCleartextTraffic="false"> + </application> + +</manifest> diff --git a/java/com/android/dialer/binary/aosp/AospDialerApplication.java b/java/com/android/dialer/binary/aosp/AospDialerApplication.java new file mode 100644 index 000000000..f657a3987 --- /dev/null +++ b/java/com/android/dialer/binary/aosp/AospDialerApplication.java @@ -0,0 +1,30 @@ +/* + * 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.dialer.binary.aosp; + +import android.support.annotation.NonNull; +import com.android.dialer.binary.common.DialerApplication; +import com.android.dialer.inject.ContextModule; + +/** + * The application class for the AOSP Dialer. This is a version of the Dialer app that has no + * dependency on Google Play Services. + */ +public class AospDialerApplication extends DialerApplication { + + +} diff --git a/java/com/android/dialer/binary/aosp/AospDialerRootComponent.java b/java/com/android/dialer/binary/aosp/AospDialerRootComponent.java new file mode 100644 index 000000000..8628e90c2 --- /dev/null +++ b/java/com/android/dialer/binary/aosp/AospDialerRootComponent.java @@ -0,0 +1,30 @@ +/* + * 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.dialer.binary.aosp; + +import com.android.dialer.binary.basecomponent.BaseDialerRootComponent; +import com.android.dialer.enrichedcall.stub.StubEnrichedCallModule; +import com.android.dialer.inject.ContextModule; +import com.android.dialer.simulator.impl.SimulatorModule; +import com.android.incallui.calllocation.stub.StubCallLocationModule; +import com.android.incallui.maps.stub.StubMapsModule; +import com.android.voicemail.impl.VoicemailModule; +import dagger.Component; +import javax.inject.Singleton; + +/** Root component for the AOSP Dialer application. */ +public interface AospDialerRootComponent extends BaseDialerRootComponent {} diff --git a/java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java b/java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java new file mode 100644 index 000000000..907671b01 --- /dev/null +++ b/java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java @@ -0,0 +1,34 @@ +/* + * 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.dialer.binary.basecomponent; + +import com.android.dialer.enrichedcall.EnrichedCallComponent; +import com.android.dialer.simulator.SimulatorComponent; +import com.android.incallui.calllocation.CallLocationComponent; +import com.android.incallui.maps.MapsComponent; +import com.android.voicemail.VoicemailComponent; + +/** + * Base class for the core application-wide {@link Component}. All variants of the Dialer app should + * extend from this component. + */ +public interface BaseDialerRootComponent + extends CallLocationComponent.HasComponent, + EnrichedCallComponent.HasComponent, + MapsComponent.HasComponent, + SimulatorComponent.HasComponent, + VoicemailComponent.HasComponent {} diff --git a/java/com/android/dialer/binary/common/DialerApplication.java b/java/com/android/dialer/binary/common/DialerApplication.java new file mode 100644 index 000000000..c0be4328c --- /dev/null +++ b/java/com/android/dialer/binary/common/DialerApplication.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2013 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.dialer.binary.common; + +import android.app.Application; +import android.os.Trace; +import android.preference.PreferenceManager; +import android.support.annotation.NonNull; +import com.android.dialer.blocking.BlockedNumbersAutoMigrator; +import com.android.dialer.blocking.FilteredNumberAsyncQueryHandler; + +/** A common application subclass for all Dialer build variants. */ +public abstract class DialerApplication extends Application { + + private volatile Object rootComponent; + + @Override + public void onCreate() { + Trace.beginSection("DialerApplication.onCreate"); + super.onCreate(); + new BlockedNumbersAutoMigrator( + this, + PreferenceManager.getDefaultSharedPreferences(this), + new FilteredNumberAsyncQueryHandler(this)) + .autoMigrate(); + Trace.endSection(); + } + +} |