Merge branch 'new_notification_expanded' of github.com:amoghbl1/orbot-1 into amoghbl1-new_notification_expanded
This commit is contained in:
commit
3bc8760beb
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
||||
<classpathentry kind="lib" path="libs/jtorctl.jar"/>
|
||||
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
|
||||
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="gen"/>
|
||||
<classpathentry kind="lib" path="/home/amoghbl1/git/n8fr8/jtorctl.jar"/>
|
||||
<classpathentry kind="output" path="bin/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 64177777165d9684bafbfa946abd126f7ebff11f
|
||||
Subproject commit ce46db99b94389a8fed0248f64f88d047cdac416
|
|
@ -1 +1 @@
|
|||
Subproject commit 6b72417a00b803680edc9be214c1b3dd9dae203d
|
||||
Subproject commit b2d951e4232d2f90168f9a3dd0b7df9ecf2d81a8
|
|
@ -1 +1 @@
|
|||
Subproject commit f690e763257ba05513b0bf0bd8a99554a0719201
|
||||
Subproject commit af08a108acb9ac717f114d81c60cad0ccc0d7c21
|
|
@ -1 +1 @@
|
|||
Subproject commit 2ee56e4c2c841a45418cfb826e1ce6689278382d
|
||||
Subproject commit d2147cc7ba5c5d5114bae61000cbf757353c3ed6
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,136 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2012 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.
|
||||
-->
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:internal="http://schemas.android.com/apk/prv/res/android"
|
||||
android:id="@+id/status_bar_latest_event_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
internal:layout_minHeight="64dp"
|
||||
internal:layout_maxHeight="64dp"
|
||||
>
|
||||
<ImageView android:id="@+id/icon"
|
||||
android:layout_width="@dimen/notification_large_icon_width"
|
||||
android:layout_height="@dimen/notification_large_icon_height"
|
||||
android:scaleType="center"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="fill_vertical"
|
||||
android:layout_marginStart="@dimen/notification_large_icon_width"
|
||||
android:minHeight="@dimen/notification_large_icon_height"
|
||||
android:orientation="vertical"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:gravity="top"
|
||||
>
|
||||
<LinearLayout
|
||||
android:id="@+id/line1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="6dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
<TextView android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="marquee"
|
||||
android:fadingEdge="horizontal"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
<ViewStub android:id="@+id/time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:visibility="gone"
|
||||
android:layout="@layout/notification_template_part_time"
|
||||
/>
|
||||
<ViewStub android:id="@+id/chronometer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:visibility="gone"
|
||||
android:layout="@layout/notification_template_part_chronometer"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<TextView android:id="@+id/text2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="-2dp"
|
||||
android:layout_marginBottom="-2dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:singleLine="true"
|
||||
android:fadingEdge="horizontal"
|
||||
android:ellipsize="marquee"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
<ProgressBar
|
||||
android:id="@android:id/progress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="12dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:visibility="gone"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:id="@+id/line3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginStart="8dp"
|
||||
>
|
||||
<TextView android:id="@+id/text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="marquee"
|
||||
android:fadingEdge="horizontal"
|
||||
/>
|
||||
<TextView android:id="@+id/info"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="0"
|
||||
android:singleLine="true"
|
||||
android:gravity="center"
|
||||
android:paddingStart="8dp"
|
||||
/>
|
||||
<ImageView android:id="@+id/right_icon"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="0"
|
||||
android:layout_marginStart="8dp"
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
<Button
|
||||
android:id="@+id/_tor_notificationBT"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_below="@+id/tv"
|
||||
android:text="test2" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2012 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.
|
||||
-->
|
||||
|
||||
<Chronometer android:id="@+id/chronometer" xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="0"
|
||||
android:singleLine="true"
|
||||
android:gravity="center"
|
||||
android:paddingStart="8dp"
|
||||
/>
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2012 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.
|
||||
-->
|
||||
|
||||
<DateTimeView android:id="@+id/time" xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="0"
|
||||
android:singleLine="true"
|
||||
android:gravity="center"
|
||||
android:paddingStart="8dp"
|
||||
/>
|
|
@ -0,0 +1,361 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/* //device/apps/common/assets/res/any/dimens.xml
|
||||
**
|
||||
** Copyright 2006, 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.
|
||||
*/
|
||||
-->
|
||||
<resources>
|
||||
<!-- The width that is used when creating thumbnails of applications. -->
|
||||
<dimen name="thumbnail_width">164dp</dimen>
|
||||
<!-- The height that is used when creating thumbnails of applications. -->
|
||||
<dimen name="thumbnail_height">145dp</dimen>
|
||||
<!-- The standard size (both width and height) of an application icon that
|
||||
will be displayed in the app launcher and elsewhere. -->
|
||||
<dimen name="app_icon_size">48dip</dimen>
|
||||
<!-- The maximum number of action buttons that should be permitted within
|
||||
an action bar/action mode. This will be used to determine how many
|
||||
showAsAction="ifRoom" items can fit. "always" items can override this. -->
|
||||
<integer name="max_action_buttons">2</integer>
|
||||
<dimen name="toast_y_offset">64dip</dimen>
|
||||
<!-- Height of the status bar -->
|
||||
<dimen name="status_bar_height">25dip</dimen>
|
||||
<!-- Height of the bottom navigation / system bar. -->
|
||||
<dimen name="navigation_bar_height">48dp</dimen>
|
||||
<!-- Height of the bottom navigation bar in portrait; often the same as @dimen/navigation_bar_height -->
|
||||
<dimen name="navigation_bar_height_landscape">48dp</dimen>
|
||||
<!-- Width of the navigation bar when it is placed vertically on the screen -->
|
||||
<dimen name="navigation_bar_width">42dp</dimen>
|
||||
<!-- Height of notification icons in the status bar -->
|
||||
<dimen name="status_bar_icon_size">24dip</dimen>
|
||||
<!-- Size of the giant number (unread count) in the notifications -->
|
||||
<dimen name="status_bar_content_number_size">48sp</dimen>
|
||||
<!-- Height of the system bar (combined status & navigation); used by
|
||||
SystemUI internally, not respected by the window manager. -->
|
||||
<dimen name="system_bar_height">@dimen/navigation_bar_height</dimen>
|
||||
<!-- Height of notification icons in the system bar -->
|
||||
<dimen name="system_bar_icon_size">32dip</dimen>
|
||||
<!-- Margin at the edge of the screen to ignore touch events for in the windowshade. -->
|
||||
<dimen name="status_bar_edge_ignore">5dp</dimen>
|
||||
|
||||
<!-- Minimum size of the fastscroll overlay -->
|
||||
<dimen name="fastscroll_overlay_size">104dp</dimen>
|
||||
<!-- Text size of the fastscroll overlay -->
|
||||
<dimen name="fastscroll_overlay_text_size">52sp</dimen>
|
||||
<!-- Padding of the fastscroll overlay -->
|
||||
<dimen name="fastscroll_overlay_padding">16dp</dimen>
|
||||
<!-- Width of the fastscroll thumb -->
|
||||
<dimen name="fastscroll_thumb_width">64dp</dimen>
|
||||
<!-- Height of the fastscroll thumb -->
|
||||
<dimen name="fastscroll_thumb_height">52dp</dimen>
|
||||
<!-- Min width for a tablet device -->
|
||||
<dimen name="min_xlarge_screen_width">800dp</dimen>
|
||||
|
||||
<!-- Default height of a key in the password keyboard for alpha (used by keyguard) -->
|
||||
<dimen name="password_keyboard_key_height_alpha">56dip</dimen>
|
||||
<!-- Default height of a key in the password keyboard for numeric (used by keyguard) -->
|
||||
<dimen name="password_keyboard_key_height_numeric">56dip</dimen>
|
||||
<!-- Default correction for the space key in the password keyboard (used by keyguard) -->
|
||||
<dimen name="password_keyboard_spacebar_vertical_correction">4dip</dimen>
|
||||
<!-- Default horizontal gap between keys in the password keyboard (used by keyguard) -->
|
||||
<dimen name="password_keyboard_horizontalGap">3dip</dimen>
|
||||
<!-- Default vertical gap between keys in the password keyboard (used by keyguard) -->
|
||||
<dimen name="password_keyboard_verticalGap">9dip</dimen>
|
||||
|
||||
<!-- Size of lockscreen outerring on unsecure unlock LockScreen -->
|
||||
<dimen name="keyguard_lockscreen_outerring_diameter">270dp</dimen>
|
||||
|
||||
<!-- Default target placement radius for GlowPadView. Should be 1/2 of outerring diameter. -->
|
||||
<dimen name="glowpadview_target_placement_radius">135dip</dimen>
|
||||
|
||||
<!-- Default glow radius for GlowPadView -->
|
||||
<dimen name="glowpadview_glow_radius">75dip</dimen>
|
||||
|
||||
<!-- Default distance beyond which GlowPadView snaps to the matching target -->
|
||||
<dimen name="glowpadview_snap_margin">40dip</dimen>
|
||||
|
||||
<!-- Default distance from each snap target that GlowPadView considers a "hit" -->
|
||||
<dimen name="glowpadview_inner_radius">15dip</dimen>
|
||||
|
||||
<!-- Preference activity side margins -->
|
||||
<dimen name="preference_screen_side_margin">0dp</dimen>
|
||||
<!-- Preference activity side margins negative-->
|
||||
<dimen name="preference_screen_side_margin_negative">0dp</dimen>
|
||||
<!-- Preference activity top margin -->
|
||||
<dimen name="preference_screen_top_margin">0dp</dimen>
|
||||
<!-- Preference activity bottom margin -->
|
||||
<dimen name="preference_screen_bottom_margin">0dp</dimen>
|
||||
<!-- Preference widget area width (to the left of the text) -->
|
||||
<dimen name="preference_widget_width">48dp</dimen>
|
||||
<!-- Preference fragment padding, bottom -->
|
||||
<dimen name="preference_fragment_padding_bottom">0dp</dimen>
|
||||
<!-- Preference fragment padding, sides -->
|
||||
<dimen name="preference_fragment_padding_side">16dp</dimen>
|
||||
<!-- Weight of the left pane in a multi-pane preference layout. -->
|
||||
<integer name="preferences_left_pane_weight">4</integer>
|
||||
<!-- Weight of the right pane in a multi-pane preference layout. So the split is 40:60 -->
|
||||
<integer name="preferences_right_pane_weight">6</integer>
|
||||
<!-- Padding to the left of the preference panel breadcrumb -->
|
||||
<dimen name="preference_breadcrumb_paddingLeft">0dp</dimen>
|
||||
<!-- Padding to the right of the preference panel breadcrumb -->
|
||||
<dimen name="preference_breadcrumb_paddingRight">0dp</dimen>
|
||||
<!-- Minimum space to allocate to the left of a preference item for an icon.
|
||||
This helps in aligning titles when some items have icons and some don't. When space is
|
||||
at a premium, we don't pre-allocate any space. -->
|
||||
<dimen name="preference_icon_minWidth">0dp</dimen>
|
||||
<!-- The platform's desired minimum size for a dialog's width when it
|
||||
is along the major axis (that is the screen is landscape). This may
|
||||
be either a fraction or a dimension. -->
|
||||
<item type="dimen" name="dialog_min_width_major">65%</item>
|
||||
|
||||
<!-- The platform's desired fixed width for a dialog along the major axis
|
||||
(the screen is in landscape). This may be either a fraction or a dimension.-->
|
||||
<item type="dimen" name="dialog_fixed_width_major">320dp</item>
|
||||
<!-- The platform's desired fixed width for a dialog along the minor axis
|
||||
(the screen is in portrait). This may be either a fraction or a dimension.-->
|
||||
<item type="dimen" name="dialog_fixed_width_minor">320dp</item>
|
||||
<!-- The platform's desired fixed height for a dialog along the major axis
|
||||
(the screen is in portrait). This may be either a fraction or a dimension.-->
|
||||
<item type="dimen" name="dialog_fixed_height_major">80%</item>
|
||||
<!-- The platform's desired fixed height for a dialog along the minor axis
|
||||
(the screen is in landscape). This may be either a fraction or a dimension.-->
|
||||
<item type="dimen" name="dialog_fixed_height_minor">100%</item>
|
||||
|
||||
<!-- Preference activity, vertical padding for the header list -->
|
||||
<dimen name="preference_screen_header_vertical_padding">0dp</dimen>
|
||||
|
||||
<dimen name="preference_screen_header_padding_side">16dip</dimen>
|
||||
<integer name="preference_screen_header_scrollbarStyle">0x02000000</integer> <!-- outsideOverlay -->
|
||||
|
||||
<integer name="preference_fragment_scrollbarStyle">0x02000000</integer> <!-- outsideOverlay -->
|
||||
|
||||
<dimen name="preference_item_padding_side">8dip</dimen>
|
||||
<dimen name="preference_item_padding_inner">8dip</dimen>
|
||||
<dimen name="preference_child_padding_side">16dip</dimen>
|
||||
|
||||
<!-- The platform's desired minimum size for a dialog's width when it
|
||||
is along the minor axis (that is the screen is portrait). This may
|
||||
be either a fraction or a dimension. -->
|
||||
<item type="dimen" name="dialog_min_width_minor">95%</item>
|
||||
|
||||
<!-- The width of the big icons in notifications. -->
|
||||
<dimen name="notification_large_icon_width">64dp</dimen>
|
||||
<!-- The width of the big icons in notifications. -->
|
||||
<dimen name="notification_large_icon_height">64dp</dimen>
|
||||
|
||||
<!-- Minimum width of the search view text entry area. -->
|
||||
<dimen name="search_view_text_min_width">160dip</dimen>
|
||||
|
||||
<!-- Preferred width of the search view. -->
|
||||
<dimen name="search_view_preferred_width">320dip</dimen>
|
||||
|
||||
<!-- Dialog title height -->
|
||||
<dimen name="alert_dialog_title_height">64dip</dimen>
|
||||
<!-- Dialog button bar height -->
|
||||
<dimen name="alert_dialog_button_bar_height">48dip</dimen>
|
||||
|
||||
<!-- Default height of an action bar. -->
|
||||
<dimen name="action_bar_default_height">48dip</dimen>
|
||||
<!-- Vertical padding around action bar icons. -->
|
||||
<dimen name="action_bar_icon_vertical_padding">8dip</dimen>
|
||||
<!-- Text size for action bar titles -->
|
||||
<dimen name="action_bar_title_text_size">18dp</dimen>
|
||||
<!-- Text size for action bar subtitles -->
|
||||
<dimen name="action_bar_subtitle_text_size">14dp</dimen>
|
||||
<!-- Top margin for action bar subtitles -->
|
||||
<dimen name="action_bar_subtitle_top_margin">-3dp</dimen>
|
||||
<!-- Bottom margin for action bar subtitles -->
|
||||
<dimen name="action_bar_subtitle_bottom_margin">5dip</dimen>
|
||||
|
||||
<!-- Size of clock font in LockScreen on Unsecure unlock screen. -->
|
||||
<dimen name="keyguard_lockscreen_clock_font_size">80dip</dimen>
|
||||
|
||||
<!-- Size of status line font on Unsecure unlock LockScreen. -->
|
||||
<dimen name="keyguard_lockscreen_status_line_font_size">14dip</dimen>
|
||||
|
||||
<!-- Size of right margin on Unsecure unlock LockScreen -->
|
||||
<dimen name="keyguard_lockscreen_status_line_font_right_margin">42dip</dimen>
|
||||
|
||||
<!-- Size of top margin on Clock font to edge on unlock LockScreen -->
|
||||
<dimen name="keyguard_lockscreen_status_line_clockfont_top_margin">22dip</dimen>
|
||||
|
||||
<!-- Size of top margin on Clock font to edge on unlock LockScreen -->
|
||||
<dimen name="keyguard_lockscreen_status_line_clockfont_bottom_margin">12dip</dimen>
|
||||
|
||||
<!-- Padding on left margin of PIN text entry field to center it when del button is showing -->
|
||||
<dimen name="keyguard_lockscreen_pin_margin_left">40dip</dimen>
|
||||
|
||||
<!-- Height of FaceUnlock view in keyguard -->
|
||||
<dimen name="face_unlock_height">330dip</dimen>
|
||||
|
||||
<!-- Minimum popup width for selecting an activity in ActivityChooserDialog/ActivityChooserView. -->
|
||||
<dimen name="activity_chooser_popup_min_width">200dip</dimen>
|
||||
|
||||
<!-- The default gap between components in a layout. -->
|
||||
<dimen name="default_gap">8dip</dimen>
|
||||
|
||||
<!-- Text padding for dropdown items -->
|
||||
<dimen name="dropdownitem_text_padding_left">8dip</dimen>
|
||||
|
||||
<!-- Text padding for dropdown items -->
|
||||
<dimen name="dropdownitem_text_padding_right">8dip</dimen>
|
||||
|
||||
<!-- Width of the icon in a dropdown list -->
|
||||
<dimen name="dropdownitem_icon_width">32dip</dimen>
|
||||
|
||||
<!-- Default width for a textview error popup -->
|
||||
<dimen name="textview_error_popup_default_width">240dip</dimen>
|
||||
|
||||
<!-- Volume panel y offset -->
|
||||
<dimen name="volume_panel_top">80dp</dimen>
|
||||
|
||||
<!-- Default padding to apply to AppWidgetHostViews containing widgets targeting API level 14 and up. -->
|
||||
<dimen name="default_app_widget_padding_left">8dp</dimen>
|
||||
<dimen name="default_app_widget_padding_top">8dp</dimen>
|
||||
<dimen name="default_app_widget_padding_right">8dp</dimen>
|
||||
<dimen name="default_app_widget_padding_bottom">8dp</dimen>
|
||||
|
||||
<!-- Minimum width for an action button in the menu area of an action bar -->
|
||||
<dimen name="action_button_min_width">56dip</dimen>
|
||||
|
||||
<!-- Maximum height for a stacked tab bar as part of an action bar -->
|
||||
<dimen name="action_bar_stacked_max_height">48dp</dimen>
|
||||
|
||||
<!-- Maximum width for a stacked action bar tab. This prevents
|
||||
action bar tabs from becoming too wide on a wide screen when only
|
||||
a few are present. -->
|
||||
<dimen name="action_bar_stacked_tab_max_width">180dp</dimen>
|
||||
|
||||
<!-- Size of notification text (see TextAppearance.StatusBar.EventContent) -->
|
||||
<dimen name="notification_text_size">14dp</dimen>
|
||||
<!-- Size of notification text titles (see TextAppearance.StatusBar.EventContent.Title) -->
|
||||
<dimen name="notification_title_text_size">18dp</dimen>
|
||||
<!-- Size of smaller notification text (see TextAppearance.StatusBar.EventContent.Line2, Info, Time) -->
|
||||
<dimen name="notification_subtext_size">12dp</dimen>
|
||||
|
||||
<!-- Keyguard dimensions -->
|
||||
<!-- TEMP -->
|
||||
<dimen name="kg_security_panel_height">600dp</dimen>
|
||||
|
||||
<!-- Height of security view in keyguard. -->
|
||||
<dimen name="kg_security_view_height">480dp</dimen>
|
||||
|
||||
<!-- Width of widget view in keyguard. -->
|
||||
<dimen name="kg_widget_view_width">0dp</dimen>
|
||||
|
||||
<!-- Height of widget view in keyguard. -->
|
||||
<dimen name="kg_widget_view_height">0dp</dimen>
|
||||
|
||||
<!-- Size of the clock font in keyguard's status view -->
|
||||
<dimen name="kg_status_clock_font_size">75dp</dimen>
|
||||
|
||||
<!-- Size of the date font in keyguard's status view -->
|
||||
<dimen name="kg_status_date_font_size">15dp</dimen>
|
||||
|
||||
<!-- Size of the generic status lines keyguard's status view -->
|
||||
<dimen name="kg_status_line_font_size">13dp</dimen>
|
||||
|
||||
<!-- Size of margin on the right of keyguard's status view -->
|
||||
<dimen name="kg_status_line_font_right_margin">16dp</dimen>
|
||||
|
||||
<!-- Top margin for the clock view -->
|
||||
<dimen name="kg_clock_top_margin">-16dp</dimen>
|
||||
|
||||
<!-- Horizontal gap between keys in PIN and SIM PIN numeric keyboards in keyguard -->
|
||||
<dimen name="kg_key_horizontal_gap">0dp</dimen>
|
||||
|
||||
<!-- Horizontal gap between keys in PIN and SIM PIN numeric keyboards in keyguard -->
|
||||
<dimen name="kg_key_vertical_gap">0dp</dimen>
|
||||
|
||||
<!-- Horizontal gap between keys in PIN and SIM PIN numeric keyboards in keyguard -->
|
||||
<dimen name="kg_pin_key_height">60dp</dimen>
|
||||
|
||||
<!-- Space reserved at the bottom of secure views (pin/pattern/password/SIM pin/SIM puk) -->
|
||||
<dimen name="kg_secure_padding_height">46dp</dimen>
|
||||
|
||||
<!-- The height of the runway lights strip -->
|
||||
<dimen name="kg_runway_lights_height">7dp</dimen>
|
||||
|
||||
<!-- The height of the runway lights strip -->
|
||||
<dimen name="kg_runway_lights_vertical_padding">2dp</dimen>
|
||||
|
||||
<!-- Horizontal padding for the widget pager -->
|
||||
<dimen name="kg_widget_pager_horizontal_padding">16dp</dimen>
|
||||
|
||||
<!-- Top padding for the widget pager -->
|
||||
<dimen name="kg_widget_pager_top_padding">0dp</dimen>
|
||||
|
||||
<!-- Bottom padding for the widget pager -->
|
||||
<dimen name="kg_widget_pager_bottom_padding">64dp</dimen>
|
||||
|
||||
<!-- Top margin for the runway lights. We add a negative margin in large
|
||||
devices to account for the widget pager padding -->
|
||||
<dimen name="kg_runway_lights_top_margin">0dp</dimen>
|
||||
|
||||
<!-- Touch slop for the global toggle accessibility gesture -->
|
||||
<dimen name="accessibility_touch_slop">80dip</dimen>
|
||||
|
||||
<!-- Width of the sliding KeyguardSecurityContainer (includes 2x keyguard_security_view_margin) -->
|
||||
<dimen name="keyguard_security_width">320dp</dimen>
|
||||
|
||||
<!-- Height of the sliding KeyguardSecurityContainer (includes 2x keyguard_security_view_margin) -->
|
||||
<dimen name="keyguard_security_height">400dp</dimen>
|
||||
|
||||
<!-- Margin around the various security views -->
|
||||
<dimen name="keyguard_security_view_margin">8dp</dimen>
|
||||
|
||||
<!-- Margin around the various security views -->
|
||||
<dimen name="keyguard_muliuser_selector_margin">8dp</dimen>
|
||||
|
||||
<!-- Stroke width of the frame for the circular avatars. -->
|
||||
<dimen name="keyguard_avatar_frame_stroke_width">2dp</dimen>
|
||||
|
||||
<!-- Shadow radius under the frame for the circular avatars. -->
|
||||
<dimen name="keyguard_avatar_frame_shadow_radius">1dp</dimen>
|
||||
|
||||
<!-- Size of the avator on hte multiuser lockscreen. -->
|
||||
<dimen name="keyguard_avatar_size">66dp</dimen>
|
||||
|
||||
<!-- Size of the text under the avator on the multiuser lockscreen. -->
|
||||
<dimen name="keyguard_avatar_name_size">10sp</dimen>
|
||||
|
||||
<!-- Size of the region along the edge of the screen that will accept
|
||||
swipes to scroll the widget area. -->
|
||||
<dimen name="kg_edge_swipe_region_size">24dp</dimen>
|
||||
|
||||
<!-- If the height if keyguard drops below this threshold (most likely
|
||||
due to the appearance of the IME), then drop the multiuser selector. -->
|
||||
<dimen name="kg_squashed_layout_threshold">600dp</dimen>
|
||||
|
||||
<!-- The height of widgets which do not support vertical resizing. This is only
|
||||
used on tablets; on phones, this size is determined by the space left by the
|
||||
security mode. -->
|
||||
<dimen name="kg_small_widget_height">160dp</dimen>
|
||||
|
||||
<!-- Rounded corner radius for video subtitles. -->
|
||||
<dimen name="subtitle_corner_radius">2dp</dimen>
|
||||
|
||||
<!-- Shadow radius for video subtitles. -->
|
||||
<dimen name="subtitle_shadow_radius">2dp</dimen>
|
||||
|
||||
<!-- Shadow offset for video subtitles. -->
|
||||
<dimen name="subtitle_shadow_offset">2dp</dimen>
|
||||
|
||||
<!-- Outline width for video subtitles. -->
|
||||
<dimen name="subtitle_outline_width">2dp</dimen>
|
||||
|
||||
<!-- width of ImmersiveModeConfirmation (-1 for match_parent) -->
|
||||
<dimen name="immersive_mode_cling_width">-1px</dimen>
|
||||
</resources>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="NotificationText" parent="android:TextAppearance.StatusBar.EventContent" />
|
||||
<style name="NotificationTitle" parent="android:TextAppearance.StatusBar.EventContent.Title" />
|
||||
</resources>
|
|
@ -526,6 +526,7 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
|
|||
|
||||
}
|
||||
|
||||
|
||||
private synchronized void handleIntents ()
|
||||
{
|
||||
if (getIntent() == null)
|
||||
|
|
|
@ -23,6 +23,10 @@ import java.util.Arrays;
|
|||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
import net.freehaven.tor.control.ConfigEntry;
|
||||
|
@ -39,6 +43,7 @@ import org.torproject.android.settings.AppManager;
|
|||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Application;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.app.Service;
|
||||
|
@ -59,7 +64,10 @@ import android.os.RemoteCallbackList;
|
|||
import android.os.RemoteException;
|
||||
import android.support.v4.app.NotificationCompat;
|
||||
import android.support.v4.app.NotificationCompat.Builder;
|
||||
import android.support.v4.content.LocalBroadcastManager;
|
||||
import android.util.Log;
|
||||
import android.widget.RemoteViews;
|
||||
import android.widget.Toast;
|
||||
|
||||
public class TorService extends Service implements TorServiceConstants, TorConstants, EventHandler
|
||||
{
|
||||
|
@ -80,6 +88,9 @@ public class TorService extends Service implements TorServiceConstants, TorConst
|
|||
private static final int HS_NOTIFY_ID = 4;
|
||||
|
||||
private boolean prefPersistNotifications = true;
|
||||
private String IPADDRESS_PATTERN =
|
||||
"(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)";
|
||||
private long exitIPTime = 0;
|
||||
|
||||
private static final int MAX_START_TRIES = 3;
|
||||
|
||||
|
@ -109,6 +120,8 @@ public class TorService extends Service implements TorServiceConstants, TorConst
|
|||
|
||||
private NotificationManager mNotificationManager = null;
|
||||
private Builder mNotifyBuilder;
|
||||
private Notification mNotification;
|
||||
private String exitIP = "";
|
||||
|
||||
private boolean mHasRoot = false;
|
||||
private boolean mEnableTransparentProxy = false;
|
||||
|
@ -205,16 +218,27 @@ public class TorService extends Service implements TorServiceConstants, TorConst
|
|||
|
||||
}
|
||||
|
||||
private void showToolbarNotification (String notifyMsg, int notifyId, int icon, boolean isOngoing)
|
||||
@SuppressLint("NewApi")
|
||||
private void showToolbarNotification (String notifyMsg, int notifyId, int icon, boolean isOngoing)
|
||||
{
|
||||
|
||||
//Reusable code.
|
||||
Intent intent = new Intent(TorService.this, Orbot.class);
|
||||
PendingIntent pendIntent = PendingIntent.getActivity(TorService.this, 0, intent, 0);
|
||||
|
||||
// Create remote view that needs to be set as bigContentView for the notification.
|
||||
RemoteViews expandedView = new RemoteViews(this.getPackageName(),
|
||||
R.layout.layout_notification_expanded);
|
||||
|
||||
expandedView.setTextViewText(R.id.text, notifyMsg);
|
||||
expandedView.setTextViewText(R.id.title, "ORBOT "+exitIP);
|
||||
//expandedView.setTextViewText(R.id.exitIP, exitIP);
|
||||
//expandedView.setOnClickPendingIntent(R.id._tor_notificationBT, pendIntent);
|
||||
expandedView.setImageViewResource(R.id.icon, icon);
|
||||
|
||||
if (mNotifyBuilder == null)
|
||||
{
|
||||
|
||||
//Reusable code.
|
||||
Intent intent = new Intent(TorService.this, Orbot.class);
|
||||
PendingIntent pendIntent = PendingIntent.getActivity(TorService.this, 0, intent, 0);
|
||||
|
||||
mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
|
||||
if (mNotifyBuilder == null)
|
||||
|
@ -232,6 +256,7 @@ public class TorService extends Service implements TorServiceConstants, TorConst
|
|||
mNotifyBuilder.setContentText(notifyMsg);
|
||||
mNotifyBuilder.setSmallIcon(icon);
|
||||
|
||||
|
||||
if (notifyId == ERROR_NOTIFY_ID)
|
||||
{
|
||||
mNotifyBuilder.setTicker(notifyMsg);
|
||||
|
@ -243,17 +268,17 @@ public class TorService extends Service implements TorServiceConstants, TorConst
|
|||
mNotifyBuilder.setTicker(null); //make sure to clear ticker
|
||||
}
|
||||
|
||||
mNotification = mNotifyBuilder.build();
|
||||
mNotification.bigContentView = expandedView;
|
||||
|
||||
if (isOngoing)
|
||||
{
|
||||
startForeground(notifyId,
|
||||
mNotifyBuilder.build());
|
||||
startForeground(notifyId, mNotification);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
mNotificationManager.notify(
|
||||
notifyId,
|
||||
mNotifyBuilder.build());
|
||||
mNotificationManager.notify(notifyId, mNotification);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1311,9 +1336,12 @@ public class TorService extends Service implements TorServiceConstants, TorConst
|
|||
while (st.hasMoreTokens())
|
||||
{
|
||||
node = st.nextToken();
|
||||
final String nodeName = parseNodeName(node);
|
||||
sb.append(nodeName);
|
||||
|
||||
sb.append(parseNodeName(node));
|
||||
|
||||
if(status.equals("BUILT") && currentStatus==STATUS_ON){
|
||||
new getExternalIP().execute(nodeName);
|
||||
}
|
||||
|
||||
if (st.hasMoreTokens())
|
||||
sb.append (" > ");
|
||||
|
@ -1342,6 +1370,49 @@ public class TorService extends Service implements TorServiceConstants, TorConst
|
|||
|
||||
}
|
||||
|
||||
private class getExternalIP extends AsyncTask<String, Void, Void>{
|
||||
|
||||
private long time;
|
||||
private String nodeDetails;
|
||||
|
||||
@Override
|
||||
protected Void doInBackground(String... params) {
|
||||
time = System.nanoTime();
|
||||
try {
|
||||
nodeDetails = conn.getInfo("ns/name/"+params[0]);
|
||||
if (ENABLE_DEBUG_LOG)
|
||||
{
|
||||
Log.d(TAG,"Node Details: "+nodeDetails);
|
||||
sendCallbackLogMessage("Node Details: "+nodeDetails);
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Void result) {
|
||||
// check if we need to update the exit IP
|
||||
if(time > exitIPTime) {
|
||||
exitIPTime = time;
|
||||
|
||||
Pattern pattern = Pattern.compile(IPADDRESS_PATTERN);
|
||||
Matcher matcher = null;
|
||||
if(nodeDetails!=null){
|
||||
matcher = pattern.matcher(nodeDetails);
|
||||
if (matcher.find()) {
|
||||
Log.d(TAG, "ip: "+matcher.group());
|
||||
exitIP = matcher.group();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private String parseNodeName(String node)
|
||||
{
|
||||
if (node.indexOf('=')!=-1)
|
||||
|
|
Loading…
Reference in New Issue